summaryrefslogtreecommitdiffstats
path: root/poky
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-02-06 16:01:43 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-02-06 22:42:14 -0500
commit977dc1ac484e0c201b30f551e5f2d1d32e27eccf (patch)
treee13bde6791728dc10e5f04de29858c25f2ac5fa6 /poky
parent8fcf4c59a86ff23e3a2eb6101b5ffacdd50093f9 (diff)
downloadtalos-openbmc-977dc1ac484e0c201b30f551e5f2d1d32e27eccf.tar.gz
talos-openbmc-977dc1ac484e0c201b30f551e5f2d1d32e27eccf.zip
poky: refresh thud: 1d987b98ed..ee7dd31944
Update poky to thud HEAD. Alex Kiernan (2): systemd: backport fix to stop enabling ECN systemd: Add PACKAGECONFIG for gnutls Alexander Kanavin (3): lighttpd: update to 1.4.51 boost: update to 1.69.0 systemd: backport a patch to fix meson 0.49.0 issue Alexey Brodkin (1): wic: sdimage-bootpart: Use mmcblk0 drive instead of bogus mmcblk André Draszik (1): meta: remove True option to getVar calls (again) Anuj Mittal (6): eudev: upgrade 3.2.5 -> 3.2.7 gsettings-desktop-schemas: upgrade 3.28.0 -> 3.28.1 libatomic-ops: upgrade 7.6.6 -> 7.6.8 libpng: upgrade 1.6.35 -> 1.6.36 common-licenses: update Libpng license text i2c-tools: upgrade 4.0 -> 4.1 Aníbal Limón (1): meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU Armin Kuster (1): tzdata/tzcode-native: update to 2018i Brad Bishop (1): systemd-systemctl-native: handle Install wildcards Bruce Ashfield (3): kernel: use olddefconfig as the primary target for KERNEL_CONFIG_COMMAND linux-yocto/4.18: update to v4.18.22 linux-yocto/4.18: update to v4.18.25 Changqing Li (1): libsndfile1: Security fix CVE-2017-17456/17457 CVE-2018-19661/19662 Chen Qi (3): package.bbclass: fix python unclosed file ResourceWarning eSDK.py: avoid error in tearDownClass due to race condistion eSDK.py: unset BBPATH and BUILDDIR to avoid eSDK failure Douglas Royds (6): icecc: readlink -f on the recipe-sysroot gcc/g++ icecc: Trivial simplification icecc: Syntax error meant that we weren't waiting for tarball generation icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time icecc: patchelf is needed by icecc-create-env patch: reproducibility: Fix host umask leakage Erik Botö (1): testimage: Add possibility to pass parmeters to qemu Federico Sauter (1): kernel: don't assign the build user/host Joshua Watt (1): classes/testsdk: Split implementation into classes Kai Kang (2): testimage.bbclass: remove boot parameter systemd.log_target systemd: fix compile error for x32 Kevin Hao (1): meta-yocto-bsp: Bump to the latest stable kernel for the non-x86 BSPs Khem Raj (6): grub2: Fix passing null to printf formats gnupg: Upgrade to 2.2.12 release binutils: Fix build with clang binutils: Upgrade to latest on 2.31 release branch binutils: bfd doesn't handle ELF compressed data alignment systemd: Fix memory use after free errors Manjukumar Matha (1): kernel.bbclass: Fix incorrect deploying of fitimage.initramfs Marcus Cooper (3): systemd: Security fix CVE-2018-16864 systemd: Security fix CVE-2018-16865 systemd: Security fix CVE-2018-16866 Michael Ho (1): sstate: add support for caching shared workdir tasks Naveen Saini (2): linux-yocto: update genericx86* SRCREV for 4.18 linux-yocto: update genericx86* SRCREV for 4.18 Peter Kjellerstedt (2): systemd: Correct and clean up user/group definitions systemd: Correct a conditional add to SYSTEMD_PACKAGES Richard Purdie (9): nativesdk-*-provides-dummy: Fixes to allow correct operation with opkg classes: Correctly markup regex strings testimage: Remove duplicate dependencies testimage: Simplfy DEFAULT_TEST_SUITES logic testimage: Further cleanup DEFAULT_TEST_SUITES testimage: Enable autorunning of the package manager testsuites oeqa/runtime/cases: Improve test dependency information oeqa/runtime/cases: Improve dependencies of kernel/gcc/build tests oeqa/utils/buildproject: Only clean files if we've done something Robert Yang (7): oeqa/utils/qemurunner: Print output when failed to login oeqa/utils/qemurunner: set timeout to 60s for run_serial oeqa: Fix for QEMU_USE_KVM oeqa: make it work for multiple users runqemu-gen-tapdevs: Allow run --help without sudo oeqa/manual/bsp-qemu.json: Update for QEMU_USE_KVM oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is set Ross Burton (2): toolchain-scripts: run post-relocate scripts for every environment runqemu: clean up subprocess usage Yeoh Ee Peng (3): scripts/oe-git-archive: fix non-existent key referencing error testimage: Add support for slirp oeqa/qemu & runtime: qemu do not need ip input from external OpenBMC compatibility updates: meta-phosphor: Brad Bishop (1): phosphor: rebase i2c-tools patches Change-Id: Idc626fc076580aeebde1420bcad01e069b559504 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky')
-rw-r--r--poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.18.bbappend20
-rw-r--r--poky/meta/classes/clutter.bbclass4
-rw-r--r--poky/meta/classes/cmake.bbclass2
-rw-r--r--poky/meta/classes/icecc.bbclass72
-rw-r--r--poky/meta/classes/insane.bbclass16
-rw-r--r--poky/meta/classes/kernel.bbclass9
-rw-r--r--poky/meta/classes/license_image.bbclass14
-rw-r--r--poky/meta/classes/package.bbclass3
-rw-r--r--poky/meta/classes/patch.bbclass1
-rw-r--r--poky/meta/classes/perl-version.bbclass2
-rw-r--r--poky/meta/classes/sstate.bbclass6
-rw-r--r--poky/meta/classes/systemd.bbclass2
-rw-r--r--poky/meta/classes/testimage.bbclass74
-rw-r--r--poky/meta/classes/testsdk.bbclass217
-rw-r--r--poky/meta/classes/toolchain-scripts.bbclass46
-rw-r--r--poky/meta/classes/update-alternatives.bbclass2
-rw-r--r--poky/meta/classes/useradd-staticids.bbclass4
-rw-r--r--poky/meta/files/common-licenses/Libpng200
-rw-r--r--poky/meta/lib/oe/types.py24
-rw-r--r--poky/meta/lib/oeqa/core/target/qemu.py5
-rw-r--r--poky/meta/lib/oeqa/manual/bsp-qemu.json4
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/buildcpio.py9
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/buildgalculator.py9
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/buildlzip.py12
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/date.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/df.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/gcc.py19
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/kernelmodule.py8
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/opkg.py4
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/ptest.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/python.py8
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/rpm.py31
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/scp.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/ssh.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/stap.py6
-rw-r--r--poky/meta/lib/oeqa/runtime/cases/xorg.py2
-rw-r--r--poky/meta/lib/oeqa/runtime/context.py7
-rw-r--r--poky/meta/lib/oeqa/sdk/testsdk.py142
-rw-r--r--poky/meta/lib/oeqa/sdkext/testsdk.py104
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/eSDK.py8
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/runqemu.py5
-rw-r--r--poky/meta/lib/oeqa/targetcontrol.py12
-rw-r--r--poky/meta/lib/oeqa/utils/buildproject.py5
-rw-r--r--poky/meta/lib/oeqa/utils/dump.py2
-rw-r--r--poky/meta/lib/oeqa/utils/qemurunner.py3
-rw-r--r--poky/meta/lib/oeqa/utils/qemutinyrunner.py2
-rw-r--r--poky/meta/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch34
-rw-r--r--poky/meta/recipes-bsp/grub/grub2.inc1
-rw-r--r--poky/meta/recipes-core/meta/dummy-sdk-package.inc4
-rw-r--r--poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb22
-rw-r--r--poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb1
-rw-r--r--poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb27
-rw-r--r--poky/meta/recipes-core/systemd/systemd-boot_239.bb3
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch36
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-meson-rename-Ddebug-to-Ddebug-extra.patch45
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch31
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch49
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0002-core-Fix-use-after-free-case-in-load_from_path.patch43
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0024-journald-do-not-store-the-iovec-entry-for-process-co.patch204
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0025-journald-set-a-limit-on-the-number-of-fields-1k.patch56
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0026-journal-remote-set-a-limit-on-the-number-of-fields-i.patch84
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0027-journal-fix-syslog_parse_identifier.patch77
-rw-r--r--poky/meta/recipes-core/systemd/systemd/0028-journal-do-not-remove-multiple-spaces-after-identifi.patch84
-rw-r--r--poky/meta/recipes-core/systemd/systemd_239.bb35
-rw-r--r--poky/meta/recipes-core/udev/eudev_3.2.7.bb (renamed from poky/meta/recipes-core/udev/eudev_3.2.5.bb)4
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils-2.31.inc11
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch59
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch201
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch38
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch46
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch40
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch332
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch200
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch37
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch24
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch87
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch20
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch22
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch25
-rw-r--r--poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch30
-rw-r--r--poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch32
-rw-r--r--poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch37
-rw-r--r--poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch66
-rw-r--r--poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch98
-rw-r--r--poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb (renamed from poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb)8
-rw-r--r--poky/meta/recipes-devtools/python/python-native_2.7.15.bb2
-rw-r--r--poky/meta/recipes-devtools/python/python3-native_3.5.6.bb2
-rw-r--r--poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb6
-rw-r--r--poky/meta/recipes-extended/lighttpd/lighttpd_1.4.51.bb (renamed from poky/meta/recipes-extended/lighttpd/lighttpd_1.4.50.bb)4
-rw-r--r--poky/meta/recipes-extended/tzcode/tzcode-native_2018i.bb (renamed from poky/meta/recipes-extended/tzcode/tzcode-native_2018g.bb)8
-rw-r--r--poky/meta/recipes-extended/tzdata/tzdata_2018i.bb (renamed from poky/meta/recipes-extended/tzdata/tzdata_2018g.bb)4
-rw-r--r--poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.28.1.bb (renamed from poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.28.0.bb)4
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-rt_4.18.bb6
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.18.bb8
-rw-r--r--poky/meta/recipes-kernel/linux/linux-yocto_4.18.bb20
-rw-r--r--poky/meta/recipes-multimedia/libpng/libpng_1.6.36.bb (renamed from poky/meta/recipes-multimedia/libpng/libpng_1.6.35.bb)8
-rw-r--r--poky/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch101
-rw-r--r--poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb1
-rw-r--r--poky/meta/recipes-support/boost/bjam-native_1.69.0.bb (renamed from poky/meta/recipes-support/boost/bjam-native_1.68.0.bb)0
-rw-r--r--poky/meta/recipes-support/boost/boost-1.69.0.inc (renamed from poky/meta/recipes-support/boost/boost-1.68.0.inc)4
-rw-r--r--poky/meta/recipes-support/boost/boost.inc1
-rw-r--r--poky/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch (renamed from poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch)23
-rw-r--r--poky/meta/recipes-support/boost/boost/reproducibility-add-file-directive-to-assembler.patch243
-rw-r--r--poky/meta/recipes-support/boost/boost_1.69.0.bb (renamed from poky/meta/recipes-support/boost/boost_1.68.0.bb)6
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch6
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/relocate.patch2
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg_2.2.12.bb (renamed from poky/meta/recipes-support/gnupg/gnupg_2.2.11.bb)4
-rw-r--r--poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.8.bb (renamed from poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.6.bb)10
-rw-r--r--poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks4
-rwxr-xr-xpoky/scripts/oe-git-archive19
-rwxr-xr-xpoky/scripts/runqemu63
-rwxr-xr-xpoky/scripts/runqemu-gen-tapdevs27
112 files changed, 2265 insertions, 1709 deletions
diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.18.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.18.bbappend
index bb599d8c5..7f15843f3 100644
--- a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.18.bbappend
+++ b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.18.bbappend
@@ -8,11 +8,11 @@ KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
KMACHINE_beaglebone-yocto ?= "beaglebone"
-SRCREV_machine_genericx86 ?= "33859b3077c83d8a024946ba06a59990546fcbc7"
-SRCREV_machine_genericx86-64 ?= "33859b3077c83d8a024946ba06a59990546fcbc7"
-SRCREV_machine_edgerouter ?= "0cdc8564c61958a39704d97e008120bd7c762f60"
-SRCREV_machine_beaglebone-yocto ?= "0cdc8564c61958a39704d97e008120bd7c762f60"
-SRCREV_machine_mpc8315e-rdb ?= "20be2231bb047b02248d7f965c1c3af0c6be3a5e"
+SRCREV_machine_genericx86 ?= "db2d813869a0501782469ecdb17e277a501c9f57"
+SRCREV_machine_genericx86-64 ?= "db2d813869a0501782469ecdb17e277a501c9f57"
+SRCREV_machine_edgerouter ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_machine_beaglebone-yocto ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_machine_mpc8315e-rdb ?= "99071a599d8650b069fb8135866fca203f375350"
COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
@@ -20,8 +20,8 @@ COMPATIBLE_MACHINE_edgerouter = "edgerouter"
COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-LINUX_VERSION_genericx86 = "4.18.14"
-LINUX_VERSION_genericx86-64 = "4.18.14"
-LINUX_VERSION_edgerouter = "4.18.9"
-LINUX_VERSION_beaglebone-yocto = "4.18.9"
-LINUX_VERSION_mpc8315e-rdb = "4.18.9"
+LINUX_VERSION_genericx86 = "4.18.22"
+LINUX_VERSION_genericx86-64 = "4.18.22"
+LINUX_VERSION_edgerouter = "4.18.25"
+LINUX_VERSION_beaglebone-yocto = "4.18.25"
+LINUX_VERSION_mpc8315e-rdb = "4.18.25"
diff --git a/poky/meta/classes/clutter.bbclass b/poky/meta/classes/clutter.bbclass
index 8550363bd..5edab0e55 100644
--- a/poky/meta/classes/clutter.bbclass
+++ b/poky/meta/classes/clutter.bbclass
@@ -1,11 +1,11 @@
def get_minor_dir(v):
import re
- m = re.match("^([0-9]+)\.([0-9]+)", v)
+ m = re.match(r"^([0-9]+)\.([0-9]+)", v)
return "%s.%s" % (m.group(1), m.group(2))
def get_real_name(n):
import re
- m = re.match("^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
+ m = re.match(r"^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
return "%s" % (m.group(1))
VERMINOR = "${@get_minor_dir("${PV}")}"
diff --git a/poky/meta/classes/cmake.bbclass b/poky/meta/classes/cmake.bbclass
index fd40a9863..b364d2bc2 100644
--- a/poky/meta/classes/cmake.bbclass
+++ b/poky/meta/classes/cmake.bbclass
@@ -20,7 +20,7 @@ python() {
elif generator == "Ninja":
d.appendVar("DEPENDS", " ninja-native")
d.setVar("OECMAKE_GENERATOR_ARGS", "-G Ninja -DCMAKE_MAKE_PROGRAM=ninja")
- d.setVarFlag("do_compile", "progress", "outof:^\[(\d+)/(\d+)\]\s+")
+ d.setVarFlag("do_compile", "progress", r"outof:^\[(\d+)/(\d+)\]\s+")
else:
bb.fatal("Unknown CMake Generator %s" % generator)
}
diff --git a/poky/meta/classes/icecc.bbclass b/poky/meta/classes/icecc.bbclass
index 2b189232c..7d94525d3 100644
--- a/poky/meta/classes/icecc.bbclass
+++ b/poky/meta/classes/icecc.bbclass
@@ -38,6 +38,8 @@ BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_
ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
+HOSTTOOLS_NONFATAL += "icecc patchelf"
+
# This version can be incremented when changes are made to the environment that
# invalidate the version on the compile nodes. Changing it will cause a new
# environment to be created.
@@ -98,9 +100,11 @@ DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
def get_cross_kernel_cc(bb,d):
- kernel_cc = d.getVar('KERNEL_CC')
+ if not icecc_is_kernel(bb, d):
+ return None
# evaluate the expression by the shell if necessary
+ kernel_cc = d.getVar('KERNEL_CC')
if '`' in kernel_cc or '$(' in kernel_cc:
import subprocess
kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1]
@@ -113,38 +117,6 @@ def get_cross_kernel_cc(bb,d):
def get_icecc(d):
return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
-def create_path(compilers, bb, d):
- """
- Create Symlinks for the icecc in the staging directory
- """
- staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
- if icecc_is_kernel(bb, d):
- staging += "-kernel"
-
- #check if the icecc path is set by the user
- icecc = get_icecc(d)
-
- # Create the dir if necessary
- try:
- os.stat(staging)
- except:
- try:
- os.makedirs(staging)
- except:
- pass
-
- for compiler in compilers:
- gcc_path = os.path.join(staging, compiler)
- try:
- os.stat(gcc_path)
- except:
- try:
- os.symlink(icecc, gcc_path)
- except:
- pass
-
- return staging
-
def use_icecc(bb,d):
if d.getVar('ICECC_DISABLED') == "1":
# don't even try it, when explicitly disabled
@@ -248,12 +220,11 @@ def icecc_path(bb,d):
# don't create unnecessary directories when icecc is disabled
return
+ staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
if icecc_is_kernel(bb, d):
- return create_path( [get_cross_kernel_cc(bb,d), ], bb, d)
+ staging += "-kernel"
- else:
- prefix = d.expand('${HOST_PREFIX}')
- return create_path( [prefix+"gcc", prefix+"g++"], bb, d)
+ return staging
def icecc_get_external_tool(bb, d, tool):
external_toolchain_bindir = d.expand('${EXTERNAL_TOOLCHAIN}${bindir_cross}')
@@ -303,9 +274,9 @@ def icecc_get_and_check_tool(bb, d, tool):
# compiler environment package.
t = icecc_get_tool(bb, d, tool)
if t:
- link_path = icecc_get_tool_link(tool, d)
+ link_path = icecc_get_tool_link(t, d)
if link_path == get_icecc(d):
- bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
+ bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, link_path))
return ""
else:
return t
@@ -350,6 +321,27 @@ set_icecc_env() {
return
fi
+ ICECC_BIN="${@get_icecc(d)}"
+ if [ -z "${ICECC_BIN}" ]; then
+ bbwarn "Cannot use icecc: icecc binary not found"
+ return
+ fi
+ if [ -z "$(which patchelf patchelf-uninative)" ]; then
+ bbwarn "Cannot use icecc: patchelf not found"
+ return
+ fi
+
+ # Create symlinks to icecc in the recipe-sysroot directory
+ mkdir -p ${ICE_PATH}
+ if [ -n "${KERNEL_CC}" ]; then
+ compilers="${@get_cross_kernel_cc(bb,d)}"
+ else
+ compilers="${HOST_PREFIX}gcc ${HOST_PREFIX}g++"
+ fi
+ for compiler in $compilers; do
+ ln -sf ${ICECC_BIN} ${ICE_PATH}/$compiler
+ done
+
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
@@ -387,7 +379,7 @@ set_icecc_env() {
${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
then
touch "${ICECC_VERSION}.done"
- elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
+ elif ! wait_for_file "${ICECC_VERSION}.done" 30
then
# locking failed so wait for ${ICECC_VERSION}.done to appear
bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass
index 6718feb3a..295feb8a5 100644
--- a/poky/meta/classes/insane.bbclass
+++ b/poky/meta/classes/insane.bbclass
@@ -111,7 +111,7 @@ def package_qa_check_rpath(file,name, d, elf, messages):
phdrs = elf.run_objdump("-p", d)
import re
- rpath_re = re.compile("\s+RPATH\s+(.*)")
+ rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -140,7 +140,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
phdrs = elf.run_objdump("-p", d)
import re
- rpath_re = re.compile("\s+RPATH\s+(.*)")
+ rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -203,8 +203,8 @@ def package_qa_check_libdir(d):
# 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)
+ lib_re = re.compile(r"^/lib.+\.so(\..+)?$")
+ exec_re = re.compile(r"^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
for root, dirs, files in os.walk(pkgdest):
if root == pkgdest:
@@ -302,7 +302,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
# Check the architecture and endiannes of the binary
is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
(target_os == "linux-gnux32" or target_os == "linux-muslx32" or \
- target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+ target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
if not ((machine == elf.machine()) or is_32 or is_bpf):
package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
@@ -342,7 +342,7 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = True
import re
- textrel_re = re.compile("\s+TEXTREL\s+")
+ textrel_re = re.compile(r"\s+TEXTREL\s+")
for line in phdrs.split("\n"):
if textrel_re.match(line):
sane = False
@@ -952,7 +952,7 @@ python do_package_qa () {
import re
# The package name matches the [a-z0-9.+-]+ regular expression
- pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
+ pkgname_pattern = re.compile(r"^[a-z0-9.+-]+$")
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
taskdeps = set()
@@ -1160,7 +1160,7 @@ python () {
if pn in overrides:
msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
package_qa_handle_error("pn-overrides", msg, d)
- prog = re.compile('[A-Z]')
+ prog = re.compile(r'[A-Z]')
if prog.search(pn):
package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass
index e04d2fe00..45cb4fabc 100644
--- a/poky/meta/classes/kernel.bbclass
+++ b/poky/meta/classes/kernel.bbclass
@@ -157,8 +157,8 @@ PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-firmware-.*"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
export KBUILD_BUILD_VERSION = "1"
-export KBUILD_BUILD_USER = "oe-user"
-export KBUILD_BUILD_HOST = "oe-host"
+export KBUILD_BUILD_USER ?= "oe-user"
+export KBUILD_BUILD_HOST ?= "oe-host"
KERNEL_RELEASE ?= "${KERNEL_VERSION}"
@@ -492,7 +492,7 @@ sysroot_stage_all () {
:
}
-KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} oldnoconfig"
+KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig || oe_runmake -C ${S} O=${B} CC="${KERNEL_CC}" oldnoconfig"
python check_oldest_kernel() {
oldest_kernel = d.getVar('OLDEST_KERNEL')
@@ -682,6 +682,9 @@ kernel_do_deploy() {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
for imageType in ${KERNEL_IMAGETYPES} ; do
+ if [ "$imageType" = "fitImage" ] ; then
+ continue
+ fi
initramfs_base_name=${imageType}-${INITRAMFS_NAME}
initramfs_symlink_name=${imageType}-${INITRAMFS_LINK_NAME}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType}.initramfs $deployDir/${initramfs_base_name}.bin
diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass
index f0fbb763f..b65ff56f7 100644
--- a/poky/meta/classes/license_image.bbclass
+++ b/poky/meta/classes/license_image.bbclass
@@ -52,8 +52,8 @@ def write_license_files(d, license_manifest, pkg_dic):
except oe.license.LicenseError as exc:
bb.fatal('%s: %s' % (d.getVar('P'), exc))
else:
- pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
- pkg_dic[pkg]["LICENSES"] = re.sub(' *', ' ', pkg_dic[pkg]["LICENSES"])
+ pkg_dic[pkg]["LICENSES"] = re.sub(r'[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
+ pkg_dic[pkg]["LICENSES"] = re.sub(r' *', ' ', pkg_dic[pkg]["LICENSES"])
pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split()
if not "IMAGE_MANIFEST" in pkg_dic[pkg]:
@@ -78,7 +78,7 @@ def write_license_files(d, license_manifest, pkg_dic):
for lic in pkg_dic[pkg]["LICENSES"]:
lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY'),
pkg_dic[pkg]["PN"], "generic_%s" %
- re.sub('\+', '', lic))
+ re.sub(r'\+', '', lic))
# add explicity avoid of CLOSED license because isn't generic
if lic == "CLOSED":
continue
@@ -119,14 +119,14 @@ def write_license_files(d, license_manifest, pkg_dic):
pkg_license = os.path.join(pkg_license_dir, lic)
pkg_rootfs_license = os.path.join(pkg_rootfs_license_dir, lic)
- if re.match("^generic_.*$", lic):
+ if re.match(r"^generic_.*$", lic):
generic_lic = canonical_license(d,
- re.search("^generic_(.*)$", lic).group(1))
+ re.search(r"^generic_(.*)$", lic).group(1))
# Do not copy generic license into package if isn't
# declared into LICENSES of the package.
- if not re.sub('\+$', '', generic_lic) in \
- [re.sub('\+', '', lic) for lic in \
+ if not re.sub(r'\+$', '', generic_lic) in \
+ [re.sub(r'\+', '', lic) for lic in \
pkg_manifest_licenses]:
continue
diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass
index d1e9138c6..0fe9576b4 100644
--- a/poky/meta/classes/package.bbclass
+++ b/poky/meta/classes/package.bbclass
@@ -368,7 +368,8 @@ def append_source_info(file, sourcefile, d, fatal=True):
# is still assuming that.
debuglistoutput = '\0'.join(debugsources) + '\0'
lf = bb.utils.lockfile(sourcefile + ".lock")
- open(sourcefile, 'a').write(debuglistoutput)
+ with open(sourcefile, 'a') as sf:
+ sf.write(debuglistoutput)
bb.utils.unlockfile(lf)
diff --git a/poky/meta/classes/patch.bbclass b/poky/meta/classes/patch.bbclass
index 3e0a18182..cd241f1c8 100644
--- a/poky/meta/classes/patch.bbclass
+++ b/poky/meta/classes/patch.bbclass
@@ -153,6 +153,7 @@ python patch_do_patch() {
patch_do_patch[vardepsexclude] = "PATCHRESOLVE"
addtask patch after do_unpack
+do_patch[umask] = "022"
do_patch[dirs] = "${WORKDIR}"
do_patch[depends] = "${PATCHDEPENDENCY}"
diff --git a/poky/meta/classes/perl-version.bbclass b/poky/meta/classes/perl-version.bbclass
index fafe68a77..bafd96518 100644
--- a/poky/meta/classes/perl-version.bbclass
+++ b/poky/meta/classes/perl-version.bbclass
@@ -13,7 +13,7 @@ def get_perl_version(d):
return None
l = f.readlines();
f.close();
- r = re.compile("^version='(\d*\.\d*\.\d*)'")
+ r = re.compile(r"^version='(\d*\.\d*\.\d*)'")
for s in l:
m = r.match(s)
if m:
diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass
index 9f059a04a..edbfba5de 100644
--- a/poky/meta/classes/sstate.bbclass
+++ b/poky/meta/classes/sstate.bbclass
@@ -362,7 +362,10 @@ def sstate_installpkgdir(ss, d):
for plain in ss['plaindirs']:
workdir = d.getVar('WORKDIR')
+ sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared")
src = sstateinst + "/" + plain.replace(workdir, '')
+ if sharedworkdir in plain:
+ src = sstateinst + "/" + plain.replace(sharedworkdir, '')
dest = plain
bb.utils.mkdirhier(src)
prepdir(dest)
@@ -620,8 +623,11 @@ def sstate_package(ss, d):
os.rename(state[1], sstatebuild + state[0])
workdir = d.getVar('WORKDIR')
+ sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared")
for plain in ss['plaindirs']:
pdir = plain.replace(workdir, sstatebuild)
+ if sharedworkdir in plain:
+ pdir = plain.replace(sharedworkdir, sstatebuild)
bb.utils.mkdirhier(plain)
bb.utils.mkdirhier(pdir)
os.rename(plain, pdir)
diff --git a/poky/meta/classes/systemd.bbclass b/poky/meta/classes/systemd.bbclass
index c7b784dea..c8f4fdec8 100644
--- a/poky/meta/classes/systemd.bbclass
+++ b/poky/meta/classes/systemd.bbclass
@@ -86,7 +86,7 @@ python systemd_populate_packages() {
def systemd_generate_package_scripts(pkg):
bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
- paths_escaped = ' '.join(shlex.quote(s) for s in d.getVar('SYSTEMD_SERVICE_' + pkg, True).split())
+ paths_escaped = ' '.join(shlex.quote(s) for s in d.getVar('SYSTEMD_SERVICE_' + pkg).split())
d.setVar('SYSTEMD_SERVICE_ESCAPED_' + pkg, paths_escaped)
# Add pkg to the overrides so that it finds the SYSTEMD_SERVICE_pkg
diff --git a/poky/meta/classes/testimage.bbclass b/poky/meta/classes/testimage.bbclass
index f2ff91da9..cb8c12acc 100644
--- a/poky/meta/classes/testimage.bbclass
+++ b/poky/meta/classes/testimage.bbclass
@@ -31,6 +31,7 @@ TESTIMAGE_AUTO ??= "0"
# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login.
# Booting is handled by this class, and it's not a test in itself.
# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt.
+# TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB.
TEST_LOG_DIR ?= "${WORKDIR}/testimage"
@@ -40,31 +41,13 @@ TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
-PKGMANTESTSUITE = "\
- ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf rpm', '', d)} \
- ${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg', '', d)} \
- ${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt', '', d)} \
- "
-SYSTEMDSUITE = "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-MINTESTSUITE = "ping"
-NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
-DEVTESTSUITE = "gcc kernelmodule ldd"
-PTESTTESTSUITE = "${MINTESTSUITE} ssh scp ptest"
-
-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 ptest"
-DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${PKGMANTESTSUITE} ptest"
-DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs ${PKGMANTESTSUITE} \
- ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)} ptest gi"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} buildcpio buildlzip buildgalculator \
- connman ${DEVTESTSUITE} logrotate perl parselogs python ${PKGMANTESTSUITE} xorg ptest gi stap"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${PKGMANTESTSUITE} ptest gi"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcpio buildlzip buildgalculator \
- connman ${DEVTESTSUITE} logrotate pam parselogs perl python ${PKGMANTESTSUITE} ptest gi stap"
-DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
+BASICTESTSUITE = "\
+ ping date df ssh scp python perl gi ptest parselogs \
+ logrotate connman systemd oe_syslog pam stap ldd xorg \
+ kernelmodule gcc buildcpio buildlzip buildgalculator \
+ dnf rpm opkg apt"
+
+DEFAULT_TEST_SUITES = "${BASICTESTSUITE}"
# aarch64 has no graphics
DEFAULT_TEST_SUITES_remove_aarch64 = "xorg"
@@ -81,21 +64,20 @@ TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
TEST_QEMUBOOT_TIMEOUT ?= "1000"
TEST_TARGET ?= "qemu"
+TEST_QEMUPARAMS ?= ""
TESTIMAGEDEPENDS = ""
TESTIMAGEDEPENDS_append_qemuall = " qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_append_qemuall = " ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS_append_qemuall = " ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot package-index:do_package_index', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot package-index:do_package_index', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-c-native:do_populate_sysroot', '', d)}"
TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
TESTIMAGELOCK_qemuall = ""
-TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/"
+TESTIMAGE_DUMP_DIR ?= "${LOG_DIR}/runtime-hostdump/"
TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
@@ -219,12 +201,13 @@ def testimage_main(d):
machine = d.getVar("MACHINE")
# Get rootfs
- fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ')
- if fs in supported_fstypes]
- if not fstypes:
- bb.fatal('Unsupported image type built. Add a comptible image to '
- 'IMAGE_FSTYPES. Supported types: %s' %
- ', '.join(supported_fstypes))
+ fstypes = d.getVar('IMAGE_FSTYPES').split()
+ if d.getVar("TEST_TARGET") == "qemu":
+ fstypes = [fs for fs in fstypes if fs in supported_fstypes]
+ if not fstypes:
+ bb.fatal('Unsupported image type built. Add a comptible image to '
+ 'IMAGE_FSTYPES. Supported types: %s' %
+ ', '.join(supported_fstypes))
rootfs = '%s.%s' % (image_name, fstypes[0])
# Get tmpdir (not really used, just for compatibility)
@@ -248,13 +231,11 @@ def testimage_main(d):
boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT"))
# Get use_kvm
- qemu_use_kvm = d.getVar("QEMU_USE_KVM")
- if qemu_use_kvm and \
- (d.getVar('MACHINE') in qemu_use_kvm.split() or \
- oe.types.boolean(qemu_use_kvm) and 'x86' in machine):
- kvm = True
- else:
- kvm = False
+ kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
+
+ slirp = False
+ if d.getVar("QEMU_USE_SLIRP"):
+ slirp = True
# TODO: We use the current implementatin of qemu runner because of
# time constrains, qemu runner really needs a refactor too.
@@ -267,6 +248,8 @@ def testimage_main(d):
'boottime' : boottime,
'bootlog' : bootlog,
'kvm' : kvm,
+ 'slirp' : slirp,
+ 'dump_dir' : d.getVar("TESTIMAGE_DUMP_DIR"),
}
# TODO: Currently BBPATH is needed for custom loading of targets.
@@ -306,17 +289,12 @@ def testimage_main(d):
package_extraction(d, tc.suites)
- bootparams = None
- if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd':
- # Add systemd.log_level=debug to enable systemd debug logging
- bootparams = 'systemd.log_target=console'
-
results = None
orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception)
try:
# We need to check if runqemu ends unexpectedly
# or if the worker send us a SIGTERM
- tc.target.start(extra_bootparams=bootparams)
+ tc.target.start(params=d.getVar("TEST_QEMUPARAMS"))
results = tc.runTests()
except (RuntimeError, BlockingIOError) as err:
if isinstance(err, RuntimeError):
diff --git a/poky/meta/classes/testsdk.bbclass b/poky/meta/classes/testsdk.bbclass
index 458c3f40b..758a23ac5 100644
--- a/poky/meta/classes/testsdk.bbclass
+++ b/poky/meta/classes/testsdk.bbclass
@@ -14,218 +14,31 @@
#
# where "<image-name>" is an image like core-image-sato.
-def get_sdk_configuration(d, test_type):
- import platform
- from oeqa.utils.metadata import get_layers
- configuration = {'TEST_TYPE': test_type,
- 'MACHINE': d.getVar("MACHINE"),
- 'SDKMACHINE': d.getVar("SDKMACHINE"),
- 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"),
- 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"),
- 'STARTTIME': d.getVar("DATETIME"),
- 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
- 'LAYERS': get_layers(d.getVar("BBLAYERS"))}
- return configuration
-get_sdk_configuration[vardepsexclude] = "DATETIME"
+TESTSDK_CLASS_NAME ?= "oeqa.sdk.testsdk.TestSDK"
+TESTSDKEXT_CLASS_NAME ?= "oeqa.sdkext.testsdk.TestSDKExt"
-def get_sdk_json_result_dir(d):
- json_result_dir = os.path.join(d.getVar("LOG_DIR"), 'oeqa')
- custom_json_result_dir = d.getVar("OEQA_JSON_RESULT_DIR")
- if custom_json_result_dir:
- json_result_dir = custom_json_result_dir
- return json_result_dir
+def import_and_run(name, d):
+ import importlib
-def get_sdk_result_id(configuration):
- return '%s_%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], configuration['SDKMACHINE'], configuration['MACHINE'], configuration['STARTTIME'])
+ class_name = d.getVar(name)
+ if class_name:
+ module, cls = class_name.rsplit('.', 1)
+ m = importlib.import_module(module)
+ c = getattr(m, cls)()
+ c.run(d)
+ else:
+ bb.warn('No tests were run because %s did not define a class' % name)
-def testsdk_main(d):
- import os
- import subprocess
- import json
- import logging
-
- from bb.utils import export_proxies
- from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
- from oeqa.utils import make_logger_bitbake_compatible
-
- pn = d.getVar("PN")
- logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
-
- # sdk use network for download projects for build
- export_proxies(d)
-
- tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
- if not os.path.exists(tcname):
- bb.fatal("The toolchain %s is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' ." % tcname)
-
- tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
- test_data = json.load(open(tdname, "r"))
-
- target_pkg_manifest = OESDKTestContextExecutor._load_manifest(
- d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
- host_pkg_manifest = OESDKTestContextExecutor._load_manifest(
- d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
-
- processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
- if processes:
- try:
- import testtools, subunit
- except ImportError:
- bb.warn("Failed to import testtools or subunit, the testcases will run serially")
- processes = None
-
- sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
- bb.utils.remove(sdk_dir, True)
- bb.utils.mkdirhier(sdk_dir)
- try:
- subprocess.check_output("cd %s; %s <<EOF\n./\nY\nEOF" % (sdk_dir, tcname), shell=True)
- except subprocess.CalledProcessError as e:
- bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8"))
-
- fail = False
- sdk_envs = OESDKTestContextExecutor._get_sdk_environs(sdk_dir)
- for s in sdk_envs:
- sdk_env = sdk_envs[s]
- bb.plain("SDK testing environment: %s" % s)
- tc = OESDKTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
- sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
- host_pkg_manifest=host_pkg_manifest)
-
- try:
- tc.loadTests(OESDKTestContextExecutor.default_cases)
- except Exception as e:
- import traceback
- bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
-
- if processes:
- result = tc.runTests(processes=int(processes))
- else:
- result = tc.runTests()
-
- component = "%s %s" % (pn, OESDKTestContextExecutor.name)
- context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
- configuration = get_sdk_configuration(d, 'sdk')
- result.logDetails(get_sdk_json_result_dir(d),
- configuration,
- get_sdk_result_id(configuration))
- result.logSummary(component, context_msg)
-
- if not result.wasSuccessful():
- fail = True
-
- if fail:
- bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
-
-testsdk_main[vardepsexclude] =+ "BB_ORIGENV"
+import_and_run[vardepsexclude] = "DATETIME BB_ORIGENV"
python do_testsdk() {
- testsdk_main(d)
+ import_and_run('TESTSDK_CLASS_NAME', d)
}
addtask testsdk
do_testsdk[nostamp] = "1"
-def testsdkext_main(d):
- import os
- import json
- import subprocess
- import logging
-
- from bb.utils import export_proxies
- from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak
- from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor
-
- pn = d.getVar("PN")
- logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
-
- # extensible sdk use network
- export_proxies(d)
-
- subprocesstweak.errors_have_output()
-
- # 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'),
- d.getVar('BASE_WORKDIR')]
- os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
-
- tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
- if not os.path.exists(tcname):
- bb.fatal("The toolchain ext %s is not built. Build it before running the" \
- " tests: 'bitbake <image> -c populate_sdk_ext' ." % tcname)
-
- tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.testdata.json")
- test_data = json.load(open(tdname, "r"))
-
- target_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
- d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"))
- host_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
- d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"))
-
- sdk_dir = d.expand("${WORKDIR}/testsdkext/")
- bb.utils.remove(sdk_dir, True)
- bb.utils.mkdirhier(sdk_dir)
- try:
- subprocess.check_output("%s -y -d %s" % (tcname, sdk_dir), shell=True)
- except subprocess.CalledProcessError as e:
- msg = "Couldn't install the extensible SDK:\n%s" % e.output.decode("utf-8")
- logfn = os.path.join(sdk_dir, 'preparing_build_system.log')
- if os.path.exists(logfn):
- msg += '\n\nContents of preparing_build_system.log:\n'
- with open(logfn, 'r') as f:
- for line in f:
- msg += line
- bb.fatal(msg)
-
- fail = False
- sdk_envs = OESDKExtTestContextExecutor._get_sdk_environs(sdk_dir)
- for s in sdk_envs:
- bb.plain("Extensible SDK testing environment: %s" % s)
-
- sdk_env = sdk_envs[s]
-
- # Use our own SSTATE_DIR and DL_DIR so that updates to the eSDK come from our sstate cache
- # and we don't spend hours downloading kernels for the kernel module test
- # Abuse auto.conf since local.conf would be overwritten by the SDK
- with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f:
- f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
- f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
- f.write('INHERIT += "own-mirrors"\n')
- f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
-
- # We need to do this in case we have a minimal SDK
- subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
- sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
-
- tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
- sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
- host_pkg_manifest=host_pkg_manifest)
-
- try:
- tc.loadTests(OESDKExtTestContextExecutor.default_cases)
- except Exception as e:
- import traceback
- bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
-
- result = tc.runTests()
-
- component = "%s %s" % (pn, OESDKExtTestContextExecutor.name)
- context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
- configuration = get_sdk_configuration(d, 'sdkext')
- result.logDetails(get_sdk_json_result_dir(d),
- configuration,
- get_sdk_result_id(configuration))
- result.logSummary(component, context_msg)
-
- if not result.wasSuccessful():
- fail = True
-
- if fail:
- bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
-
-testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
-
python do_testsdkext() {
- testsdkext_main(d)
+ import_and_run('TESTSDKEXT_CLASS_NAME', d)
}
addtask testsdkext
do_testsdkext[nostamp] = "1"
diff --git a/poky/meta/classes/toolchain-scripts.bbclass b/poky/meta/classes/toolchain-scripts.bbclass
index 6d1ba6947..1a2ec4f3b 100644
--- a/poky/meta/classes/toolchain-scripts.bbclass
+++ b/poky/meta/classes/toolchain-scripts.bbclass
@@ -128,30 +128,30 @@ toolchain_create_post_relocate_script() {
touch $relocate_script
cat >> $relocate_script <<EOF
-# Source top-level SDK env scripts in case they are needed for the relocate
-# scripts.
-for env_setup_script in ${env_dir}/environment-setup-*; do
- . \$env_setup_script
- status=\$?
- if [ \$status != 0 ]; then
- echo "\$0: Failed to source \$env_setup_script with status \$status"
- exit \$status
- fi
-done
-
if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
- for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
- if [ ! -x \$s ]; then
- continue
- fi
- \$s "\$1"
- status=\$?
- if [ \$status != 0 ]; then
- echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
- exit \$status
- fi
- done
- rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
+ # Source top-level SDK env scripts in case they are needed for the relocate
+ # scripts.
+ for env_setup_script in ${env_dir}/environment-setup-*; do
+ . \$env_setup_script
+ status=\$?
+ if [ \$status != 0 ]; then
+ echo "\$0: Failed to source \$env_setup_script with status \$status"
+ exit \$status
+ fi
+
+ for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
+ if [ ! -x \$s ]; then
+ continue
+ fi
+ \$s "\$1"
+ status=\$?
+ if [ \$status != 0 ]; then
+ echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
+ exit \$status
+ fi
+ done
+ done
+ rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
fi
EOF
}
diff --git a/poky/meta/classes/update-alternatives.bbclass b/poky/meta/classes/update-alternatives.bbclass
index aa01058cf..a7f1a6fda 100644
--- a/poky/meta/classes/update-alternatives.bbclass
+++ b/poky/meta/classes/update-alternatives.bbclass
@@ -143,7 +143,7 @@ python perform_packagecopy_append () {
if not alt_link:
alt_link = "%s/%s" % (d.getVar('bindir'), alt_name)
d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link)
- if alt_link.startswith(os.path.join(d.getVar('sysconfdir', True), 'init.d')):
+ if alt_link.startswith(os.path.join(d.getVar('sysconfdir'), 'init.d')):
# Managing init scripts does not work (bug #10433), foremost
# because of a race with update-rc.d
bb.fatal("Using update-alternatives for managing SysV init scripts is not supported")
diff --git a/poky/meta/classes/useradd-staticids.bbclass b/poky/meta/classes/useradd-staticids.bbclass
index 64bf6dc82..70d59e557 100644
--- a/poky/meta/classes/useradd-staticids.bbclass
+++ b/poky/meta/classes/useradd-staticids.bbclass
@@ -59,8 +59,8 @@ def update_useradd_static_config(d):
# Paths are resolved via BBPATH.
def get_table_list(d, var, default):
files = []
- bbpath = d.getVar('BBPATH', True)
- tables = d.getVar(var, True)
+ bbpath = d.getVar('BBPATH')
+ tables = d.getVar(var)
if not tables:
tables = default
for conf_file in tables.split():
diff --git a/poky/meta/files/common-licenses/Libpng b/poky/meta/files/common-licenses/Libpng
index a9d5b031b..62ab8e48d 100644
--- a/poky/meta/files/common-licenses/Libpng
+++ b/poky/meta/files/common-licenses/Libpng
@@ -1,112 +1,134 @@
-
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-This code is released under the libpng license.
-
-libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are
-Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
- Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
-
- Simon-Pierre Cadieux
- Eric S. Raymond
- Gilles Vollant
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
+=========================================
+
+PNG Reference Library License version 2
+---------------------------------------
+
+ * Copyright (c) 1995-2018 The PNG Reference Library Authors.
+ * Copyright (c) 2018 Cosmin Truta.
+ * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
+ * Copyright (c) 1996-1997 Andreas Dilger.
+ * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+The software is supplied "as is", without warranty of any kind,
+express or implied, including, without limitation, the warranties
+of merchantability, fitness for a particular purpose, title, and
+non-infringement. In no even shall the Copyright owners, or
+anyone distributing the software, be liable for any damages or
+other liability, whether in contract, tort or otherwise, arising
+from, out of, or in connection with the software, or the use or
+other dealings in the software, even if advised of the possibility
+of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute
+this software, or portions hereof, for any purpose, without fee,
+subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you
+ use this software in a product, an acknowledgment in the product
+ documentation would be appreciated, but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+
+PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
+-----------------------------------------------------------------------
+
+libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
+Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
+derived from libpng-1.0.6, and are distributed according to the same
+disclaimer and license as libpng-1.0.6 with the following individuals
+added to the list of Contributing Authors:
+
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Mans Rullgard
+ Cosmin Truta
+ Gilles Vollant
+ James Yu
+ Mandar Sahastrabuddhe
+ Google Inc.
+ Vadim Barkov
and with the following additions to the disclaimer:
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
+ There is no warranty against interference with your enjoyment of
+ the library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is
+ with the user.
+
+Some files in the "contrib" directory and some configure-generated
+files that are distributed with libpng have other copyright owners, and
+are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
+libpng-0.96, and are distributed according to the same disclaimer and
+license as libpng-0.96, with the following individuals added to the
+list of Contributing Authors:
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
+Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
+and are distributed according to the same disclaimer and license as
+libpng-0.88, with the following individuals added to the list of
+Contributing Authors:
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
+
+Some files in the "scripts" directory have other copyright owners,
+but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing
+Authors and Group 42, Inc. disclaim all warranties, expressed or
+implied, including, without limitation, the warranties of
+merchantability and of fitness for any purpose. The Contributing
+Authors and Group 42, Inc. assume no liability for direct, indirect,
+incidental, special, exemplary, or consequential damages, which may
+result from the use of the PNG Reference Library, even if advised of
+the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
-1. The origin of this source code must not be misrepresented.
-
-2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
-
-3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
- printf("%s",png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
+ 1. The origin of this source code must not be misrepresented.
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-December 9, 2010
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+The Contributing Authors and Group 42, Inc. specifically permit,
+without fee, and encourage the use of this source code as a component
+to supporting the PNG file format in commercial products. If you use
+this source code in a product, acknowledgment is not required but would
+be appreciated.
diff --git a/poky/meta/lib/oe/types.py b/poky/meta/lib/oe/types.py
index f4017130d..1eebba5a3 100644
--- a/poky/meta/lib/oe/types.py
+++ b/poky/meta/lib/oe/types.py
@@ -156,3 +156,27 @@ def path(value, relativeto='', normalize='true', mustexist='false'):
raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT)))
return value
+
+def is_x86(arch):
+ """
+ Check whether arch is x86 or x86_64
+ """
+ if arch.startswith('x86_') or re.match('i.*86', arch):
+ return True
+ else:
+ return False
+
+def qemu_use_kvm(kvm, target_arch):
+ """
+ Enable kvm if target_arch == build_arch or both of them are x86 archs.
+ """
+
+ use_kvm = False
+ if kvm and boolean(kvm):
+ build_arch = os.uname()[4]
+ if is_x86(build_arch) and is_x86(target_arch):
+ use_kvm = True
+ elif build_arch == target_arch:
+ use_kvm = True
+ return use_kvm
+
diff --git a/poky/meta/lib/oeqa/core/target/qemu.py b/poky/meta/lib/oeqa/core/target/qemu.py
index bf3b633f0..538bf12b6 100644
--- a/poky/meta/lib/oeqa/core/target/qemu.py
+++ b/poky/meta/lib/oeqa/core/target/qemu.py
@@ -12,15 +12,14 @@ from oeqa.utils.qemurunner import QemuRunner
supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
class OEQemuTarget(OESSHTarget):
- def __init__(self, logger, ip, server_ip, timeout=300, user='root',
+ def __init__(self, logger, server_ip, timeout=300, user='root',
port=None, machine='', rootfs='', kernel='', kvm=False,
dump_dir='', dump_host_cmds='', display='', bootlog='',
tmpdir='', dir_image='', boottime=60, **kwargs):
- super(OEQemuTarget, self).__init__(logger, ip, server_ip, timeout,
+ super(OEQemuTarget, self).__init__(logger, None, server_ip, timeout,
user, port)
- self.ip = ip
self.server_ip = server_ip
self.machine = machine
self.rootfs = rootfs
diff --git a/poky/meta/lib/oeqa/manual/bsp-qemu.json b/poky/meta/lib/oeqa/manual/bsp-qemu.json
index 1260af4b4..cf51b6ab1 100644
--- a/poky/meta/lib/oeqa/manual/bsp-qemu.json
+++ b/poky/meta/lib/oeqa/manual/bsp-qemu.json
@@ -10,7 +10,7 @@
],
"execution": {
"1": {
- "action": "Build a kernel with KVM enabled \n\nIn Local.conf add \n\nQEMU_USE_KVM = \"${@ 'intel-corei7-64 intel-core2-32 qemux86 qemux86-64' if os.access('/dev/kvm', os.R_OK|os.W_OK) else '' }\" \n\n ",
+ "action": "Build a kernel with KVM enabled \n\nIn Local.conf add \n\nQEMU_USE_KVM = \"${@ '1' if os.access('/dev/kvm', os.R_OK|os.W_OK) else '0' }\" \n\n ",
"expected_results": ""
},
"2": {
@@ -219,4 +219,4 @@
"summary": "check_bash_in_image"
}
}
-] \ No newline at end of file
+]
diff --git a/poky/meta/lib/oeqa/runtime/cases/buildcpio.py b/poky/meta/lib/oeqa/runtime/cases/buildcpio.py
index 79b22d04d..a61d1e030 100644
--- a/poky/meta/lib/oeqa/runtime/cases/buildcpio.py
+++ b/poky/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -1,7 +1,7 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
-from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
@@ -13,17 +13,18 @@ class BuildCpioTest(OERuntimeTestCase):
cls.project = TargetBuildProject(cls.tc.target,
uri,
dl_dir = cls.tc.td['DL_DIR'])
- cls.project.download_archive()
@classmethod
def tearDownClass(cls):
cls.project.clean()
@OETestID(205)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['autoconf'])
def test_cpio(self):
+ self.project.download_archive()
self.project.run_configure()
self.project.run_make()
self.project.run_install()
diff --git a/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py b/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py
index 7c9d4a392..a0a003208 100644
--- a/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py
+++ b/poky/meta/lib/oeqa/runtime/cases/buildgalculator.py
@@ -1,7 +1,7 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
-from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
@@ -13,16 +13,17 @@ class GalculatorTest(OERuntimeTestCase):
cls.project = TargetBuildProject(cls.tc.target,
uri,
dl_dir = cls.tc.td['DL_DIR'])
- cls.project.download_archive()
@classmethod
def tearDownClass(cls):
cls.project.clean()
@OETestID(1526)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['autoconf'])
def test_galculator(self):
+ self.project.download_archive()
self.project.run_configure()
self.project.run_make()
diff --git a/poky/meta/lib/oeqa/runtime/cases/buildlzip.py b/poky/meta/lib/oeqa/runtime/cases/buildlzip.py
index ca3fead2e..5b455a079 100644
--- a/poky/meta/lib/oeqa/runtime/cases/buildlzip.py
+++ b/poky/meta/lib/oeqa/runtime/cases/buildlzip.py
@@ -1,7 +1,7 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
-from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
@@ -14,21 +14,19 @@ class BuildLzipTest(OERuntimeTestCase):
cls.project = TargetBuildProject(cls.tc.target,
uri,
dl_dir = cls.tc.td['DL_DIR'])
- cls.project.download_archive()
@classmethod
def tearDownClass(cls):
cls.project.clean()
@OETestID(206)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['autoconf'])
def test_lzip(self):
+ self.project.download_archive()
self.project.run_configure()
self.project.run_make()
self.project.run_install()
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/poky/meta/lib/oeqa/runtime/cases/date.py b/poky/meta/lib/oeqa/runtime/cases/date.py
index ece7338de..0887b831f 100644
--- a/poky/meta/lib/oeqa/runtime/cases/date.py
+++ b/poky/meta/lib/oeqa/runtime/cases/date.py
@@ -3,6 +3,7 @@ import re
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
+from oeqa.runtime.decorator.package import OEHasPackage
class DateTest(OERuntimeTestCase):
@@ -18,6 +19,7 @@ class DateTest(OERuntimeTestCase):
@OETestID(211)
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['coreutils', 'busybox'])
def test_date(self):
(status, output) = self.target.run('date +"%Y-%m-%d %T"')
msg = 'Failed to get initial date, output: %s' % output
diff --git a/poky/meta/lib/oeqa/runtime/cases/df.py b/poky/meta/lib/oeqa/runtime/cases/df.py
index aecc32d7c..e0b6bb839 100644
--- a/poky/meta/lib/oeqa/runtime/cases/df.py
+++ b/poky/meta/lib/oeqa/runtime/cases/df.py
@@ -1,11 +1,13 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
+from oeqa.runtime.decorator.package import OEHasPackage
class DfTest(OERuntimeTestCase):
@OETestID(234)
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['coreutils', 'busybox'])
def test_df(self):
cmd = "df / | sed -n '2p' | awk '{print $4}'"
(status,output) = self.target.run(cmd)
diff --git a/poky/meta/lib/oeqa/runtime/cases/gcc.py b/poky/meta/lib/oeqa/runtime/cases/gcc.py
index 911083156..8265c59f2 100644
--- a/poky/meta/lib/oeqa/runtime/cases/gcc.py
+++ b/poky/meta/lib/oeqa/runtime/cases/gcc.py
@@ -3,12 +3,12 @@ import os
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
-from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
class GccCompileTest(OERuntimeTestCase):
@classmethod
- def setUpClass(cls):
+ def setUp(cls):
dst = '/tmp/'
src = os.path.join(cls.tc.files_dir, 'test.c')
cls.tc.target.copyTo(src, dst)
@@ -20,14 +20,13 @@ class GccCompileTest(OERuntimeTestCase):
cls.tc.target.copyTo(src, dst)
@classmethod
- def tearDownClass(cls):
+ def tearDown(cls):
files = '/tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile'
cls.tc.target.run('rm %s' % files)
@OETestID(203)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
def test_gcc_compile(self):
status, output = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
msg = 'gcc compile failed, output: %s' % output
@@ -38,9 +37,8 @@ class GccCompileTest(OERuntimeTestCase):
self.assertEqual(status, 0, msg=msg)
@OETestID(200)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['g++'])
def test_gpp_compile(self):
status, output = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
msg = 'g++ compile failed, output: %s' % output
@@ -51,9 +49,8 @@ class GccCompileTest(OERuntimeTestCase):
self.assertEqual(status, 0, msg=msg)
@OETestID(1142)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['g++'])
def test_gpp2_compile(self):
status, output = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
msg = 'g++ compile failed, output: %s' % output
@@ -64,9 +61,9 @@ class GccCompileTest(OERuntimeTestCase):
self.assertEqual(status, 0, msg=msg)
@OETestID(204)
- @skipIfNotFeature('tools-sdk',
- 'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['gcc'])
+ @OEHasPackage(['make'])
def test_make(self):
status, output = self.target.run('cd /tmp; make -f testmakefile')
msg = 'running make failed, output %s' % output
diff --git a/poky/meta/lib/oeqa/runtime/cases/kernelmodule.py b/poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
index de1a5aa44..27a2c35b7 100644
--- a/poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
+++ b/poky/meta/lib/oeqa/runtime/cases/kernelmodule.py
@@ -4,11 +4,12 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
class KernelModuleTest(OERuntimeTestCase):
@classmethod
- def setUpClass(cls):
+ def setUp(cls):
src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c')
dst = '/tmp/hellomod.c'
cls.tc.target.copyTo(src, dst)
@@ -18,7 +19,7 @@ class KernelModuleTest(OERuntimeTestCase):
cls.tc.target.copyTo(src, dst)
@classmethod
- def tearDownClass(cls):
+ def tearDown(cls):
files = '/tmp/Makefile /tmp/hellomod.c'
cls.tc.target.run('rm %s' % files)
@@ -26,6 +27,9 @@ class KernelModuleTest(OERuntimeTestCase):
@skipIfNotFeature('tools-sdk',
'Test requires tools-sdk to be in IMAGE_FEATURES')
@OETestDepends(['gcc.GccCompileTest.test_gcc_compile'])
+ @OEHasPackage(['kernel-devsrc'])
+ @OEHasPackage(['make'])
+ @OEHasPackage(['gcc'])
def test_kernel_module(self):
cmds = [
'cd /usr/src/kernel && make scripts prepare',
diff --git a/poky/meta/lib/oeqa/runtime/cases/opkg.py b/poky/meta/lib/oeqa/runtime/cases/opkg.py
index 29e990269..693f5d68c 100644
--- a/poky/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/poky/meta/lib/oeqa/runtime/cases/opkg.py
@@ -16,7 +16,7 @@ class OpkgTest(OERuntimeTestCase):
class OpkgRepoTest(OpkgTest):
@classmethod
- def setUpClass(cls):
+ def setUp(cls):
allarchfeed = 'all'
if cls.tc.td["MULTILIB_VARIANTS"]:
allarchfeed = cls.tc.td["TUNE_PKGARCH"]
@@ -25,7 +25,7 @@ class OpkgRepoTest(OpkgTest):
cls.repo_server.start()
@classmethod
- def tearDownClass(cls):
+ def tearDown(cls):
cls.repo_server.stop()
def setup_source_config_for_package_install(self):
diff --git a/poky/meta/lib/oeqa/runtime/cases/ptest.py b/poky/meta/lib/oeqa/runtime/cases/ptest.py
index 77ae7b6b8..0972a583e 100644
--- a/poky/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/poky/meta/lib/oeqa/runtime/cases/ptest.py
@@ -5,6 +5,7 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
from oeqa.utils.logparser import Lparser, Result
class PtestRunnerTest(OERuntimeTestCase):
@@ -52,6 +53,7 @@ class PtestRunnerTest(OERuntimeTestCase):
@OETestID(1600)
@skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['ptest-runner'])
@unittest.expectedFailure
def test_ptestrunner(self):
status, output = self.target.run('which ptest-runner', 0)
diff --git a/poky/meta/lib/oeqa/runtime/cases/python.py b/poky/meta/lib/oeqa/runtime/cases/python.py
index 4419a9f63..66ab4d25f 100644
--- a/poky/meta/lib/oeqa/runtime/cases/python.py
+++ b/poky/meta/lib/oeqa/runtime/cases/python.py
@@ -1,16 +1,12 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
+from oeqa.runtime.decorator.package import OEHasPackage
class PythonTest(OERuntimeTestCase):
- @classmethod
- def setUpClass(cls):
- import unittest
- if "python3-core" not in cls.tc.image_packages:
- raise unittest.SkipTest("Python3 not on target")
-
@OETestID(965)
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['python3-core'])
def test_python3(self):
cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
status, output = self.target.run(cmd)
diff --git a/poky/meta/lib/oeqa/runtime/cases/rpm.py b/poky/meta/lib/oeqa/runtime/cases/rpm.py
index 1e5e4631d..de92157c5 100644
--- a/poky/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/poky/meta/lib/oeqa/runtime/cases/rpm.py
@@ -10,11 +10,6 @@ from oeqa.core.utils.path import findFile
class RpmBasicTest(OERuntimeTestCase):
- @classmethod
- def setUpClass(cls):
- if cls.tc.td['PACKAGE_CLASSES'].split()[0] != 'package_rpm':
- cls.skipTest('Tests require image to be build from rpm')
-
@OETestID(960)
@OEHasPackage(['rpm'])
@OETestDepends(['ssh.SSHTest.test_ssh'])
@@ -26,6 +21,9 @@ class RpmBasicTest(OERuntimeTestCase):
@OETestID(191)
@OETestDepends(['rpm.RpmBasicTest.test_rpm_help'])
def test_rpm_query(self):
+ status, output = self.target.run('ls /var/lib/rpm/')
+ if status != 0:
+ self.skipTest('No /var/lib/rpm on target')
status, output = self.target.run('rpm -q rpm')
msg = 'status and output: %s and %s' % (status, output)
self.assertEqual(status, 0, msg=msg)
@@ -34,30 +32,25 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
@classmethod
def setUpClass(cls):
- if cls.tc.td['PACKAGE_CLASSES'].split()[0] != 'package_rpm':
- cls.skipTest('Tests require image to be build from rpm')
-
pkgarch = cls.td['TUNE_PKGARCH'].replace('-', '_')
rpmdir = os.path.join(cls.tc.td['DEPLOY_DIR'], 'rpm', pkgarch)
# Pick base-passwd-doc as a test file to get installed, because it's small
# and it will always be built for standard targets
rpm_doc = 'base-passwd-doc-*.%s.rpm' % pkgarch
+ if not os.path.exists(rpmdir):
+ return
for f in fnmatch.filter(os.listdir(rpmdir), rpm_doc):
- test_file = os.path.join(rpmdir, f)
- dst = '/tmp/base-passwd-doc.rpm'
- cls.tc.target.copyTo(test_file, dst)
-
- @classmethod
- def tearDownClass(cls):
- dst = '/tmp/base-passwd-doc.rpm'
- cls.tc.target.run('rm -f %s' % dst)
+ cls.test_file = os.path.join(rpmdir, f)
+ cls.dst = '/tmp/base-passwd-doc.rpm'
@OETestID(192)
- @OETestDepends(['rpm.RpmBasicTest.test_rpm_help'])
+ @OETestDepends(['rpm.RpmBasicTest.test_rpm_query'])
def test_rpm_install(self):
+ self.tc.target.copyTo(self.test_file, self.dst)
status, output = self.target.run('rpm -ivh /tmp/base-passwd-doc.rpm')
msg = 'Failed to install base-passwd-doc package: %s' % output
self.assertEqual(status, 0, msg=msg)
+ self.tc.target.run('rm -f %s' % self.dst)
@OETestID(194)
@OETestDepends(['rpm.RpmInstallRemoveTest.test_rpm_install'])
@@ -118,6 +111,8 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
msg = 'Failed to find database files under /var/lib/rpm/ as __db.xxx'
self.assertEqual(0, status, msg=msg)
+ self.tc.target.copyTo(self.test_file, self.dst)
+
# Remove the package just in case
self.target.run('rpm -e base-passwd-doc')
@@ -131,6 +126,8 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
msg = 'Failed to remove base-passwd-doc package. Reason: {}'.format(output)
self.assertEqual(0, status, msg=msg)
+ self.tc.target.run('rm -f %s' % self.dst)
+
# if using systemd this should ensure all entries are flushed to /var
status, output = self.target.run("journalctl --sync")
# Get the amount of entries in the log file
diff --git a/poky/meta/lib/oeqa/runtime/cases/scp.py b/poky/meta/lib/oeqa/runtime/cases/scp.py
index f488a6175..8f895da95 100644
--- a/poky/meta/lib/oeqa/runtime/cases/scp.py
+++ b/poky/meta/lib/oeqa/runtime/cases/scp.py
@@ -4,6 +4,7 @@ from tempfile import mkstemp
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
+from oeqa.runtime.decorator.package import OEHasPackage
class ScpTest(OERuntimeTestCase):
@@ -20,6 +21,7 @@ class ScpTest(OERuntimeTestCase):
@OETestID(220)
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['openssh-scp', 'dropbear'])
def test_scp_file(self):
dst = '/tmp/test_scp_file'
diff --git a/poky/meta/lib/oeqa/runtime/cases/ssh.py b/poky/meta/lib/oeqa/runtime/cases/ssh.py
index eca167969..0b1ea7bcc 100644
--- a/poky/meta/lib/oeqa/runtime/cases/ssh.py
+++ b/poky/meta/lib/oeqa/runtime/cases/ssh.py
@@ -1,11 +1,13 @@
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
+from oeqa.runtime.decorator.package import OEHasPackage
class SSHTest(OERuntimeTestCase):
@OETestID(224)
@OETestDepends(['ping.PingTest.test_ping'])
+ @OEHasPackage(['dropbear', 'openssh-sshd'])
def test_ssh(self):
(status, output) = self.target.run('uname -a')
self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
diff --git a/poky/meta/lib/oeqa/runtime/cases/stap.py b/poky/meta/lib/oeqa/runtime/cases/stap.py
index 96e197a2d..c492caffd 100644
--- a/poky/meta/lib/oeqa/runtime/cases/stap.py
+++ b/poky/meta/lib/oeqa/runtime/cases/stap.py
@@ -4,17 +4,18 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
class StapTest(OERuntimeTestCase):
@classmethod
- def setUpClass(cls):
+ def setUp(cls):
src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp')
dst = '/tmp/hello.stp'
cls.tc.target.copyTo(src, dst)
@classmethod
- def tearDownClass(cls):
+ def tearDown(cls):
files = '/tmp/hello.stp'
cls.tc.target.run('rm %s' % files)
@@ -22,6 +23,7 @@ class StapTest(OERuntimeTestCase):
@skipIfNotFeature('tools-profile',
'Test requires tools-profile to be in IMAGE_FEATURES')
@OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module'])
+ @OEHasPackage(['systemtap'])
def test_stap(self):
cmds = [
'cd /usr/src/kernel && make scripts prepare',
diff --git a/poky/meta/lib/oeqa/runtime/cases/xorg.py b/poky/meta/lib/oeqa/runtime/cases/xorg.py
index 2124813e3..82521c69a 100644
--- a/poky/meta/lib/oeqa/runtime/cases/xorg.py
+++ b/poky/meta/lib/oeqa/runtime/cases/xorg.py
@@ -2,6 +2,7 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID
from oeqa.core.decorator.data import skipIfNotFeature
+from oeqa.runtime.decorator.package import OEHasPackage
class XorgTest(OERuntimeTestCase):
@@ -9,6 +10,7 @@ class XorgTest(OERuntimeTestCase):
@skipIfNotFeature('x11-base',
'Test requires x11 to be in IMAGE_FEATURES')
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['xserver-nodm-init'])
def test_xorg_running(self):
cmd ='%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps']
status, output = self.target.run(cmd)
diff --git a/poky/meta/lib/oeqa/runtime/context.py b/poky/meta/lib/oeqa/runtime/context.py
index a7f382399..db0482d68 100644
--- a/poky/meta/lib/oeqa/runtime/context.py
+++ b/poky/meta/lib/oeqa/runtime/context.py
@@ -49,7 +49,6 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
default_manifest = 'data/manifest'
default_server_ip = '192.168.7.1'
default_target_ip = '192.168.7.2'
- default_host_dumper_dir = '/tmp/oe-saved-tests'
default_extract_dir = 'packages/extracted'
def register_commands(self, logger, subparsers):
@@ -71,9 +70,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
% self.default_server_ip)
runtime_group.add_argument('--host-dumper-dir', action='store',
- default=self.default_host_dumper_dir,
- help="Directory where host status is dumped, if tests fails, default: %s" \
- % self.default_host_dumper_dir)
+ help="Directory where host status is dumped, if tests fails")
runtime_group.add_argument('--packages-manifest', action='store',
default=self.default_manifest,
@@ -101,7 +98,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
if target_type == 'simpleremote':
target = OESSHTarget(logger, target_ip, server_ip, **kwargs)
elif target_type == 'qemu':
- target = OEQemuTarget(logger, target_ip, server_ip, **kwargs)
+ target = OEQemuTarget(logger, server_ip, **kwargs)
else:
# XXX: This code uses the old naming convention for controllers and
# targets, the idea it is to leave just targets as the controller
diff --git a/poky/meta/lib/oeqa/sdk/testsdk.py b/poky/meta/lib/oeqa/sdk/testsdk.py
new file mode 100644
index 000000000..632ac50d0
--- /dev/null
+++ b/poky/meta/lib/oeqa/sdk/testsdk.py
@@ -0,0 +1,142 @@
+# Copyright 2018 by Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
+
+class TestSDKBase(object):
+ @staticmethod
+ def get_sdk_configuration(d, test_type):
+ import platform
+ import oe.lsb
+ from oeqa.utils.metadata import get_layers
+ configuration = {'TEST_TYPE': test_type,
+ 'MACHINE': d.getVar("MACHINE"),
+ 'SDKMACHINE': d.getVar("SDKMACHINE"),
+ 'IMAGE_BASENAME': d.getVar("IMAGE_BASENAME"),
+ 'IMAGE_PKGTYPE': d.getVar("IMAGE_PKGTYPE"),
+ 'STARTTIME': d.getVar("DATETIME"),
+ 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
+ 'LAYERS': get_layers(d.getVar("BBLAYERS"))}
+ return configuration
+
+ @staticmethod
+ def get_sdk_json_result_dir(d):
+ json_result_dir = os.path.join(d.getVar("LOG_DIR"), 'oeqa')
+ custom_json_result_dir = d.getVar("OEQA_JSON_RESULT_DIR")
+ if custom_json_result_dir:
+ json_result_dir = custom_json_result_dir
+ return json_result_dir
+
+ @staticmethod
+ def get_sdk_result_id(configuration):
+ return '%s_%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], configuration['SDKMACHINE'], configuration['MACHINE'], configuration['STARTTIME'])
+
+class TestSDK(TestSDKBase):
+ context_executor_class = OESDKTestContextExecutor
+ context_class = OESDKTestContext
+ test_type = 'sdk'
+
+ def get_tcname(self, d):
+ """
+ Get the name of the SDK file
+ """
+ return d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
+
+ def extract_sdk(self, tcname, sdk_dir, d):
+ """
+ Extract the SDK to the specified location
+ """
+ import subprocess
+
+ try:
+ subprocess.check_output("cd %s; %s <<EOF\n./\nY\nEOF" % (sdk_dir, tcname), shell=True)
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8"))
+
+ def setup_context(self, d):
+ """
+ Return a dictionary of additional arguments that should be passed to
+ the context_class on construction
+ """
+ return dict()
+
+ def run(self, d):
+
+ import os
+ import subprocess
+ import json
+ import logging
+
+ from bb.utils import export_proxies
+ from oeqa.utils import make_logger_bitbake_compatible
+
+ pn = d.getVar("PN")
+ logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
+
+ # sdk use network for download projects for build
+ export_proxies(d)
+
+ tcname = self.get_tcname(d)
+
+ if not os.path.exists(tcname):
+ bb.fatal("The toolchain %s is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' ." % tcname)
+
+ tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.testdata.json")
+ test_data = json.load(open(tdname, "r"))
+
+ target_pkg_manifest = self.context_executor_class._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"))
+ host_pkg_manifest = self.context_executor_class._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
+
+ processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
+ if processes:
+ try:
+ import testtools, subunit
+ except ImportError:
+ bb.warn("Failed to import testtools or subunit, the testcases will run serially")
+ processes = None
+
+ sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
+ bb.utils.remove(sdk_dir, True)
+ bb.utils.mkdirhier(sdk_dir)
+
+ context_args = self.setup_context(d)
+
+ self.extract_sdk(tcname, sdk_dir, d)
+
+ fail = False
+ sdk_envs = self.context_executor_class._get_sdk_environs(sdk_dir)
+ for s in sdk_envs:
+ sdk_env = sdk_envs[s]
+ bb.plain("SDK testing environment: %s" % s)
+ tc = self.context_class(td=test_data, logger=logger, sdk_dir=sdk_dir,
+ sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
+ host_pkg_manifest=host_pkg_manifest, **context_args)
+
+ try:
+ tc.loadTests(self.context_executor_class.default_cases)
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ if processes:
+ result = tc.runTests(processes=int(processes))
+ else:
+ result = tc.runTests()
+
+ component = "%s %s" % (pn, self.context_executor_class.name)
+ context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
+ configuration = self.get_sdk_configuration(d, self.test_type)
+ result.logDetails(self.get_sdk_json_result_dir(d),
+ configuration,
+ self.get_sdk_result_id(configuration))
+ result.logSummary(component, context_msg)
+
+ if not result.wasSuccessful():
+ fail = True
+
+ if fail:
+ bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
+
+
diff --git a/poky/meta/lib/oeqa/sdkext/testsdk.py b/poky/meta/lib/oeqa/sdkext/testsdk.py
new file mode 100644
index 000000000..57b2e0e03
--- /dev/null
+++ b/poky/meta/lib/oeqa/sdkext/testsdk.py
@@ -0,0 +1,104 @@
+# Copyright 2018 by Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.sdk.testsdk import TestSDKBase
+
+class TestSDKExt(TestSDKBase):
+ def run(self, d):
+ import os
+ import json
+ import subprocess
+ import logging
+
+ from bb.utils import export_proxies
+ from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak
+ from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor
+
+ pn = d.getVar("PN")
+ logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
+
+ # extensible sdk use network
+ export_proxies(d)
+
+ subprocesstweak.errors_have_output()
+
+ # 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'),
+ d.getVar('BASE_WORKDIR')]
+ os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
+
+ tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
+ if not os.path.exists(tcname):
+ bb.fatal("The toolchain ext %s is not built. Build it before running the" \
+ " tests: 'bitbake <image> -c populate_sdk_ext' ." % tcname)
+
+ tdname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.testdata.json")
+ test_data = json.load(open(tdname, "r"))
+
+ target_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"))
+ host_pkg_manifest = OESDKExtTestContextExecutor._load_manifest(
+ d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"))
+
+ sdk_dir = d.expand("${WORKDIR}/testsdkext/")
+ bb.utils.remove(sdk_dir, True)
+ bb.utils.mkdirhier(sdk_dir)
+ try:
+ subprocess.check_output("%s -y -d %s" % (tcname, sdk_dir), shell=True)
+ except subprocess.CalledProcessError as e:
+ msg = "Couldn't install the extensible SDK:\n%s" % e.output.decode("utf-8")
+ logfn = os.path.join(sdk_dir, 'preparing_build_system.log')
+ if os.path.exists(logfn):
+ msg += '\n\nContents of preparing_build_system.log:\n'
+ with open(logfn, 'r') as f:
+ for line in f:
+ msg += line
+ bb.fatal(msg)
+
+ fail = False
+ sdk_envs = OESDKExtTestContextExecutor._get_sdk_environs(sdk_dir)
+ for s in sdk_envs:
+ bb.plain("Extensible SDK testing environment: %s" % s)
+
+ sdk_env = sdk_envs[s]
+
+ # Use our own SSTATE_DIR and DL_DIR so that updates to the eSDK come from our sstate cache
+ # and we don't spend hours downloading kernels for the kernel module test
+ # Abuse auto.conf since local.conf would be overwritten by the SDK
+ with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f:
+ f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
+ f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
+ f.write('INHERIT += "own-mirrors"\n')
+ f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
+
+ # We need to do this in case we have a minimal SDK
+ subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \
+ sdk_env, cwd=sdk_dir, shell=True, stderr=subprocess.STDOUT)
+
+ tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
+ sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
+ host_pkg_manifest=host_pkg_manifest)
+
+ try:
+ tc.loadTests(OESDKExtTestContextExecutor.default_cases)
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ result = tc.runTests()
+
+ component = "%s %s" % (pn, OESDKExtTestContextExecutor.name)
+ context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
+ configuration = self.get_sdk_configuration(d, 'sdkext')
+ result.logDetails(self.get_sdk_json_result_dir(d),
+ configuration,
+ self.get_sdk_result_id(configuration))
+ result.logSummary(component, context_msg)
+
+ if not result.wasSuccessful():
+ fail = True
+
+ if fail:
+ bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
+
diff --git a/poky/meta/lib/oeqa/selftest/cases/eSDK.py b/poky/meta/lib/oeqa/selftest/cases/eSDK.py
index d7aef9399..8eb6ec660 100644
--- a/poky/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/poky/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -2,6 +2,7 @@ import tempfile
import shutil
import os
import glob
+import time
from oeqa.core.decorator.oeid import OETestID
from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
@@ -31,7 +32,7 @@ class oeSDKExtSelfTest(OESelftestTestCase):
if not 'shell' in options:
options['shell'] = True
- runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
+ runCmd("cd %s; unset BBPATH; unset BUILDDIR; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
@staticmethod
def generate_eSDK(image):
@@ -95,6 +96,11 @@ SSTATE_MIRRORS = "file://.* file://%s/PATH"
@classmethod
def tearDownClass(cls):
+ for i in range(0, 10):
+ if os.path.exists(os.path.join(cls.tmpdir_eSDKQA, 'bitbake.lock')):
+ time.sleep(1)
+ else:
+ break
cls.tmpdirobj.cleanup()
super().tearDownClass()
diff --git a/poky/meta/lib/oeqa/selftest/cases/runqemu.py b/poky/meta/lib/oeqa/selftest/cases/runqemu.py
index 4e35bb97e..f69d4706a 100644
--- a/poky/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/poky/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -5,6 +5,7 @@
import re
import tempfile
import time
+import oe.types
from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
from oeqa.core.decorator.oeid import OETestID
@@ -22,6 +23,10 @@ class RunqemuTests(OESelftestTestCase):
self.fstypes = "ext4 iso hddimg wic.vmdk wic.qcow2 wic.vdi"
self.cmd_common = "runqemu nographic"
+ kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), 'x86_64')
+ if kvm:
+ self.cmd_common += " kvm"
+
self.write_config(
"""
MACHINE = "%s"
diff --git a/poky/meta/lib/oeqa/targetcontrol.py b/poky/meta/lib/oeqa/targetcontrol.py
index 59a9c35a0..1868ad320 100644
--- a/poky/meta/lib/oeqa/targetcontrol.py
+++ b/poky/meta/lib/oeqa/targetcontrol.py
@@ -107,13 +107,9 @@ class QemuTarget(BaseTarget):
dump_target_cmds = d.getVar("testimage_dump_target")
dump_host_cmds = d.getVar("testimage_dump_host")
dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
- qemu_use_kvm = d.getVar("QEMU_USE_KVM")
- if qemu_use_kvm and \
- (oe.types.boolean(qemu_use_kvm) and "x86" in d.getVar("MACHINE") or \
- d.getVar("MACHINE") in qemu_use_kvm.split()):
- use_kvm = True
- else:
- use_kvm = False
+ if not dump_dir:
+ dump_dir = os.path.join(d.getVar('LOG_DIR'), 'runtime-hostdump')
+ use_kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
# Log QemuRunner log output to a file
import oe.path
@@ -196,7 +192,7 @@ class QemuTarget(BaseTarget):
else:
raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn)
- def run_serial(self, command, timeout=5):
+ def run_serial(self, command, timeout=60):
return self.runner.run_serial(command, timeout=timeout)
diff --git a/poky/meta/lib/oeqa/utils/buildproject.py b/poky/meta/lib/oeqa/utils/buildproject.py
index 88e7b7fe2..01a803ab6 100644
--- a/poky/meta/lib/oeqa/utils/buildproject.py
+++ b/poky/meta/lib/oeqa/utils/buildproject.py
@@ -25,9 +25,12 @@ class BuildProject(metaclass=ABCMeta):
self.fname = foldername
else:
self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive)
+ self.needclean = False
# Download self.archive to self.localarchive
def _download_archive(self):
+
+ self.needclean = True
if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)):
shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive)
return
@@ -52,5 +55,7 @@ class BuildProject(metaclass=ABCMeta):
return self._run('cd %s; make install %s' % (self.targetdir, install_args))
def clean(self):
+ if not self.needclean:
+ return
self._run('rm -rf %s' % self.targetdir)
subprocess.check_call('rm -f %s' % self.localarchive, shell=True)
diff --git a/poky/meta/lib/oeqa/utils/dump.py b/poky/meta/lib/oeqa/utils/dump.py
index 5a7edc1a8..79c22b75c 100644
--- a/poky/meta/lib/oeqa/utils/dump.py
+++ b/poky/meta/lib/oeqa/utils/dump.py
@@ -12,7 +12,7 @@ class BaseDumper(object):
self.cmds = []
# Some testing doesn't inherit testimage, so it is needed
# to set some defaults.
- self.parent_dir = parent_dir or "/tmp/oe-saved-tests"
+ self.parent_dir = parent_dir
dft_cmds = """ top -bn1
iostat -x -z -N -d -p ALL 20 2
ps -ef
diff --git a/poky/meta/lib/oeqa/utils/qemurunner.py b/poky/meta/lib/oeqa/utils/qemurunner.py
index c7442a257..cc95dc299 100644
--- a/poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/poky/meta/lib/oeqa/utils/qemurunner.py
@@ -345,6 +345,7 @@ class QemuRunner:
else:
self.logger.debug("Couldn't login into serial console"
" as root using blank password")
+ self.logger.debug("The output:\n%s" % output)
except:
self.logger.debug("Serial console failed while trying to login")
return True
@@ -420,7 +421,7 @@ class QemuRunner:
return True
return False
- def run_serial(self, command, raw=False, timeout=5):
+ def run_serial(self, command, raw=False, timeout=60):
# We assume target system have echo to get command status
if not raw:
command = "%s; echo $?\n" % command
diff --git a/poky/meta/lib/oeqa/utils/qemutinyrunner.py b/poky/meta/lib/oeqa/utils/qemutinyrunner.py
index 63b5d1648..5aa99d068 100644
--- a/poky/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/poky/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -108,7 +108,7 @@ class QemuTinyRunner(QemuRunner):
return self.is_alive()
- def run_serial(self, command, timeout=5):
+ def run_serial(self, command, timeout=60):
self.server_socket.sendall(command+'\n')
data = ''
status = 0
diff --git a/poky/meta/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch b/poky/meta/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch
new file mode 100644
index 000000000..e01fcdffb
--- /dev/null
+++ b/poky/meta/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch
@@ -0,0 +1,34 @@
+From 4e9d9358e0cda6d01020005eb6343e3b69f7201a Mon Sep 17 00:00:00 2001
+From: Cao jin <caoj.fnst@cn.fujitsu.com>
+Date: Tue, 3 Jul 2018 18:51:13 +0800
+Subject: [PATCH] grub-setup: Debug message cleanup
+
+Variable "root" is initialized after root device probing and is null in
+current place, so, drop it.
+
+Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=4e9d9358e0cda6d01020005eb6343e3b69f7201a]
+
+ util/setup.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/util/setup.c b/util/setup.c
+index 80363075d..9c1e1b7da 100644
+--- a/util/setup.c
++++ b/util/setup.c
+@@ -305,9 +305,8 @@ SETUP (const char *dir,
+ bl.first_block = (struct grub_boot_blocklist *) (core_img
+ + GRUB_DISK_SECTOR_SIZE
+ - sizeof (*bl.block));
+- grub_util_info ("root is `%s', dest is `%s'", root, dest);
+
+- grub_util_info ("Opening dest");
++ grub_util_info ("Opening dest `%s'", dest);
+ dest_dev = grub_device_open (dest);
+ if (! dest_dev)
+ grub_util_error ("%s", grub_errmsg);
+--
+2.17.2 (Apple Git-113)
+
diff --git a/poky/meta/recipes-bsp/grub/grub2.inc b/poky/meta/recipes-bsp/grub/grub2.inc
index 325eca25b..8e0f86217 100644
--- a/poky/meta/recipes-bsp/grub/grub2.inc
+++ b/poky/meta/recipes-bsp/grub/grub2.inc
@@ -20,6 +20,7 @@ SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://fix.build.with.gcc-7.patch \
file://gcc8.patch \
file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \
+ file://0001-grub-setup-Debug-message-cleanup.patch \
"
SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
diff --git a/poky/meta/recipes-core/meta/dummy-sdk-package.inc b/poky/meta/recipes-core/meta/dummy-sdk-package.inc
index eafcb823a..4d653706b 100644
--- a/poky/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/poky/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -20,7 +20,7 @@ PR[vardeps] += "DUMMYPROVIDES"
python populate_packages_prepend() {
p = d.getVar("PN")
d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}")
- #d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
- #d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
+ d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
+ d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
}
diff --git a/poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index f5bcb8254..6a8748acd 100644
--- a/poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -2,7 +2,27 @@ DUMMYARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
DUMMYPROVIDES = "\
nativesdk-perl \
- nativesdk-perl-module-file-path"
+ nativesdk-libxml-parser-perl \
+ nativesdk-perl-module-bytes \
+ nativesdk-perl-module-carp \
+ nativesdk-perl-module-constant \
+ nativesdk-perl-module-data-dumper \
+ nativesdk-perl-module-errno \
+ nativesdk-perl-module-exporter \
+ nativesdk-perl-module-file-basename \
+ nativesdk-perl-module-file-compare \
+ nativesdk-perl-module-file-copy \
+ nativesdk-perl-module-file-find \
+ nativesdk-perl-module-file-glob \
+ nativesdk-perl-module-file-path \
+ nativesdk-perl-module-file-stat \
+ nativesdk-perl-module-getopt-long \
+ nativesdk-perl-module-io-file \
+ nativesdk-perl-module-posix \
+ nativesdk-perl-module-thread-queue \
+ nativesdk-perl-module-threads \
+ /usr/bin/perl \
+ "
PR = "r2"
diff --git a/poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
index 11a727d48..b891efa5e 100644
--- a/poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
+++ b/poky/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -4,7 +4,6 @@ DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
DUMMYPROVIDES = "\
/bin/bash \
/usr/bin/env \
- /usr/bin/perl \
pkgconfig \
libGL.so()(64bit) \
libGL.so \
diff --git a/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
index 714d15d8b..edf07c4a2 100644
--- a/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
+++ b/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -1,6 +1,33 @@
DUMMYARCH = "sdk-provides-dummy-target"
DUMMYPROVIDES = "\
+ busybox \
+ coreutils \
+ bash \
+ perl \
+ perl-module-re \
+ perl-module-strict \
+ perl-module-vars \
+ perl-module-text-wrap \
+ libxml-parser-perl \
+ perl-module-bytes \
+ perl-module-carp \
+ perl-module-constant \
+ perl-module-data-dumper \
+ perl-module-errno \
+ perl-module-exporter \
+ perl-module-file-basename \
+ perl-module-file-compare \
+ perl-module-file-copy \
+ perl-module-file-find \
+ perl-module-file-glob \
+ perl-module-file-path \
+ perl-module-file-stat \
+ perl-module-getopt-long \
+ perl-module-io-file \
+ perl-module-posix \
+ perl-module-thread-queue \
+ perl-module-threads \
/bin/sh \
/bin/bash \
/usr/bin/env \
diff --git a/poky/meta/recipes-core/systemd/systemd-boot_239.bb b/poky/meta/recipes-core/systemd/systemd-boot_239.bb
index 7fe420c26..2450d52cb 100644
--- a/poky/meta/recipes-core/systemd/systemd-boot_239.bb
+++ b/poky/meta/recipes-core/systemd/systemd-boot_239.bb
@@ -6,6 +6,7 @@ DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
SRC_URI += "file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
file://0006-remove-nobody-user-group-checking.patch \
file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
+ file://0001-meson-rename-Ddebug-to-Ddebug-extra.patch \
"
inherit meson pkgconfig gettext
@@ -28,7 +29,7 @@ EXTRA_OEMESON += "-Defi=true \
python __anonymous () {
import re
target = d.getVar('TARGET_ARCH')
- prefix = "" if d.getVar('EFI_PROVIDER', True) == "systemd-boot" else "systemd-"
+ prefix = "" if d.getVar('EFI_PROVIDER') == "systemd-boot" else "systemd-"
if target == "x86_64":
systemdimage = prefix + "bootx64.efi"
else:
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch b/poky/meta/recipes-core/systemd/systemd/0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch
new file mode 100644
index 000000000..7fd6d0188
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch
@@ -0,0 +1,36 @@
+From 1e190dfd5bb95036f937ef1dc46f43eb0a146612 Mon Sep 17 00:00:00 2001
+From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
+Date: Fri, 17 Aug 2018 21:31:05 +0200
+Subject: [PATCH] Revert "sysctl.d: request ECN on both in and outgoing
+ connections"
+
+Turning on ECN still causes slow or broken network on linux. Our tcp
+is not yet ready for wide spread use of ECN.
+
+This reverts commit 919472741dba6ad0a3f6c2b76d390a02d0e2fdc3.
+
+https://github.com/systemd/systemd/issues/9748
+
+Upstream-Status: Backport
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ sysctl.d/50-default.conf | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/sysctl.d/50-default.conf b/sysctl.d/50-default.conf
+index b67ae87ca6b7..e263cf06284a 100644
+--- a/sysctl.d/50-default.conf
++++ b/sysctl.d/50-default.conf
+@@ -33,9 +33,6 @@ net.ipv4.conf.all.promote_secondaries = 1
+ # Fair Queue CoDel packet scheduler to fight bufferbloat
+ net.core.default_qdisc = fq_codel
+
+-# Request Explicit Congestion Notification (ECN) on both in and outgoing connections
+-net.ipv4.tcp_ecn = 1
+-
+ # Enable hard and soft link protection
+ fs.protected_hardlinks = 1
+ fs.protected_symlinks = 1
+--
+2.7.4
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-meson-rename-Ddebug-to-Ddebug-extra.patch b/poky/meta/recipes-core/systemd/systemd/0001-meson-rename-Ddebug-to-Ddebug-extra.patch
new file mode 100644
index 000000000..d6d305cb3
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-meson-rename-Ddebug-to-Ddebug-extra.patch
@@ -0,0 +1,45 @@
+From 8f6b442a78d0b485f044742ad90b2e8271b4e68e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sun, 19 Aug 2018 19:11:30 +0200
+Subject: [PATCH] meson: rename -Ddebug to -Ddebug-extra
+
+Meson added -Doptimization and -Ddebug options, which obviously causes
+a conflict with our -Ddebug options. Let's rename it.
+
+Fixes #9883.
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 2 +-
+ meson_options.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index f79ac4b12..2209c935a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -763,7 +763,7 @@ substs.set('DEBUGTTY', get_option('debug-tty'))
+
+ enable_debug_hashmap = false
+ enable_debug_mmap_cache = false
+-foreach name : get_option('debug')
++foreach name : get_option('debug-extra')
+ if name == 'hashmap'
+ enable_debug_hashmap = true
+ elif name == 'mmap-cache'
+diff --git a/meson_options.txt b/meson_options.txt
+index e3140c8c1..7b1f61bf4 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -45,7 +45,7 @@ option('debug-shell', type : 'string', value : '/bin/sh',
+ description : 'path to debug shell binary')
+ option('debug-tty', type : 'string', value : '/dev/tty9',
+ description : 'specify the tty device for debug shell')
+-option('debug', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [],
++option('debug-extra', type : 'array', choices : ['hashmap', 'mmap-cache'], value : [],
+ description : 'enable extra debugging')
+ option('memory-accounting-default', type : 'boolean',
+ description : 'enable MemoryAccounting= by default')
+--
+2.17.1
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch b/poky/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch
new file mode 100644
index 000000000..0538c7bbc
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch
@@ -0,0 +1,31 @@
+From bfc4183ea995f1c211385d066cdb1fe9ce89f621 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 16 Dec 2018 20:53:38 -0800
+Subject: [PATCH 1/2] sysctl: Don't pass null directive argument to '%s'
+
+value pointer here is always NULL but subsequent use of that pointer
+with a %s format will always be NULL, printing p instead would be a
+valid string
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/11179]
+ src/sysctl/sysctl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
+index 1cfe51018..c67d79032 100644
+--- a/src/sysctl/sysctl.c
++++ b/src/sysctl/sysctl.c
+@@ -115,7 +115,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign
+
+ value = strchr(p, '=');
+ if (!value) {
+- log_error("Line is not an assignment at '%s:%u': %s", path, c, value);
++ log_error("Line is not an assignment at '%s:%u': %s", path, c, p);
+
+ if (r == 0)
+ r = -EINVAL;
+--
+2.20.1
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch b/poky/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch
new file mode 100644
index 000000000..8d395c2fa
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0001-timesync-changes-type-of-drift_freq-to-int64_t.patch
@@ -0,0 +1,49 @@
+Backport patch to fix systemd build failure on x32.
+
+Upstream-Status: Backport [https://github.com/systemd/systemd/commit/75ca162]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+From 75ca1621db4647a4d62d7873cd6715e28fe0f9fa Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Sat, 23 Jun 2018 09:41:55 +0900
+Subject: [PATCH] timesync: changes type of drift_freq to int64_t
+
+drift_freq is used for storing timex.freq, and is a 64bit integer.
+To support x32 ABI, this changes the type of drift_freq to int64_t.
+
+Fixes #9387.
+---
+ src/timesync/timesyncd-manager.c | 2 +-
+ src/timesync/timesyncd-manager.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
+index 2b731af9e..404a2b189 100644
+--- a/src/timesync/timesyncd-manager.c
++++ b/src/timesync/timesyncd-manager.c
+@@ -604,7 +604,7 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
+ m->dest_time = *recv_time;
+ m->spike = spike;
+
+- log_debug("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+"PRI_TIMEX"ppm%s",
++ log_debug("interval/delta/delay/jitter/drift " USEC_FMT "s/%+.3fs/%.3fs/%.3fs/%+"PRIi64"ppm%s",
+ m->poll_interval_usec / USEC_PER_SEC, offset, delay, m->samples_jitter, m->drift_freq / 65536,
+ spike ? " (ignored)" : "");
+
+diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h
+index d8d97cc1e..18347416d 100644
+--- a/src/timesync/timesyncd-manager.h
++++ b/src/timesync/timesyncd-manager.h
+@@ -79,7 +79,7 @@ struct Manager {
+ /* last change */
+ bool jumped;
+ bool sync;
+- long drift_freq;
++ int64_t drift_freq;
+
+ /* watch for time changes */
+ sd_event_source *event_clock_watch;
+--
+2.17.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0002-core-Fix-use-after-free-case-in-load_from_path.patch b/poky/meta/recipes-core/systemd/systemd/0002-core-Fix-use-after-free-case-in-load_from_path.patch
new file mode 100644
index 000000000..4da96e292
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0002-core-Fix-use-after-free-case-in-load_from_path.patch
@@ -0,0 +1,43 @@
+From cb67aebd63d9f0077cbf3e769f0b223c5bba20ac Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 16 Dec 2018 20:58:35 -0800
+Subject: [PATCH 2/2] core: Fix use after free case in load_from_path()
+
+ensure that mfree() on filename is called after the logging function
+which uses the string pointed by filename
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/11179]
+ src/core/load-fragment.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
+index fc5644f48..da585786e 100644
+--- a/src/core/load-fragment.c
++++ b/src/core/load-fragment.c
+@@ -4531,7 +4531,6 @@ static int load_from_path(Unit *u, const char *path) {
+ r = open_follow(&filename, &f, symlink_names, &id);
+ if (r >= 0)
+ break;
+- filename = mfree(filename);
+
+ /* ENOENT means that the file is missing or is a dangling symlink.
+ * ENOTDIR means that one of paths we expect to be is a directory
+@@ -4540,9 +4539,12 @@ static int load_from_path(Unit *u, const char *path) {
+ */
+ if (r == -EACCES)
+ log_debug_errno(r, "Cannot access \"%s\": %m", filename);
+- else if (!IN_SET(r, -ENOENT, -ENOTDIR))
++ else if (!IN_SET(r, -ENOENT, -ENOTDIR)) {
++ filename = mfree(filename);
+ return r;
++ }
+
++ filename = mfree(filename);
+ /* Empty the symlink names for the next run */
+ set_clear_free(symlink_names);
+ }
+--
+2.20.1
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0024-journald-do-not-store-the-iovec-entry-for-process-co.patch b/poky/meta/recipes-core/systemd/systemd/0024-journald-do-not-store-the-iovec-entry-for-process-co.patch
new file mode 100644
index 000000000..c3009545b
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0024-journald-do-not-store-the-iovec-entry-for-process-co.patch
@@ -0,0 +1,204 @@
+From fe19f5a9d0d8b9977e9507a9b66c3cc66744cd38 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 5 Dec 2018 18:38:39 +0100
+Subject: [PATCH] journald: do not store the iovec entry for process
+ commandline on stack
+
+This fixes a crash where we would read the commandline, whose length is under
+control of the sending program, and then crash when trying to create a stack
+allocation for it.
+
+CVE-2018-16864
+https://bugzilla.redhat.com/show_bug.cgi?id=1653855
+
+The message actually doesn't get written to disk, because
+journal_file_append_entry() returns -E2BIG.
+
+Patch backported from systemd master at
+084eeb865ca63887098e0945fb4e93c852b91b0f.
+---
+ src/basic/io-util.c | 10 ++++++++++
+ src/basic/io-util.h | 2 ++
+ src/coredump/coredump.c | 31 +++++++++++--------------------
+ src/journal/journald-server.c | 25 +++++++++++++++----------
+ 4 files changed, 38 insertions(+), 30 deletions(-)
+
+diff --git a/src/basic/io-util.c b/src/basic/io-util.c
+index 1f64cc933b..575398fbe6 100644
+--- a/src/basic/io-util.c
++++ b/src/basic/io-util.c
+@@ -8,6 +8,7 @@
+ #include <unistd.h>
+
+ #include "io-util.h"
++#include "string-util.h"
+ #include "time-util.h"
+
+ int flush_fd(int fd) {
+@@ -252,3 +253,12 @@ ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length) {
+
+ return q - (const uint8_t*) p;
+ }
++
++char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) {
++ char *x;
++
++ x = strappend(field, value);
++ if (x)
++ iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(x);
++ return x;
++}
+diff --git a/src/basic/io-util.h b/src/basic/io-util.h
+index ed189b5820..792a64ad5e 100644
+--- a/src/basic/io-util.h
++++ b/src/basic/io-util.h
+@@ -71,3 +71,5 @@ static inline bool FILE_SIZE_VALID_OR_INFINITY(uint64_t l) {
+ #define IOVEC_MAKE(base, len) (struct iovec) IOVEC_INIT(base, len)
+ #define IOVEC_INIT_STRING(string) IOVEC_INIT((char*) string, strlen(string))
+ #define IOVEC_MAKE_STRING(string) (struct iovec) IOVEC_INIT_STRING(string)
++
++char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value);
+diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
+index 20a1cbdd45..18e4f61d72 100644
+--- a/src/coredump/coredump.c
++++ b/src/coredump/coredump.c
+@@ -1053,19 +1053,10 @@ static int send_iovec(const struct iovec iovec[], size_t n_iovec, int input_fd)
+ return 0;
+ }
+
+-static char* set_iovec_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) {
+- char *x;
+-
+- x = strappend(field, value);
+- if (x)
+- iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(x);
+- return x;
+-}
+-
+ static char* set_iovec_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value) {
+ char *x;
+
+- x = set_iovec_field(iovec, n_iovec, field, value);
++ x = set_iovec_string_field(iovec, n_iovec, field, value);
+ free(value);
+ return x;
+ }
+@@ -1115,36 +1106,36 @@ static int gather_pid_metadata(
+ disable_coredumps();
+ }
+
+- set_iovec_field(iovec, n_iovec, "COREDUMP_UNIT=", context[CONTEXT_UNIT]);
++ set_iovec_string_field(iovec, n_iovec, "COREDUMP_UNIT=", context[CONTEXT_UNIT]);
+ }
+
+ if (cg_pid_get_user_unit(pid, &t) >= 0)
+ set_iovec_field_free(iovec, n_iovec, "COREDUMP_USER_UNIT=", t);
+
+ /* The next few are mandatory */
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_PID=", context[CONTEXT_PID]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_PID=", context[CONTEXT_PID]))
+ return log_oom();
+
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_UID=", context[CONTEXT_UID]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_UID=", context[CONTEXT_UID]))
+ return log_oom();
+
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_GID=", context[CONTEXT_GID]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_GID=", context[CONTEXT_GID]))
+ return log_oom();
+
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_SIGNAL=", context[CONTEXT_SIGNAL]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_SIGNAL=", context[CONTEXT_SIGNAL]))
+ return log_oom();
+
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_RLIMIT=", context[CONTEXT_RLIMIT]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_RLIMIT=", context[CONTEXT_RLIMIT]))
+ return log_oom();
+
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_HOSTNAME=", context[CONTEXT_HOSTNAME]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_HOSTNAME=", context[CONTEXT_HOSTNAME]))
+ return log_oom();
+
+- if (!set_iovec_field(iovec, n_iovec, "COREDUMP_COMM=", context[CONTEXT_COMM]))
++ if (!set_iovec_string_field(iovec, n_iovec, "COREDUMP_COMM=", context[CONTEXT_COMM]))
+ return log_oom();
+
+ if (context[CONTEXT_EXE] &&
+- !set_iovec_field(iovec, n_iovec, "COREDUMP_EXE=", context[CONTEXT_EXE]))
++ !set_iovec_string_field(iovec, n_iovec, "COREDUMP_EXE=", context[CONTEXT_EXE]))
+ return log_oom();
+
+ if (sd_pid_get_session(pid, &t) >= 0)
+@@ -1212,7 +1203,7 @@ static int gather_pid_metadata(
+ iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(t);
+
+ if (safe_atoi(context[CONTEXT_SIGNAL], &signo) >= 0 && SIGNAL_VALID(signo))
+- set_iovec_field(iovec, n_iovec, "COREDUMP_SIGNAL_NAME=SIG", signal_to_string(signo));
++ set_iovec_string_field(iovec, n_iovec, "COREDUMP_SIGNAL_NAME=SIG", signal_to_string(signo));
+
+ return 0; /* we successfully acquired all metadata */
+ }
+diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
+index 4f1550ec5b..31be085c6b 100644
+--- a/src/journal/journald-server.c
++++ b/src/journal/journald-server.c
+@@ -753,6 +753,7 @@ static void dispatch_message_real(
+ pid_t object_pid) {
+
+ char source_time[sizeof("_SOURCE_REALTIME_TIMESTAMP=") + DECIMAL_STR_MAX(usec_t)];
++ _cleanup_free_ char *cmdline1 = NULL, *cmdline2 = NULL;
+ uid_t journal_uid;
+ ClientContext *o;
+
+@@ -769,20 +770,23 @@ static void dispatch_message_real(
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, c->uid, uid_t, uid_is_valid, UID_FMT, "_UID");
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, c->gid, gid_t, gid_is_valid, GID_FMT, "_GID");
+
+- IOVEC_ADD_STRING_FIELD(iovec, n, c->comm, "_COMM");
+- IOVEC_ADD_STRING_FIELD(iovec, n, c->exe, "_EXE");
+- IOVEC_ADD_STRING_FIELD(iovec, n, c->cmdline, "_CMDLINE");
+- IOVEC_ADD_STRING_FIELD(iovec, n, c->capeff, "_CAP_EFFECTIVE");
++ IOVEC_ADD_STRING_FIELD(iovec, n, c->comm, "_COMM"); /* At most TASK_COMM_LENGTH (16 bytes) */
++ IOVEC_ADD_STRING_FIELD(iovec, n, c->exe, "_EXE"); /* A path, so at most PATH_MAX (4096 bytes) */
+
+- IOVEC_ADD_SIZED_FIELD(iovec, n, c->label, c->label_size, "_SELINUX_CONTEXT");
++ if (c->cmdline)
++ /* At most _SC_ARG_MAX (2MB usually), which is too much to put on stack.
++ * Let's use a heap allocation for this one. */
++ cmdline1 = set_iovec_string_field(iovec, &n, "_CMDLINE=", c->cmdline);
+
++ IOVEC_ADD_STRING_FIELD(iovec, n, c->capeff, "_CAP_EFFECTIVE"); /* Read from /proc/.../status */
++ IOVEC_ADD_SIZED_FIELD(iovec, n, c->label, c->label_size, "_SELINUX_CONTEXT");
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, c->auditid, uint32_t, audit_session_is_valid, "%" PRIu32, "_AUDIT_SESSION");
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, c->loginuid, uid_t, uid_is_valid, UID_FMT, "_AUDIT_LOGINUID");
+
+- IOVEC_ADD_STRING_FIELD(iovec, n, c->cgroup, "_SYSTEMD_CGROUP");
++ IOVEC_ADD_STRING_FIELD(iovec, n, c->cgroup, "_SYSTEMD_CGROUP"); /* A path */
+ IOVEC_ADD_STRING_FIELD(iovec, n, c->session, "_SYSTEMD_SESSION");
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, c->owner_uid, uid_t, uid_is_valid, UID_FMT, "_SYSTEMD_OWNER_UID");
+- IOVEC_ADD_STRING_FIELD(iovec, n, c->unit, "_SYSTEMD_UNIT");
++ IOVEC_ADD_STRING_FIELD(iovec, n, c->unit, "_SYSTEMD_UNIT"); /* Unit names are bounded by UNIT_NAME_MAX */
+ IOVEC_ADD_STRING_FIELD(iovec, n, c->user_unit, "_SYSTEMD_USER_UNIT");
+ IOVEC_ADD_STRING_FIELD(iovec, n, c->slice, "_SYSTEMD_SLICE");
+ IOVEC_ADD_STRING_FIELD(iovec, n, c->user_slice, "_SYSTEMD_USER_SLICE");
+@@ -803,13 +807,14 @@ static void dispatch_message_real(
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, o->uid, uid_t, uid_is_valid, UID_FMT, "OBJECT_UID");
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, o->gid, gid_t, gid_is_valid, GID_FMT, "OBJECT_GID");
+
++ /* See above for size limits, only ->cmdline may be large, so use a heap allocation for it. */
+ IOVEC_ADD_STRING_FIELD(iovec, n, o->comm, "OBJECT_COMM");
+ IOVEC_ADD_STRING_FIELD(iovec, n, o->exe, "OBJECT_EXE");
+- IOVEC_ADD_STRING_FIELD(iovec, n, o->cmdline, "OBJECT_CMDLINE");
+- IOVEC_ADD_STRING_FIELD(iovec, n, o->capeff, "OBJECT_CAP_EFFECTIVE");
++ if (o->cmdline)
++ cmdline2 = set_iovec_string_field(iovec, &n, "OBJECT_CMDLINE=", o->cmdline);
+
++ IOVEC_ADD_STRING_FIELD(iovec, n, o->capeff, "OBJECT_CAP_EFFECTIVE");
+ IOVEC_ADD_SIZED_FIELD(iovec, n, o->label, o->label_size, "OBJECT_SELINUX_CONTEXT");
+-
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, o->auditid, uint32_t, audit_session_is_valid, "%" PRIu32, "OBJECT_AUDIT_SESSION");
+ IOVEC_ADD_NUMERIC_FIELD(iovec, n, o->loginuid, uid_t, uid_is_valid, UID_FMT, "OBJECT_AUDIT_LOGINUID");
+
+--
+2.11.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0025-journald-set-a-limit-on-the-number-of-fields-1k.patch b/poky/meta/recipes-core/systemd/systemd/0025-journald-set-a-limit-on-the-number-of-fields-1k.patch
new file mode 100644
index 000000000..50a01efe8
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0025-journald-set-a-limit-on-the-number-of-fields-1k.patch
@@ -0,0 +1,56 @@
+From 4566aaf97f5b4143b930d75628f3abc905249dcd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 5 Dec 2018 22:45:02 +0100
+Subject: [PATCH] journald: set a limit on the number of fields (1k)
+
+We allocate a iovec entry for each field, so with many short entries,
+our memory usage and processing time can be large, even with a relatively
+small message size. Let's refuse overly long entries.
+
+CVE-2018-16865
+https://bugzilla.redhat.com/show_bug.cgi?id=1653861
+
+What from I can see, the problem is not from an alloca, despite what the CVE
+description says, but from the attack multiplication that comes from creating
+many very small iovecs: (void* + size_t) for each three bytes of input message.
+
+Patch backported from systemd master at
+052c57f132f04a3cf4148f87561618da1a6908b4.
+---
+ src/basic/journal-importer.h | 3 +++
+ src/journal/journald-native.c | 5 +++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/basic/journal-importer.h b/src/basic/journal-importer.h
+index f49ce734a1..c4ae45d32d 100644
+--- a/src/basic/journal-importer.h
++++ b/src/basic/journal-importer.h
+@@ -16,6 +16,9 @@
+ #define DATA_SIZE_MAX (1024*1024*768u)
+ #define LINE_CHUNK 8*1024u
+
++/* The maximum number of fields in an entry */
++#define ENTRY_FIELD_COUNT_MAX 1024
++
+ struct iovec_wrapper {
+ struct iovec *iovec;
+ size_t size_bytes;
+diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
+index 5ff22a10af..951d092053 100644
+--- a/src/journal/journald-native.c
++++ b/src/journal/journald-native.c
+@@ -140,6 +140,11 @@ static int server_process_entry(
+ }
+
+ /* A property follows */
++ if (n > ENTRY_FIELD_COUNT_MAX) {
++ log_debug("Received an entry that has more than " STRINGIFY(ENTRY_FIELD_COUNT_MAX) " fields, ignoring entry.");
++ r = 1;
++ goto finish;
++ }
+
+ /* n existing properties, 1 new, +1 for _TRANSPORT */
+ if (!GREEDY_REALLOC(iovec, m,
+--
+2.11.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0026-journal-remote-set-a-limit-on-the-number-of-fields-i.patch b/poky/meta/recipes-core/systemd/systemd/0026-journal-remote-set-a-limit-on-the-number-of-fields-i.patch
new file mode 100644
index 000000000..104945cc2
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0026-journal-remote-set-a-limit-on-the-number-of-fields-i.patch
@@ -0,0 +1,84 @@
+From 4183ec3a135663128834ca8b35d50a60999343a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Fri, 7 Dec 2018 10:48:10 +0100
+Subject: [PATCH] journal-remote: set a limit on the number of fields in a
+ message
+
+Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is
+reused for the new error condition (too many fields).
+
+This matches the change done for systemd-journald, hence forming the second
+part of the fix for CVE-2018-16865
+(https://bugzilla.redhat.com/show_bug.cgi?id=1653861).
+
+Patch backported from systemd master at
+ef4d6abe7c7fab6cbff975b32e76b09feee56074.
+---
+ src/basic/journal-importer.c | 5 ++++-
+ src/journal-remote/journal-remote-main.c | 10 ++++++----
+ src/journal-remote/journal-remote.c | 5 ++++-
+ 3 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c
+index ca203bbbfc..3ac55a66d9 100644
+--- a/src/basic/journal-importer.c
++++ b/src/basic/journal-importer.c
+@@ -23,6 +23,9 @@ enum {
+ };
+
+ static int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) {
++ if (iovw->count >= ENTRY_FIELD_COUNT_MAX)
++ return -E2BIG;
++
+ if (!GREEDY_REALLOC(iovw->iovec, iovw->size_bytes, iovw->count + 1))
+ return log_oom();
+
+@@ -98,7 +101,7 @@ static int get_line(JournalImporter *imp, char **line, size_t *size) {
+ imp->scanned = imp->filled;
+ if (imp->scanned >= DATA_SIZE_MAX) {
+ log_error("Entry is bigger than %u bytes.", DATA_SIZE_MAX);
+- return -E2BIG;
++ return -ENOBUFS;
+ }
+
+ if (imp->passive_fd)
+diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
+index 8fda9d1499..f52618fb7b 100644
+--- a/src/journal-remote/journal-remote-main.c
++++ b/src/journal-remote/journal-remote-main.c
+@@ -212,10 +212,12 @@ static int process_http_upload(
+ break;
+ else if (r < 0) {
+ log_warning("Failed to process data for connection %p", connection);
+- if (r == -E2BIG)
+- return mhd_respondf(connection,
+- r, MHD_HTTP_PAYLOAD_TOO_LARGE,
+- "Entry is too large, maximum is " STRINGIFY(DATA_SIZE_MAX) " bytes.");
++ if (r == -ENOBUFS)
++ log_warning_errno(r, "Entry is above the maximum of %u, aborting connection %p.",
++ DATA_SIZE_MAX, connection);
++ else if (r == -E2BIG)
++ log_warning_errno(r, "Entry with more fields than the maximum of %u, aborting connection %p.",
++ ENTRY_FIELD_COUNT_MAX, connection);
+ else
+ return mhd_respondf(connection,
+ r, MHD_HTTP_UNPROCESSABLE_ENTITY,
+diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
+index beb75a1cb4..67e3a70c06 100644
+--- a/src/journal-remote/journal-remote.c
++++ b/src/journal-remote/journal-remote.c
+@@ -408,7 +408,10 @@ int journal_remote_handle_raw_source(
+ log_debug("%zu active sources remaining", s->active);
+ return 0;
+ } else if (r == -E2BIG) {
+- log_notice_errno(E2BIG, "Entry too big, skipped");
++ log_notice("Entry with too many fields, skipped");
++ return 1;
++ } else if (r == -ENOBUFS) {
++ log_notice("Entry too big, skipped");
+ return 1;
+ } else if (r == -EAGAIN) {
+ return 0;
+--
+2.11.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0027-journal-fix-syslog_parse_identifier.patch b/poky/meta/recipes-core/systemd/systemd/0027-journal-fix-syslog_parse_identifier.patch
new file mode 100644
index 000000000..d4df0e12f
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0027-journal-fix-syslog_parse_identifier.patch
@@ -0,0 +1,77 @@
+From 8ccebb04e07628f7fe10131d6cd4f19d6a0d8f45 Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Wed, 8 Aug 2018 15:06:36 +0900
+Subject: [PATCH] journal: fix syslog_parse_identifier()
+
+Fixes #9829.
+
+An out of bounds read was discovered in systemd-journald in the way it
+parses log messages that terminate with a colon ':'. A local attacker
+can use this flaw to disclose process memory data.
+
+Patch backported from systemd master at
+a6aadf4ae0bae185dc4c414d492a4a781c80ffe5.
+
+This matches the change done for systemd-journald, hence forming the first
+part of the fix for CVE-2018-16866.
+---
+ src/journal/journald-syslog.c | 6 +++---
+ src/journal/test-journal-syslog.c | 10 ++++++++--
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
+index 9dea116722..97711ac7a3 100644
+--- a/src/journal/journald-syslog.c
++++ b/src/journal/journald-syslog.c
+@@ -194,7 +194,7 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
+ e = l;
+ l--;
+
+- if (p[l-1] == ']') {
++ if (l > 0 && p[l-1] == ']') {
+ size_t k = l-1;
+
+ for (;;) {
+@@ -219,8 +219,8 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
+ if (t)
+ *identifier = t;
+
+- if (strchr(WHITESPACE, p[e]))
+- e++;
++ e += strspn(p + e, WHITESPACE);
++
+ *buf = p + e;
+ return e;
+ }
+diff --git a/src/journal/test-journal-syslog.c b/src/journal/test-journal-syslog.c
+index 9ba86f6c8a..05f759817e 100644
+--- a/src/journal/test-journal-syslog.c
++++ b/src/journal/test-journal-syslog.c
+@@ -5,8 +5,8 @@
+ #include "macro.h"
+ #include "string-util.h"
+
+-static void test_syslog_parse_identifier(const char* str,
+- const char *ident, const char*pid, int ret) {
++static void test_syslog_parse_identifier(const char *str,
++ const char *ident, const char *pid, int ret) {
+ const char *buf = str;
+ _cleanup_free_ char *ident2 = NULL, *pid2 = NULL;
+ int ret2;
+@@ -21,7 +21,13 @@ static void test_syslog_parse_identifier(const char* str,
+ int main(void) {
+ test_syslog_parse_identifier("pidu[111]: xxx", "pidu", "111", 11);
+ test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 6);
++ test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 7);
+ test_syslog_parse_identifier("pidu xxx", NULL, NULL, 0);
++ test_syslog_parse_identifier(":", "", NULL, 1);
++ test_syslog_parse_identifier(": ", "", NULL, 3);
++ test_syslog_parse_identifier("pidu:", "pidu", NULL, 5);
++ test_syslog_parse_identifier("pidu: ", "pidu", NULL, 6);
++ test_syslog_parse_identifier("pidu : ", NULL, NULL, 0);
+
+ return 0;
+ }
+--
+2.11.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd/0028-journal-do-not-remove-multiple-spaces-after-identifi.patch b/poky/meta/recipes-core/systemd/systemd/0028-journal-do-not-remove-multiple-spaces-after-identifi.patch
new file mode 100644
index 000000000..fa2c01034
--- /dev/null
+++ b/poky/meta/recipes-core/systemd/systemd/0028-journal-do-not-remove-multiple-spaces-after-identifi.patch
@@ -0,0 +1,84 @@
+From c3a7da1bbb6d2df8ab7ea1c7ce34ded37a21959f Mon Sep 17 00:00:00 2001
+From: Yu Watanabe <watanabe.yu+github@gmail.com>
+Date: Fri, 10 Aug 2018 11:07:54 +0900
+Subject: [PATCH] journal: do not remove multiple spaces after identifier in
+ syslog message
+
+Single space is used as separator.
+C.f. discussions in #156.
+
+Fixes #9839 introduced by a6aadf4ae0bae185dc4c414d492a4a781c80ffe5.
+
+Patch backported from systemd master at
+8595102d3ddde6d25c282f965573a6de34ab4421.
+
+This matches the change done for systemd-journald, hence forming the second
+part of the fix for CVE-2018-16866
+---
+ src/journal/journald-syslog.c | 4 +++-
+ src/journal/test-journal-syslog.c | 24 ++++++++++++++----------
+ 2 files changed, 17 insertions(+), 11 deletions(-)
+
+diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
+index 97711ac7a3..e0b55cc566 100644
+--- a/src/journal/journald-syslog.c
++++ b/src/journal/journald-syslog.c
+@@ -219,7 +219,9 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
+ if (t)
+ *identifier = t;
+
+- e += strspn(p + e, WHITESPACE);
++ /* Single space is used as separator */
++ if (p[e] != '\0' && strchr(WHITESPACE, p[e]))
++ e++;
+
+ *buf = p + e;
+ return e;
+diff --git a/src/journal/test-journal-syslog.c b/src/journal/test-journal-syslog.c
+index 05f759817e..7294cde032 100644
+--- a/src/journal/test-journal-syslog.c
++++ b/src/journal/test-journal-syslog.c
+@@ -6,7 +6,7 @@
+ #include "string-util.h"
+
+ static void test_syslog_parse_identifier(const char *str,
+- const char *ident, const char *pid, int ret) {
++ const char *ident, const char *pid, const char *rest, int ret) {
+ const char *buf = str;
+ _cleanup_free_ char *ident2 = NULL, *pid2 = NULL;
+ int ret2;
+@@ -16,18 +16,22 @@ static void test_syslog_parse_identifier(const char *str,
+ assert_se(ret == ret2);
+ assert_se(ident == ident2 || streq_ptr(ident, ident2));
+ assert_se(pid == pid2 || streq_ptr(pid, pid2));
++ assert_se(streq(buf, rest));
+ }
+
+ int main(void) {
+- test_syslog_parse_identifier("pidu[111]: xxx", "pidu", "111", 11);
+- test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 6);
+- test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 7);
+- test_syslog_parse_identifier("pidu xxx", NULL, NULL, 0);
+- test_syslog_parse_identifier(":", "", NULL, 1);
+- test_syslog_parse_identifier(": ", "", NULL, 3);
+- test_syslog_parse_identifier("pidu:", "pidu", NULL, 5);
+- test_syslog_parse_identifier("pidu: ", "pidu", NULL, 6);
+- test_syslog_parse_identifier("pidu : ", NULL, NULL, 0);
++ test_syslog_parse_identifier("pidu[111]: xxx", "pidu", "111", "xxx", 11);
++ test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, "xxx", 6);
++ test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, " xxx", 6);
++ test_syslog_parse_identifier("pidu xxx", NULL, NULL, "pidu xxx", 0);
++ test_syslog_parse_identifier(" pidu xxx", NULL, NULL, " pidu xxx", 0);
++ test_syslog_parse_identifier("", NULL, NULL, "", 0);
++ test_syslog_parse_identifier(" ", NULL, NULL, " ", 0);
++ test_syslog_parse_identifier(":", "", NULL, "", 1);
++ test_syslog_parse_identifier(": ", "", NULL, " ", 2);
++ test_syslog_parse_identifier("pidu:", "pidu", NULL, "", 5);
++ test_syslog_parse_identifier("pidu: ", "pidu", NULL, "", 6);
++ test_syslog_parse_identifier("pidu : ", NULL, NULL, "pidu : ", 0);
+
+ return 0;
+ }
+--
+2.11.0
+
diff --git a/poky/meta/recipes-core/systemd/systemd_239.bb b/poky/meta/recipes-core/systemd/systemd_239.bb
index ed10f634b..6fbef4716 100644
--- a/poky/meta/recipes-core/systemd/systemd_239.bb
+++ b/poky/meta/recipes-core/systemd/systemd_239.bb
@@ -33,6 +33,16 @@ SRC_URI += "file://touchscreen.rules \
file://0001-core-when-deserializing-state-always-use-read_line-L.patch \
file://0001-chown-recursive-let-s-rework-the-recursive-logic-to-.patch \
file://0001-dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-o.patch \
+ file://0001-Revert-sysctl.d-request-ECN-on-both-in-and-outgoing-.patch \
+ file://0001-timesync-changes-type-of-drift_freq-to-int64_t.patch \
+ file://0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch \
+ file://0002-core-Fix-use-after-free-case-in-load_from_path.patch \
+ file://0001-meson-rename-Ddebug-to-Ddebug-extra.patch \
+ file://0024-journald-do-not-store-the-iovec-entry-for-process-co.patch \
+ file://0025-journald-set-a-limit-on-the-number-of-fields-1k.patch \
+ file://0026-journal-remote-set-a-limit-on-the-number-of-fields-i.patch \
+ file://0027-journal-fix-syslog_parse_identifier.patch \
+ file://0028-journal-do-not-remove-multiple-spaces-after-identifi.patch \
"
# patches made for musl are only applied on TCLIBC is musl
@@ -132,6 +142,7 @@ PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils"
PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false"
# Sign the journal for anti-tampering
PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt"
+PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls"
PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
@@ -332,22 +343,26 @@ DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to recei
SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
- ${@bb.utils.contains('PACKAGECONFIG', '', '${PN}-journal-remote', '', d)} \
"
SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-USERADD_PACKAGES = "${PN} ${PN}-extra-utils ${PN}-journal-gateway ${PN}-journal-upload ${PN}-journal-remote"
-USERADD_PARAM_${PN}-journal-gateway += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
-USERADD_PARAM_${PN}-journal-remote += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
-USERADD_PARAM_${PN}-journal-upload += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
+"
+GROUPADD_PARAM_${PN} = "-r systemd-journal"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}"
-GROUPADD_PARAM_${PN} = "-r systemd-journal"
-USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM_${PN}-extra-utils = "--system -d / -M --shell /bin/nologin systemd-bus-proxy"
+USERADD_PARAM_${PN}-journal-gateway = "--system -d / -M --shell /bin/nologin systemd-journal-gateway"
+USERADD_PARAM_${PN}-journal-remote = "--system -d / -M --shell /bin/nologin systemd-journal-remote"
+USERADD_PARAM_${PN}-journal-upload = "--system -d / -M --shell /bin/nologin systemd-journal-upload"
FILES_${PN}-analyze = "${bindir}/systemd-analyze"
diff --git a/poky/meta/recipes-core/udev/eudev_3.2.5.bb b/poky/meta/recipes-core/udev/eudev_3.2.7.bb
index 592dd8f22..1bea4ebd9 100644
--- a/poky/meta/recipes-core/udev/eudev_3.2.5.bb
+++ b/poky/meta/recipes-core/udev/eudev_3.2.7.bb
@@ -20,8 +20,8 @@ SRC_URI = "http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz \
file://udev.rules \
"
-SRC_URI[md5sum] = "6ca08c0e14380f87df8e8aceac123671"
-SRC_URI[sha256sum] = "49c2d04105cad2526302627e040fa24b1916a9a3e059539bc8bb919b973890af"
+SRC_URI[md5sum] = "c75d99910c1791dd9430d26ab76059c0"
+SRC_URI[sha256sum] = "3004614bd253c1f98558460215027aaf60d7592c70be27fd384ec01db87bf062"
inherit autotools update-rc.d qemu pkgconfig distro_features_check
diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.31.inc b/poky/meta/recipes-devtools/binutils/binutils-2.31.inc
index 0c9d4cef2..62acec500 100644
--- a/poky/meta/recipes-devtools/binutils/binutils-2.31.inc
+++ b/poky/meta/recipes-devtools/binutils/binutils-2.31.inc
@@ -15,10 +15,11 @@ def binutils_branch_version(d):
return pvsplit[0] + "_" + pvsplit[1]
BINUPV = "${@binutils_branch_version(d)}"
+PV .= ".1"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-SRCREV ?= "4568e49ff799192fea4f66063fe13e2b871ec75a"
+SRCREV ?= "c909e7afdc4710851a53e86ebed8cea3879b26e5"
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git"
SRC_URI = "\
${BINUTILS_GIT_URI} \
@@ -36,11 +37,9 @@ SRC_URI = "\
file://0014-Detect-64-bit-MIPS-targets.patch \
file://0015-sync-with-OE-libtool-changes.patch \
file://0016-add-i386pep-emulation-for-x86_64.patch \
- file://0017-improve-check-for-input-file-matching-output-file.patch \
- file://0018-Refactored-location-where-GOT-information-is-collect.patch \
- file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \
- file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \
- file://0021-PLT-information-was-still-being-generated-when-symbo.patch \
+ file://0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch \
+ file://0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch \
+ file://clang-bfd-fix.patch \
file://CVE-2018-17358.patch \
file://CVE-2018-17360.patch \
file://CVE-2018-18309.patch \
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch b/poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch
deleted file mode 100644
index 265e52633..000000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 2a50366ded329bfb39d387253450c9d5302c3503 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 14 Aug 2018 12:22:35 +0100
-Subject: [PATCH] as.c: Improve check for input file matching output file.
-
-When the assembler reports that the input and output are the same, report the
-file names involved, in order to help debugging. Also do not equate two files
-are the same if the have the same inode value but reside on different file
-systems.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- gas/as.c | 27 ++++++++++++++++++++-------
- 2 files changed, 20 insertions(+), 7 deletions(-)
-
-diff --git a/gas/as.c b/gas/as.c
-index b2a908a..3105d06 100644
---- a/gas/as.c
-+++ b/gas/as.c
-@@ -1259,14 +1259,27 @@ main (int argc, char ** argv)
- {
- struct stat sib;
-
-- if (stat (argv[i], &sib) == 0)
-+ /* Check that the input file and output file are different. */
-+ if (stat (argv[i], &sib) == 0
-+ && sib.st_ino == sob.st_ino
-+ /* POSIX emulating systems may support stat() but if the
-+ underlying file system does not support a file serial number
-+ of some kind then they will return 0 for the inode. So
-+ two files with an inode of 0 may not actually be the same.
-+ On real POSIX systems no ordinary file will ever have an
-+ inode of 0. */
-+ && sib.st_ino != 0
-+ /* Different files may have the same inode number if they
-+ reside on different devices, so check the st_dev field as
-+ well. */
-+ && sib.st_dev == sob.st_dev)
- {
-- if (sib.st_ino == sob.st_ino && sib.st_ino != 0)
-- {
-- /* Don't let as_fatal remove the output file! */
-- out_file_name = NULL;
-- as_fatal (_("The input and output files must be distinct"));
-- }
-+ const char *saved_out_file_name = out_file_name;
-+
-+ /* Don't let as_fatal remove the output file! */
-+ out_file_name = NULL;
-+ as_fatal (_("The input '%s' and output '%s' files are the same"),
-+ argv[i], saved_out_file_name);
- }
- }
- }
---
-2.7.4
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch b/poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch
deleted file mode 100644
index d41339a9a..000000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch
+++ /dev/null
@@ -1,201 +0,0 @@
-From d930affa2d475d1cc6792f1e6d56bef3d6c617db Mon Sep 17 00:00:00 2001
-From: Cupertino Miranda <cmiranda@synopsys.com>
-Date: Fri, 2 Mar 2018 17:16:21 +0100
-Subject: [PATCH] Refactored location where GOT information is collected.
-
-Change location where GOT information is collected for ARC target, avoiding
-posible use conflicts of the previous .got field in the symbols hash_entry.
-
-bfd/
-2018-03-01 Cupertino Miranda <cmiranda@synopsys.com>
-
- * arc-got.h (get_got_entry_list_for_symbol): Changed.
- * ef32-arc.c (struct elf_arc_link_hash_entry): Moved and changed.
- (elf_arc_link_hash_newfunc): Changed.
- (arc_elf_link_hash_table_create): Removed old initializations.
- (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
-
-Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-[Romain: rebase on top of 2.31]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-
-Upstream-Status: Pending
----
- bfd/arc-got.h | 6 +++--
- bfd/elf32-arc.c | 77 +++++++++++++++++++++++++++++++--------------------------
- 2 files changed, 46 insertions(+), 37 deletions(-)
-
-diff --git a/bfd/arc-got.h b/bfd/arc-got.h
-index a86061bcb38..81ce88fe21a 100644
---- a/bfd/arc-got.h
-+++ b/bfd/arc-got.h
-@@ -156,9 +156,11 @@ get_got_entry_list_for_symbol (bfd *abfd,
- unsigned long r_symndx,
- struct elf_link_hash_entry *h)
- {
-- if (h != NULL)
-+ struct elf_arc_link_hash_entry *h1 =
-+ ((struct elf_arc_link_hash_entry *) h);
-+ if (h1 != NULL)
- {
-- return &h->got.glist;
-+ return &h1->got_ents;
- }
- else
- {
-diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
-index a48ef0ca15f..ab84de43815 100644
---- a/bfd/elf32-arc.c
-+++ b/bfd/elf32-arc.c
-@@ -160,6 +160,18 @@ struct arc_relocation_data
- const char * symbol_name;
- };
-
-+/* ARC ELF linker hash entry. */
-+struct elf_arc_link_hash_entry
-+{
-+ struct elf_link_hash_entry root;
-+
-+ /* Track dynamic relocs copied for this symbol. */
-+ struct elf_dyn_relocs *dyn_relocs;
-+
-+ struct got_entry *got_ents;
-+};
-+
-+
- /* Should be included at this location due to static declarations
- defined before this point. */
- #include "arc-got.h"
-@@ -281,15 +293,6 @@ struct arc_reloc_map
- unsigned char elf_reloc_val;
- };
-
--/* ARC ELF linker hash entry. */
--struct elf_arc_link_hash_entry
--{
-- struct elf_link_hash_entry root;
--
-- /* Track dynamic relocs copied for this symbol. */
-- struct elf_dyn_relocs *dyn_relocs;
--};
--
- /* ARC ELF linker hash table. */
- struct elf_arc_link_hash_table
- {
-@@ -301,28 +304,28 @@ elf_arc_link_hash_newfunc (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
- {
-+ struct elf_arc_link_hash_entry * ret =
-+ (struct elf_arc_link_hash_entry *) entry;
-+
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
-- if (entry == NULL)
-- {
-- entry = (struct bfd_hash_entry *)
-- bfd_hash_allocate (table,
-- sizeof (struct elf_arc_link_hash_entry));
-- if (entry == NULL)
-- return entry;
-- }
-+ if (ret == NULL)
-+ ret = (struct elf_arc_link_hash_entry *)
-+ bfd_hash_allocate (table, sizeof (struct elf_arc_link_hash_entry));
-+ if (ret == NULL)
-+ return (struct bfd_hash_entry *) ret;
-
- /* Call the allocation method of the superclass. */
-- entry = _bfd_elf_link_hash_newfunc (entry, table, string);
-- if (entry != NULL)
-+ ret = ((struct elf_arc_link_hash_entry *)
-+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
-+ table, string));
-+ if (ret != NULL)
- {
-- struct elf_arc_link_hash_entry *eh;
--
-- eh = (struct elf_arc_link_hash_entry *) entry;
-- eh->dyn_relocs = NULL;
-+ ret->dyn_relocs = NULL;
-+ ret->got_ents = NULL;
- }
-
-- return entry;
-+ return (struct bfd_hash_entry *) ret;
- }
-
- /* Destroy an ARC ELF linker hash table. */
-@@ -352,11 +355,6 @@ arc_elf_link_hash_table_create (bfd *abfd)
- return NULL;
- }
-
-- ret->elf.init_got_refcount.refcount = 0;
-- ret->elf.init_got_refcount.glist = NULL;
-- ret->elf.init_got_offset.offset = 0;
-- ret->elf.init_got_offset.glist = NULL;
--
- ret->elf.root.hash_table_free = elf_arc_link_hash_table_free;
-
- return &ret->elf.root;
-@@ -1615,10 +1613,14 @@ elf_arc_relocate_section (bfd * output_bfd,
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- {
-- struct elf_link_hash_entry *h_old = h;
-+ struct elf_arc_link_hash_entry *ah_old =
-+ (struct elf_arc_link_hash_entry *) h;
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-- if (h->got.glist == 0 && h_old->got.glist != h->got.glist)
-- h->got.glist = h_old->got.glist;
-+ struct elf_arc_link_hash_entry *ah =
-+ (struct elf_arc_link_hash_entry *) h;
-+
-+ if (ah->got_ents == 0 && ah_old->got_ents != ah->got_ents)
-+ ah->got_ents = ah_old->got_ents;
- }
-
- /* TODO: Need to validate what was the intention. */
-@@ -1636,6 +1638,8 @@ elf_arc_relocate_section (bfd * output_bfd,
-
- if (is_reloc_for_GOT (howto) && !bfd_link_pic (info))
- {
-+ struct elf_arc_link_hash_entry *ah =
-+ (struct elf_arc_link_hash_entry *) h;
- /* TODO: Change it to use arc_do_relocation with
- ARC_32 reloc. Try to use ADD_RELA macro. */
- bfd_vma relocation =
-@@ -1645,8 +1649,8 @@ elf_arc_relocate_section (bfd * output_bfd,
- + reloc_data.sym_section->output_section->vma)
- : 0);
-
-- BFD_ASSERT (h->got.glist);
-- bfd_vma got_offset = h->got.glist->offset;
-+ BFD_ASSERT (ah->got_ents);
-+ bfd_vma got_offset = ah->got_ents->offset;
- bfd_put_32 (output_bfd, relocation,
- htab->sgot->contents + got_offset);
- }
-@@ -1958,6 +1962,7 @@ elf_arc_check_relocs (bfd * abfd,
- else /* Global one. */
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
-+
- switch (r_type)
- {
- case R_ARC_32:
-@@ -2404,7 +2409,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
- create respective dynamic relocs. */
- /* TODO: Make function to get list and not access the list directly. */
- /* TODO: Move function to relocate_section create this relocs eagerly. */
-- create_got_dynrelocs_for_got_info (&h->got.glist,
-+ struct elf_arc_link_hash_entry *ah =
-+ (struct elf_arc_link_hash_entry *) h;
-+ create_got_dynrelocs_for_got_info (&ah->got_ents,
- output_bfd,
- info,
- h);
---
-2.14.4
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch b/poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch
deleted file mode 100644
index 6a58ee06a..000000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 955176bd999fe80c5b937ab8786665079e35c387 Mon Sep 17 00:00:00 2001
-From: Cupertino Miranda <cmiranda@synopsys.com>
-Date: Fri, 2 Mar 2018 17:33:48 +0100
-Subject: [PATCH] Improved robustness. Return FALSE in case of NULL pointer.
-
-bfd/
-2018-03-01 Cupertino Miranda <cmiranda@synopsys.com>
-
- * elf32-arc.c (elf_arc_finish_dynamic_symbol) Return FALSE in case
- arc_htab is NULL.
-
-Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-[Romain: rebase on top of 2.31]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-
-Upstream-Status: Pending
----
- bfd/elf32-arc.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
-index ab84de43815..33fc72cff6e 100644
---- a/bfd/elf32-arc.c
-+++ b/bfd/elf32-arc.c
-@@ -2420,6 +2420,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
- {
- struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info);
-
-+ if(arc_htab == NULL)
-+ return FALSE;
-+
- if (h->dynindx == -1
- || (h->root.type != bfd_link_hash_defined
- && h->root.type != bfd_link_hash_defweak)
---
-2.14.4
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch b/poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch
deleted file mode 100644
index 01e42c03b..000000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 9d09ce14b4eef2b56f24660fd69a44acd45128b2 Mon Sep 17 00:00:00 2001
-From: Cupertino Miranda <cmiranda@synopsys.com>
-Date: Fri, 2 Mar 2018 17:38:14 +0100
-Subject: [PATCH] Make sure global symbol is not an indirect or warning.
-
-Problem identified in the context of glibc with latest upstream binutils.
-Dynamic symbol space was being reserved but, no actual information for the
-symbol was being set. Data for the symbol was kept initialized with -1.
-No easy test case was possible to be created.
-
-bfd/
-2018-03-01 Cupertino Miranda <cmiranda@synopsys.com>
-
- * elf32-arc.c (elf_arc_check_relocs): Changed.
-
-Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-[Romain: rebase on top of 2.31]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-
-Upstream-Status: Pending
----
- bfd/elf32-arc.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
-index 33fc72cff6e..9b72c5b4f4f 100644
---- a/bfd/elf32-arc.c
-+++ b/bfd/elf32-arc.c
-@@ -1960,7 +1960,12 @@ elf_arc_check_relocs (bfd * abfd,
- if (r_symndx < symtab_hdr->sh_info) /* Is a local symbol. */
- h = NULL;
- else /* Global one. */
-- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-+ {
-+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-+ while (h->root.type == bfd_link_hash_indirect
-+ || h->root.type == bfd_link_hash_warning)
-+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
-+ }
-
-
- switch (r_type)
---
-2.14.4
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch b/poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch
deleted file mode 100644
index 9e942399c..000000000
--- a/poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e4861c68067cb2166b4c2bb9c052abeb6ad9aaa1 Mon Sep 17 00:00:00 2001
-From: Cupertino Miranda <cmiranda@synopsys.com>
-Date: Fri, 2 Mar 2018 17:44:29 +0100
-Subject: [PATCH] PLT information was still being generated when symbol was
- forced_local.
-
-A change upstream reveiled this issue, triggering an assert when linking glibc.
-
-bfd/
-2018-03-01 Cupertino Miranda <cmiranda@synopsys.com>
-
- * elf32-arc.c (elf_arc_check_relocs): Changed.
-
-Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
-Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-[Romain: rebase on top of 2.31]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
-
-Upstream-Status: Pending
----
- bfd/elf32-arc.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
-index 9b72c5b4f4f..b40b463d34d 100644
---- a/bfd/elf32-arc.c
-+++ b/bfd/elf32-arc.c
-@@ -2041,7 +2041,8 @@ elf_arc_check_relocs (bfd * abfd,
- if (h == NULL)
- continue;
- else
-- h->needs_plt = 1;
-+ if(h->forced_local == 0)
-+ h->needs_plt = 1;
- }
-
- /* Add info to the symbol got_entry_list. */
---
-2.14.4
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch b/poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch
new file mode 100644
index 000000000..650de9b9a
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch
@@ -0,0 +1,332 @@
+From bb9c8cc3c5f4ffd6019a8c53adead429954162e1 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Tue, 27 Nov 2018 11:59:10 +0000
+Subject: [PATCH 1/2] Handle ELF compressed header alignment correctly by
+ setting up the section alignment correctly for the Elf32_Chdr or Elf64_Chdr
+ type and respect the ch_addralign field when decompressing the section data.
+
+ PR binutils/23919
+binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
+ (dump_sections_as_bytes): Likewise.
+ (load_specific_debug_sections): Likewise.
+ * testsuite/binutils-all/dw2-3.rS: Adjust alignment.
+ * testsuite/binutils-all/dw2-3.rt: Likewise.
+
+bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
+ (bfd_check_compression_header): Add uncompressed_alignment_power
+ argument. Check ch_addralign is a power of 2.
+ * bfd-in2.h: Regenerated.
+ * compress.c (bfd_compress_section_contents): Get and set
+ orig_uncompressed_alignment_pow if section is decompressed.
+ (bfd_is_section_compressed_with_header): Add and get
+ uncompressed_align_pow_p argument.
+ (bfd_is_section_compressed): Add uncompressed_align_power argument
+ to bfd_is_section_compressed_with_header call.
+ (bfd_init_section_decompress_status): Get and set
+ uncompressed_alignment_power.
+ * elf.c (_bfd_elf_make_section_from_shdr): Add
+ uncompressed_align_power argument to
+ bfd_is_section_compressed_with_header call.
+---
+ bfd/bfd-in2.h | 6 ++--
+ bfd/bfd.c | 20 ++++++++++----
+ bfd/compress.c | 35 +++++++++++++++++-------
+ bfd/elf.c | 5 ++--
+ binutils/readelf.c | 18 ------------
+ binutils/testsuite/binutils-all/dw2-3.rS | 2 +-
+ binutils/testsuite/binutils-all/dw2-3.rt | 2 +-
+ 7 files changed, 49 insertions(+), 39 deletions(-)
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4207142d6a5d2359170c5f9a140fc1a2351fbda9]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
+index f53dbb5e8c..d0c2190d0b 100644
+--- a/bfd/bfd-in2.h
++++ b/bfd/bfd-in2.h
+@@ -7279,7 +7279,8 @@ void bfd_update_compression_header
+
+ bfd_boolean bfd_check_compression_header
+ (bfd *abfd, bfd_byte *contents, asection *sec,
+- bfd_size_type *uncompressed_size);
++ bfd_size_type *uncompressed_size,
++ unsigned int *uncompressed_alignment_power);
+
+ int bfd_get_compression_header_size (bfd *abfd, asection *sec);
+
+@@ -7855,7 +7856,8 @@ void bfd_cache_section_contents
+ bfd_boolean bfd_is_section_compressed_with_header
+ (bfd *abfd, asection *section,
+ int *compression_header_size_p,
+- bfd_size_type *uncompressed_size_p);
++ bfd_size_type *uncompressed_size_p,
++ unsigned int *uncompressed_alignment_power_p);
+
+ bfd_boolean bfd_is_section_compressed
+ (bfd *abfd, asection *section);
+diff --git a/bfd/bfd.c b/bfd/bfd.c
+index 851710401e..ea10d7b185 100644
+--- a/bfd/bfd.c
++++ b/bfd/bfd.c
+@@ -2332,6 +2332,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
+ bfd_put_32 (abfd, sec->size, &echdr->ch_size);
+ bfd_put_32 (abfd, 1 << sec->alignment_power,
+ &echdr->ch_addralign);
++ /* bfd_log2 (alignof (Elf32_Chdr)) */
++ bfd_set_section_alignment (abfd, sec, 2);
+ }
+ else
+ {
+@@ -2342,6 +2344,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
+ bfd_put_64 (abfd, sec->size, &echdr->ch_size);
+ bfd_put_64 (abfd, 1 << sec->alignment_power,
+ &echdr->ch_addralign);
++ /* bfd_log2 (alignof (Elf64_Chdr)) */
++ bfd_set_section_alignment (abfd, sec, 3);
+ }
+ }
+ else
+@@ -2354,6 +2358,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
+ order. */
+ memcpy (contents, "ZLIB", 4);
+ bfd_putb64 (sec->size, contents + 4);
++ /* No way to keep the original alignment, just use 1 always. */
++ bfd_set_section_alignment (abfd, sec, 0);
+ }
+ }
+ }
+@@ -2368,12 +2374,14 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
+ SYNOPSIS
+ bfd_boolean bfd_check_compression_header
+ (bfd *abfd, bfd_byte *contents, asection *sec,
+- bfd_size_type *uncompressed_size);
++ bfd_size_type *uncompressed_size,
++ unsigned int *uncompressed_alignment_power);
+
+ DESCRIPTION
+ Check the compression header at CONTENTS of SEC in ABFD and
+- store the uncompressed size in UNCOMPRESSED_SIZE if the
+- compression header is valid.
++ store the uncompressed size in UNCOMPRESSED_SIZE and the
++ uncompressed data alignment in UNCOMPRESSED_ALIGNMENT_POWER
++ if the compression header is valid.
+
+ RETURNS
+ Return TRUE if the compression header is valid.
+@@ -2382,7 +2390,8 @@ RETURNS
+ bfd_boolean
+ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
+ asection *sec,
+- bfd_size_type *uncompressed_size)
++ bfd_size_type *uncompressed_size,
++ unsigned int *uncompressed_alignment_power)
+ {
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && (elf_section_flags (sec) & SHF_COMPRESSED) != 0)
+@@ -2404,9 +2413,10 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
+ chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign);
+ }
+ if (chdr.ch_type == ELFCOMPRESS_ZLIB
+- && chdr.ch_addralign == 1U << sec->alignment_power)
++ && chdr.ch_addralign == (1U << bfd_log2 (chdr.ch_addralign)))
+ {
+ *uncompressed_size = chdr.ch_size;
++ *uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign);
+ return TRUE;
+ }
+ }
+diff --git a/bfd/compress.c b/bfd/compress.c
+index 53e566e498..97ea624eb8 100644
+--- a/bfd/compress.c
++++ b/bfd/compress.c
+@@ -84,11 +84,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
+ int zlib_size = 0;
+ int orig_compression_header_size;
+ bfd_size_type orig_uncompressed_size;
++ unsigned int orig_uncompressed_alignment_pow;
+ int header_size = bfd_get_compression_header_size (abfd, NULL);
+ bfd_boolean compressed
+ = bfd_is_section_compressed_with_header (abfd, sec,
+ &orig_compression_header_size,
+- &orig_uncompressed_size);
++ &orig_uncompressed_size,
++ &orig_uncompressed_alignment_pow);
+
+ /* Either ELF compression header or the 12-byte, "ZLIB" + 8-byte size,
+ overhead in .zdebug* section. */
+@@ -153,6 +155,9 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
+ return 0;
+ }
+ free (uncompressed_buffer);
++ bfd_set_section_alignment (abfd, sec,
++ orig_uncompressed_alignment_pow);
++
+ sec->contents = buffer;
+ sec->compress_status = COMPRESS_SECTION_DONE;
+ return orig_uncompressed_size;
+@@ -364,20 +369,24 @@ SYNOPSIS
+ bfd_boolean bfd_is_section_compressed_with_header
+ (bfd *abfd, asection *section,
+ int *compression_header_size_p,
+- bfd_size_type *uncompressed_size_p);
++ bfd_size_type *uncompressed_size_p,
++ unsigned int *uncompressed_alignment_power_p);
+
+ DESCRIPTION
+ Return @code{TRUE} if @var{section} is compressed. Compression
+- header size is returned in @var{compression_header_size_p} and
+- uncompressed size is returned in @var{uncompressed_size_p}. If
+- compression is unsupported, compression header size is returned
+- with -1 and uncompressed size is returned with 0.
++ header size is returned in @var{compression_header_size_p},
++ uncompressed size is returned in @var{uncompressed_size_p}
++ and the uncompressed data alignement power is returned in
++ @var{uncompressed_align_pow_p}. If compression is
++ unsupported, compression header size is returned with -1
++ and uncompressed size is returned with 0.
+ */
+
+ bfd_boolean
+ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
+ int *compression_header_size_p,
+- bfd_size_type *uncompressed_size_p)
++ bfd_size_type *uncompressed_size_p,
++ unsigned int *uncompressed_align_pow_p)
+ {
+ bfd_byte header[MAX_COMPRESSION_HEADER_SIZE];
+ int compression_header_size;
+@@ -412,7 +421,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
+ if (compression_header_size != 0)
+ {
+ if (!bfd_check_compression_header (abfd, header, sec,
+- uncompressed_size_p))
++ uncompressed_size_p,
++ uncompressed_align_pow_p))
+ compression_header_size = -1;
+ }
+ /* Check for the pathalogical case of a debug string section that
+@@ -449,9 +459,11 @@ bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
+ {
+ int compression_header_size;
+ bfd_size_type uncompressed_size;
++ unsigned int uncompressed_align_power;
+ return (bfd_is_section_compressed_with_header (abfd, sec,
+ &compression_header_size,
+- &uncompressed_size)
++ &uncompressed_size,
++ &uncompressed_align_power)
+ && compression_header_size >= 0
+ && uncompressed_size > 0);
+ }
+@@ -480,6 +492,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
+ int compression_header_size;
+ int header_size;
+ bfd_size_type uncompressed_size;
++ unsigned int uncompressed_alignment_power = 0;
+
+ compression_header_size = bfd_get_compression_header_size (abfd, sec);
+ if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
+@@ -508,7 +521,8 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
+ uncompressed_size = bfd_getb64 (header + 4);
+ }
+ else if (!bfd_check_compression_header (abfd, header, sec,
+- &uncompressed_size))
++ &uncompressed_size,
++ &uncompressed_alignment_power))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return FALSE;
+@@ -516,6 +530,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
+
+ sec->compressed_size = sec->size;
+ sec->size = uncompressed_size;
++ bfd_set_section_alignment (abfd, sec, uncompressed_alignment_power);
+ sec->compress_status = DECOMPRESS_SECTION_SIZED;
+
+ return TRUE;
+diff --git a/bfd/elf.c b/bfd/elf.c
+index 828241d48a..c4f131ddcf 100644
+--- a/bfd/elf.c
++++ b/bfd/elf.c
+@@ -1177,11 +1177,12 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
+ enum { nothing, compress, decompress } action = nothing;
+ int compression_header_size;
+ bfd_size_type uncompressed_size;
++ unsigned int uncompressed_align_power;
+ bfd_boolean compressed
+ = bfd_is_section_compressed_with_header (abfd, newsect,
+ &compression_header_size,
+- &uncompressed_size);
+-
++ &uncompressed_size,
++ &uncompressed_align_power);
+ if (compressed)
+ {
+ /* Compressed section. Check if we should decompress. */
+diff --git a/binutils/readelf.c b/binutils/readelf.c
+index f4df697a7d..4b0efa884f 100644
+--- a/binutils/readelf.c
++++ b/binutils/readelf.c
+@@ -13345,12 +13345,6 @@ dump_section_as_strings (Elf_Internal_Shdr * section, Filedata * filedata)
+ printable_section_name (filedata, section), chdr.ch_type);
+ return FALSE;
+ }
+- else if (chdr.ch_addralign != section->sh_addralign)
+- {
+- warn (_("compressed section '%s' is corrupted\n"),
+- printable_section_name (filedata, section));
+- return FALSE;
+- }
+ uncompressed_size = chdr.ch_size;
+ start += compression_header_size;
+ new_size -= compression_header_size;
+@@ -13492,12 +13486,6 @@ dump_section_as_bytes (Elf_Internal_Shdr * section,
+ printable_section_name (filedata, section), chdr.ch_type);
+ return FALSE;
+ }
+- else if (chdr.ch_addralign != section->sh_addralign)
+- {
+- warn (_("compressed section '%s' is corrupted\n"),
+- printable_section_name (filedata, section));
+- return FALSE;
+- }
+ uncompressed_size = chdr.ch_size;
+ start += compression_header_size;
+ new_size -= compression_header_size;
+@@ -13667,12 +13655,6 @@ load_specific_debug_section (enum dwarf_section_display_enum debug,
+ section->name, chdr.ch_type);
+ return FALSE;
+ }
+- else if (chdr.ch_addralign != sec->sh_addralign)
+- {
+- warn (_("compressed section '%s' is corrupted\n"),
+- section->name);
+- return FALSE;
+- }
+ uncompressed_size = chdr.ch_size;
+ start += compression_header_size;
+ size -= compression_header_size;
+diff --git a/binutils/testsuite/binutils-all/dw2-3.rS b/binutils/testsuite/binutils-all/dw2-3.rS
+index f1637e9149..86bc73d9a2 100644
+--- a/binutils/testsuite/binutils-all/dw2-3.rS
++++ b/binutils/testsuite/binutils-all/dw2-3.rS
+@@ -1,3 +1,3 @@
+ #...
+- +\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +1
++ +\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +(4|8)
+ #pass
+diff --git a/binutils/testsuite/binutils-all/dw2-3.rt b/binutils/testsuite/binutils-all/dw2-3.rt
+index f59cbaa22b..74e7f8deca 100644
+--- a/binutils/testsuite/binutils-all/dw2-3.rt
++++ b/binutils/testsuite/binutils-all/dw2-3.rt
+@@ -1,6 +1,6 @@
+ #...
+ +\[[ 0-9]+\] .debug_info
+- +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +1
++ +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +(4|8)
+ +\[0+800\]: COMPRESSED
+ +ZLIB, 0+9d, 1
+ #pass
+--
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch b/poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch
new file mode 100644
index 000000000..1f072a605
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch
@@ -0,0 +1,200 @@
+From 0261ec511ac07177fa488133e0bb3c03860977b3 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Sun, 2 Dec 2018 05:42:36 -0800
+Subject: [PATCH 2/2] gold: Get alignment of uncompressed section from
+ ch_addralign
+
+The ELF compression header has a field (ch_addralign) that is set to
+the alignment of the uncompressed section. This way the section itself
+can have a different alignment than the decompressed section. Update
+decompress_input_section to get alignment of the decompressed section
+and use it when merging decompressed strings.
+
+ PR binutils/23919
+ * merge.cc (Output_merge_string<Char_type>::do_add_input_section):
+ Get addralign from decompressed_section_contents.
+ * object.cc (build_compressed_section_map): Set info.addralign.
+ (Object::decompressed_section_contents): Add a palign
+ argument and store p->second.addralign in *palign if it isn't
+ NULL.
+ * object.h (Compressed_section_info): Add addralign.
+ (section_is_compressed): Add a palign argument, default it
+ to NULL, store p->second.addralign in *palign if it isn't NULL.
+ (Object::decompressed_section_contents): Likewise.
+ * output.cc (Output_section::add_input_section): Get addralign
+ from section_is_compressed.
+---
+ gold/merge.cc | 8 +++++---
+ gold/object.cc | 11 +++++++++--
+ gold/object.h | 8 ++++++--
+ gold/output.cc | 11 ++++++-----
+ 4 files changed, 26 insertions(+), 12 deletions(-)
+
+Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5f6c22aee74f17393b82934a5682d985672e011a]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+diff --git a/gold/merge.cc b/gold/merge.cc
+index de00ee9ae9..d7de11789f 100644
+--- a/gold/merge.cc
++++ b/gold/merge.cc
+@@ -440,9 +440,11 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
+ {
+ section_size_type sec_len;
+ bool is_new;
++ uint64_t addralign = this->addralign();
+ const unsigned char* pdata = object->decompressed_section_contents(shndx,
+ &sec_len,
+- &is_new);
++ &is_new,
++ &addralign);
+
+ const Char_type* p = reinterpret_cast<const Char_type*>(pdata);
+ const Char_type* pend = p + sec_len / sizeof(Char_type);
+@@ -494,7 +496,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
+ // aligned, so each string within the section must retain the same
+ // modulo.
+ uintptr_t init_align_modulo = (reinterpret_cast<uintptr_t>(pdata)
+- & (this->addralign() - 1));
++ & (addralign - 1));
+ bool has_misaligned_strings = false;
+
+ while (p < pend)
+@@ -503,7 +505,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
+
+ // Within merge input section each string must be aligned.
+ if (len != 0
+- && ((reinterpret_cast<uintptr_t>(p) & (this->addralign() - 1))
++ && ((reinterpret_cast<uintptr_t>(p) & (addralign - 1))
+ != init_align_modulo))
+ has_misaligned_strings = true;
+
+diff --git a/gold/object.cc b/gold/object.cc
+index 374340fa16..711793e5e4 100644
+--- a/gold/object.cc
++++ b/gold/object.cc
+@@ -751,11 +751,13 @@ build_compressed_section_map(
+ const unsigned char* contents =
+ obj->section_contents(i, &len, false);
+ uint64_t uncompressed_size;
++ Compressed_section_info info;
+ if (is_zcompressed)
+ {
+ // Skip over the ".zdebug" prefix.
+ name += 7;
+ uncompressed_size = get_uncompressed_size(contents, len);
++ info.addralign = shdr.get_sh_addralign();
+ }
+ else
+ {
+@@ -763,8 +765,8 @@ build_compressed_section_map(
+ name += 6;
+ elfcpp::Chdr<size, big_endian> chdr(contents);
+ uncompressed_size = chdr.get_ch_size();
++ info.addralign = chdr.get_ch_addralign();
+ }
+- Compressed_section_info info;
+ info.size = convert_to_section_size_type(uncompressed_size);
+ info.flag = shdr.get_sh_flags();
+ info.contents = NULL;
+@@ -3060,7 +3062,8 @@ const unsigned char*
+ Object::decompressed_section_contents(
+ unsigned int shndx,
+ section_size_type* plen,
+- bool* is_new)
++ bool* is_new,
++ uint64_t* palign)
+ {
+ section_size_type buffer_size;
+ const unsigned char* buffer = this->do_section_contents(shndx, &buffer_size,
+@@ -3087,6 +3090,8 @@ Object::decompressed_section_contents(
+ {
+ *plen = uncompressed_size;
+ *is_new = false;
++ if (palign != NULL)
++ *palign = p->second.addralign;
+ return p->second.contents;
+ }
+
+@@ -3108,6 +3113,8 @@ Object::decompressed_section_contents(
+ // once in this pass.
+ *plen = uncompressed_size;
+ *is_new = true;
++ if (palign != NULL)
++ *palign = p->second.addralign;
+ return uncompressed_data;
+ }
+
+diff --git a/gold/object.h b/gold/object.h
+index 0b786a5471..b99548463d 100644
+--- a/gold/object.h
++++ b/gold/object.h
+@@ -373,6 +373,7 @@ struct Compressed_section_info
+ {
+ section_size_type size;
+ elfcpp::Elf_Xword flag;
++ uint64_t addralign;
+ const unsigned char* contents;
+ };
+ typedef std::map<unsigned int, Compressed_section_info> Compressed_section_map;
+@@ -808,7 +809,8 @@ class Object
+
+ bool
+ section_is_compressed(unsigned int shndx,
+- section_size_type* uncompressed_size) const
++ section_size_type* uncompressed_size,
++ elfcpp::Elf_Xword* palign = NULL) const
+ {
+ if (this->compressed_sections_ == NULL)
+ return false;
+@@ -818,6 +820,8 @@ class Object
+ {
+ if (uncompressed_size != NULL)
+ *uncompressed_size = p->second.size;
++ if (palign != NULL)
++ *palign = p->second.addralign;
+ return true;
+ }
+ return false;
+@@ -828,7 +832,7 @@ class Object
+ // by the caller.
+ const unsigned char*
+ decompressed_section_contents(unsigned int shndx, section_size_type* plen,
+- bool* is_cached);
++ bool* is_cached, uint64_t* palign = NULL);
+
+ // Discard any buffers of decompressed sections. This is done
+ // at the end of the Add_symbols task.
+diff --git a/gold/output.cc b/gold/output.cc
+index 1701db1c99..75ac3bcf97 100644
+--- a/gold/output.cc
++++ b/gold/output.cc
+@@ -2448,7 +2448,13 @@ Output_section::add_input_section(Layout* layout,
+ unsigned int reloc_shndx,
+ bool have_sections_script)
+ {
++ section_size_type input_section_size = shdr.get_sh_size();
++ section_size_type uncompressed_size;
+ elfcpp::Elf_Xword addralign = shdr.get_sh_addralign();
++ if (object->section_is_compressed(shndx, &uncompressed_size,
++ &addralign))
++ input_section_size = uncompressed_size;
++
+ if ((addralign & (addralign - 1)) != 0)
+ {
+ object->error(_("invalid alignment %lu for section \"%s\""),
+@@ -2498,11 +2504,6 @@ Output_section::add_input_section(Layout* layout,
+ }
+ }
+
+- section_size_type input_section_size = shdr.get_sh_size();
+- section_size_type uncompressed_size;
+- if (object->section_is_compressed(shndx, &uncompressed_size))
+- input_section_size = uncompressed_size;
+-
+ off_t offset_in_section;
+
+ if (this->has_fixed_layout())
+--
+2.20.1
+
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
index 813509160..d5a1ea1dc 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch
@@ -21,25 +21,6 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/syms.c | 22 ++++++++++++++++------
3 files changed, 33 insertions(+), 7 deletions(-)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 04c0c2a..fef5479 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,3 +1,12 @@
-+2018-09-20 Alan Modra <amodra@gmail.com>
-+
-+ PR 23686
-+ * dwarf2.c (read_section): Error when attempting to malloc
-+ "(bfd_size_type) -1".
-+ * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
-+ function_name. Bounds check reloc address. Formatting. Ensure
-+ .stabstr zero terminated.
-+
- 2018-08-12 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/23428
-diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
-index 3b28855..77a7368 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -527,6 +527,7 @@ read_section (bfd * abfd,
@@ -65,11 +46,9 @@ index 3b28855..77a7368 100644
if (contents == NULL)
return FALSE;
if (syms
-diff --git a/bfd/syms.c b/bfd/syms.c
-index 187071f..e09640a 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
-@@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd
0, strsize))
return FALSE;
@@ -80,7 +59,7 @@ index 187071f..e09640a 100644
/* If this is a relocatable object file, we have to relocate
the entries in .stab. This should always be simple 32 bit
relocations against symbols defined in this object file, so
-@@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd
|| r->howto->bitsize != 32
|| r->howto->pc_relative
|| r->howto->bitpos != 0
@@ -90,7 +69,7 @@ index 187071f..e09640a 100644
{
_bfd_error_handler
(_("unsupported .stab relocation"));
-@@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd
{
nul_fun = stab;
nul_str = str;
@@ -100,7 +79,7 @@ index 187071f..e09640a 100644
file_name = NULL;
if (stab + STABSIZE + TYPEOFF < info->stabs + stabsize
&& *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO)
-@@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd
directory_name = file_name;
file_name = ((char *) str
+ bfd_get_32 (abfd, stab + STRDXOFF));
@@ -110,7 +89,7 @@ index 187071f..e09640a 100644
file_name = NULL;
}
}
-@@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
/* PR 17512: file: 0c680a1f. */
/* PR 17512: file: 5da8aec4. */
@@ -120,7 +99,7 @@ index 187071f..e09640a 100644
file_name = NULL;
break;
-@@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd
function_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
if (function_name == (char *) str)
continue;
@@ -130,7 +109,7 @@ index 187071f..e09640a 100644
function_name = NULL;
nul_fun = NULL;
-@@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
+@@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd
if (val <= offset)
{
file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
@@ -140,5 +119,3 @@ index 187071f..e09640a 100644
file_name = NULL;
*pline = 0;
}
---
-2.9.3
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch
index cef10a754..45c637967 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch
@@ -15,27 +15,9 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/peXXigen.c | 11 ++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index fef5479..81b9e56 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,5 +1,11 @@
- 2018-09-20 Alan Modra <amodra@gmail.com>
-
-+ PR 23685
-+ * peXXigen.c (pe_print_edata): Correct export address table
-+ overflow checks. Check dataoff against section size too.
-+
-+2018-09-20 Alan Modra <amodra@gmail.com>
-+
- PR 23686
- * dwarf2.c (read_section): Error when attempting to malloc
- "(bfd_size_type) -1".
-diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
-index 598f2ca..1645ef4 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
-@@ -1661,7 +1661,8 @@ pe_print_edata (bfd * abfd, void * vfile)
+@@ -1661,7 +1661,8 @@ pe_print_edata (bfd * abfd, void * vfile
dataoff = addr - section->vma;
datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size;
@@ -45,7 +27,7 @@ index 598f2ca..1645ef4 100644
{
fprintf (file,
_("\nThere is an export table in %s, but it does not fit into that section\n"),
-@@ -1778,11 +1779,11 @@ pe_print_edata (bfd * abfd, void * vfile)
+@@ -1778,11 +1779,11 @@ pe_print_edata (bfd * abfd, void * vfile
edt.base);
/* PR 17512: Handle corrupt PE binaries. */
@@ -61,5 +43,3 @@ index 598f2ca..1645ef4 100644
fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"),
(long) edt.eat_addr,
(long) edt.num_functions);
---
-2.9.3
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch
index b240a3f99..010e6b5d5 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch
@@ -49,39 +49,9 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/reloc.c | 19 +++++++++++++------
14 files changed, 50 insertions(+), 23 deletions(-)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 68c1ff665b..e9696ee314 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,3 +1,23 @@
-+2018-10-13 Alan Modra <amodra@gmail.com>
-+
-+ PR 23770
-+ PR 23425
-+ * reloc.c (_bfd_clear_contents): Replace "location" param with
-+ "buf" and "off". Bounds check "off". Return status.
-+ * cofflink.c (_bfd_coff_generic_relocate_section): Update
-+ _bfd_clear_contents call.
-+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Likewise.
-+ * elf32-arc.c (elf_arc_relocate_section): Likewise.
-+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
-+ * elf32-metag.c (metag_final_link_relocate): Likewise.
-+ * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Likewise.
-+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
-+ * elf32-visium.c (visium_elf_relocate_section): Likewise.
-+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
-+ * elf64-x86-64.c *(elf_x86_64_relocate_section): Likewise.
-+ * libbfd-in.h (_bfd_clear_contents): Update prototype.
-+ * libbfd.h: Regenerate.
-+
- 2018-09-20 Alan Modra <amodra@gmail.com>
-
- PR 23685
-diff --git a/bfd/cofflink.c b/bfd/cofflink.c
-index 2f73f72e31..b7ea69b7f9 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
-@@ -3080,7 +3080,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
+@@ -3080,7 +3080,7 @@ _bfd_coff_generic_relocate_section (bfd
if (sec != NULL && discarded_section (sec))
{
_bfd_clear_contents (howto, input_bfd, input_section,
@@ -90,11 +60,9 @@ index 2f73f72e31..b7ea69b7f9 100644
continue;
}
-diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
-index cf256f70e0..3374f411f9 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
-@@ -2811,7 +2811,7 @@ extern asection _bfd_elf_large_com_section;
+@@ -2811,7 +2811,7 @@ extern asection _bfd_elf_large_com_secti
{ \
int i_; \
_bfd_clear_contents (howto, input_bfd, input_section, \
@@ -103,11 +71,9 @@ index cf256f70e0..3374f411f9 100644
\
if (bfd_link_relocatable (info) \
&& (input_section->flags & SEC_DEBUGGING)) \
-diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
-index 7a1b3042ae..30f47a5b22 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
-@@ -1549,7 +1549,7 @@ elf_arc_relocate_section (bfd * output_bfd,
+@@ -1552,7 +1552,7 @@ elf_arc_relocate_section (bfd * outp
if (sec != NULL && discarded_section (sec))
{
_bfd_clear_contents (howto, input_bfd, input_section,
@@ -116,11 +82,9 @@ index 7a1b3042ae..30f47a5b22 100644
rel->r_info = 0;
rel->r_addend = 0;
-diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
-index 49797dcbfa..177471777d 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
-@@ -2197,7 +2197,7 @@ elf_i386_relocate_section (bfd *output_bfd,
+@@ -2197,7 +2197,7 @@ elf_i386_relocate_section (bfd *output_b
if (sec != NULL && discarded_section (sec))
{
_bfd_clear_contents (howto, input_bfd, input_section,
@@ -129,11 +93,9 @@ index 49797dcbfa..177471777d 100644
wrel->r_offset = rel->r_offset;
wrel->r_info = 0;
wrel->r_addend = 0;
-diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
-index efe95bddff..7f96246e5d 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
-@@ -1396,7 +1396,7 @@ metag_final_link_relocate (reloc_howto_type *howto,
+@@ -1396,7 +1396,7 @@ metag_final_link_relocate (reloc_howto_t
rel, relend, howto, contents) \
{ \
_bfd_clear_contents (howto, input_bfd, input_section, \
@@ -142,11 +104,9 @@ index efe95bddff..7f96246e5d 100644
\
if (bfd_link_relocatable (info) \
&& (input_section->flags & SEC_DEBUGGING)) \
-diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
-index 0d86e5b865..184cf320f7 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
-@@ -12582,14 +12582,14 @@ nds32_elf_get_relocated_section_contents (bfd *abfd,
+@@ -12582,14 +12582,14 @@ nds32_elf_get_relocated_section_contents
symbol = *(*parent)->sym_ptr_ptr;
if (symbol->section && discarded_section (symbol->section))
{
@@ -165,11 +125,9 @@ index 0d86e5b865..184cf320f7 100644
(*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
(*parent)->addend = 0;
(*parent)->howto = &none_howto;
-diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
-index 61f70de12e..c31e26efd7 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
-@@ -8232,7 +8232,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
+@@ -8232,7 +8232,7 @@ ppc_elf_relocate_section (bfd *output_bf
howto = ppc_elf_howto_table[r_type];
_bfd_clear_contents (howto, input_bfd, input_section,
@@ -178,11 +136,9 @@ index 61f70de12e..c31e26efd7 100644
wrel->r_offset = rel->r_offset;
wrel->r_info = 0;
wrel->r_addend = 0;
-diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c
-index e8f1c4c9e4..961366cd87 100644
--- a/bfd/elf32-visium.c
+++ b/bfd/elf32-visium.c
-@@ -621,7 +621,7 @@ visium_elf_relocate_section (bfd *output_bfd,
+@@ -621,7 +621,7 @@ visium_elf_relocate_section (bfd *output
or sections discarded by a linker script, we just want the
section contents zeroed. Avoid any special processing. */
_bfd_clear_contents (howto, input_bfd, input_section,
@@ -191,11 +147,9 @@ index e8f1c4c9e4..961366cd87 100644
rel->r_info = 0;
rel->r_addend = 0;
-diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
-index eadde17615..7c3534ac65 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
-@@ -14073,7 +14073,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
+@@ -14074,7 +14074,7 @@ ppc64_elf_relocate_section (bfd *output_
{
_bfd_clear_contents (ppc64_elf_howto_table[r_type],
input_bfd, input_section,
@@ -204,11 +158,9 @@ index eadde17615..7c3534ac65 100644
wrel->r_offset = rel->r_offset;
wrel->r_info = 0;
wrel->r_addend = 0;
-diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
-index c3a6c31ed2..4dcab43478 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
-@@ -2490,7 +2490,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
+@@ -2490,7 +2490,7 @@ elf_x86_64_relocate_section (bfd *output
if (sec != NULL && discarded_section (sec))
{
_bfd_clear_contents (howto, input_bfd, input_section,
@@ -217,11 +169,9 @@ index c3a6c31ed2..4dcab43478 100644
wrel->r_offset = rel->r_offset;
wrel->r_info = 0;
wrel->r_addend = 0;
-diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
-index e53b255dad..f6d9565f03 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
-@@ -696,8 +696,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
+@@ -696,8 +696,8 @@ extern bfd_reloc_status_type _bfd_reloca
(reloc_howto_type *, bfd *, bfd_vma, bfd_byte *) ATTRIBUTE_HIDDEN;
/* Clear a given location using a given howto. */
@@ -232,11 +182,9 @@ index e53b255dad..f6d9565f03 100644
/* Link stabs in sections in the first pass. */
-diff --git a/bfd/libbfd.h b/bfd/libbfd.h
-index a8851c8026..1189e63358 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
-@@ -701,8 +701,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents
+@@ -701,8 +701,8 @@ extern bfd_reloc_status_type _bfd_reloca
(reloc_howto_type *, bfd *, bfd_vma, bfd_byte *) ATTRIBUTE_HIDDEN;
/* Clear a given location using a given howto. */
@@ -247,11 +195,9 @@ index a8851c8026..1189e63358 100644
/* Link stabs in sections in the first pass. */
-diff --git a/bfd/reloc.c b/bfd/reloc.c
-index 8dbb8896d3..1686780669 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
-@@ -1613,16 +1613,22 @@ _bfd_relocate_contents (reloc_howto_type *howto,
+@@ -1613,16 +1613,22 @@ _bfd_relocate_contents (reloc_howto_type
relocations against discarded symbols, to make ignorable debug or unwind
information more obvious. */
@@ -276,7 +222,7 @@ index 8dbb8896d3..1686780669 100644
size = bfd_get_reloc_size (howto);
switch (size)
{
-@@ -1687,6 +1693,7 @@ _bfd_clear_contents (reloc_howto_type *howto,
+@@ -1681,6 +1687,7 @@ _bfd_clear_contents (reloc_howto_type *h
#endif
break;
}
@@ -284,7 +230,7 @@ index 8dbb8896d3..1686780669 100644
}
/*
-@@ -8275,14 +8282,14 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
+@@ -8268,14 +8275,14 @@ bfd_generic_get_relocated_section_conten
if (symbol->section && discarded_section (symbol->section))
{
@@ -303,6 +249,3 @@ index 8dbb8896d3..1686780669 100644
(*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
(*parent)->addend = 0;
(*parent)->howto = &none_howto;
---
-2.13.3
-
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch
index d6c706771..a117f95df 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch
@@ -15,25 +15,9 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/merge.c | 3 +++
2 files changed, 9 insertions(+)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 31ff3d6..da423b1 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,3 +1,9 @@
-+2018-10-23 Alan Modra <amodra@gmail.com>
-+
-+ PR 23804
-+ * merge.c (_bfd_add_merge_section): Don't attempt to merge
-+ sections where size is not a multiple of entsize.
-+
- 2018-10-13 Alan Modra <amodra@gmail.com>
-
- PR 23770
-diff --git a/bfd/merge.c b/bfd/merge.c
-index 7904552..5e3bba0 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
-@@ -376,6 +376,9 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec,
+@@ -376,6 +376,9 @@ _bfd_add_merge_section (bfd *abfd, void
|| sec->entsize == 0)
return TRUE;
@@ -43,5 +27,3 @@ index 7904552..5e3bba0 100644
if ((sec->flags & SEC_RELOC) != 0)
{
/* We aren't prepared to handle relocations in merged sections. */
---
-2.9.3
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch
index 35cf328a1..325c339b8 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch
@@ -15,24 +15,6 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/merge.c | 15 +++++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index 1f3fc1c..c5f7ec7 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,5 +1,11 @@
- 2018-10-23 Alan Modra <amodra@gmail.com>
-
-+ PR 23806
-+ * merge.c (_bfd_add_merge_section): Don't attempt to merge
-+ sections with ridiculously large alignments.
-+
-+2018-10-23 Alan Modra <amodra@gmail.com>
-+
- PR 23804
- * merge.c (_bfd_add_merge_section): Don't attempt to merge
- sections where size is not a multiple of entsize.
-diff --git a/bfd/merge.c b/bfd/merge.c
-index 5e3bba0..7de0c88 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -24,6 +24,7 @@
@@ -43,7 +25,7 @@ index 5e3bba0..7de0c88 100644
#include "bfd.h"
#include "elf-bfd.h"
#include "libbfd.h"
-@@ -385,12 +386,18 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec,
+@@ -385,12 +386,18 @@ _bfd_add_merge_section (bfd *abfd, void
return TRUE;
}
@@ -66,5 +48,3 @@ index 5e3bba0..7de0c88 100644
{
/* Sanity check. If string character size is smaller than
alignment, then we require character size to be a power
---
-2.9.3
diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch
index 38225d171..902a90dbc 100644
--- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch
+++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch
@@ -16,28 +16,9 @@ Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
bfd/elflink.c | 20 ++++++++++++++------
2 files changed, 21 insertions(+), 6 deletions(-)
-diff --git a/bfd/ChangeLog b/bfd/ChangeLog
-index da423b1..1f3fc1c 100644
---- a/bfd/ChangeLog
-+++ b/bfd/ChangeLog
-@@ -1,5 +1,12 @@
- 2018-10-23 Alan Modra <amodra@gmail.com>
-
-+ PR 23805
-+ * elflink.c (elf_link_input_bfd): Don't segfault on finding
-+ STT_TLS symbols without any TLS sections. Instead, change the
-+ symbol type to STT_NOTYPE.
-+
-+2018-10-23 Alan Modra <amodra@gmail.com>
-+
- PR 23806
- * merge.c (_bfd_add_merge_section): Don't attempt to merge
- sections with ridiculously large alignments.
-diff --git a/bfd/elflink.c b/bfd/elflink.c
-index c3876cb..87440db 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
-@@ -10489,8 +10489,11 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
+@@ -10496,8 +10496,11 @@ elf_link_input_bfd (struct elf_final_lin
if (ELF_ST_TYPE (osym.st_info) == STT_TLS)
{
/* STT_TLS symbols are relative to PT_TLS segment base. */
@@ -51,7 +32,7 @@ index c3876cb..87440db 100644
}
}
-@@ -11046,12 +11049,17 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
+@@ -11053,12 +11056,17 @@ elf_link_input_bfd (struct elf_final_lin
sym.st_value += osec->vma;
if (ELF_ST_TYPE (sym.st_info) == STT_TLS)
{
@@ -73,5 +54,3 @@ index c3876cb..87440db 100644
}
}
---
-2.9.3
diff --git a/poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch b/poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch
new file mode 100644
index 000000000..29c0d48fe
--- /dev/null
+++ b/poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch
@@ -0,0 +1,30 @@
+Fix compiler error seen with clang, The return value of this
+function is not checked anywhere so in a way its useless but
+still technically correct to return a value here
+
+Fixes
+
+../../bfd/reloc.c:1638:7: error: non-void function '_bfd_clear_contents' should return a value [-Wreturn-type]
+ return;
+ ^
+1 error generated.
+
+It has been fixed in master along with a larger cleanup and fix for relocations
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1dc9e2d63e37839ff1768346b2e3f52e338baba5
+
+Upstream-Status: Backport [Fixes differently]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/bfd/reloc.c
++++ b/bfd/reloc.c
+@@ -1629,7 +1629,7 @@ _bfd_clear_contents (reloc_howto_type *h
+ default:
+ abort ();
+ case 0:
+- return;
++ return 0;
+ case 1:
+ x = bfd_get_8 (input_bfd, location);
+ break;
diff --git a/poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch b/poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
deleted file mode 100644
index 5b1a53844..000000000
--- a/poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 01674fefe3bd24fd93412fbb3eb4e85fe70c80aa Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Mon, 18 Dec 2017 16:01:39 +0200
-Subject: [PATCH] i2c-tools: eeprog/Module.mk: Add missing dependency
-
-Absence of this dependency caused parallel build to run into a race
-and break.
-
-Upstream-Status: Accepted
-https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/commit/?id=f87c97317012a3b96b67237925893b8ffd5f4f50
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- eeprog/Module.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/eeprog/Module.mk b/eeprog/Module.mk
-index 9d36869..d215855 100644
---- a/eeprog/Module.mk
-+++ b/eeprog/Module.mk
-@@ -20,7 +20,7 @@ EEPROG_TARGETS := eeprog
- # Programs
- #
-
--$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o
-+$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o $(LIB_DEPS)
- $(CC) $(LDFLAGS) -o $@ $^ $(EEPROG_LDFLAGS)
-
- #
---
-2.4.0
-
diff --git a/poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch b/poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
deleted file mode 100644
index 426b4330e..000000000
--- a/poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From a6a59693066fd8da81f7107479df3e32a129247d Mon Sep 17 00:00:00 2001
-From: Jean Delvare <jdelvare@suse.de>
-Date: Wed, 6 Dec 2017 09:55:04 +0100
-Subject: [PATCH] lib/Module.mk: Add missing dependencies
-
-The lib symlinks lacked a dependency to the actual library file, so
-parallel builds could run into a race and break.
-
-Upstream-Status: Backport
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- lib/Module.mk | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/Module.mk b/lib/Module.mk
-index 432a051..fd2c8c4 100644
---- a/lib/Module.mk
-+++ b/lib/Module.mk
-@@ -42,11 +42,11 @@ endif
- $(LIB_DIR)/$(LIB_SHLIBNAME): $(LIB_DIR)/smbus.o
- $(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libi2c.map -Wl,-soname,$(LIB_SHSONAME) -o $@ $^ -lc
-
--$(LIB_DIR)/$(LIB_SHSONAME):
-+$(LIB_DIR)/$(LIB_SHSONAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
- $(RM) $@
- $(LN) $(LIB_SHLIBNAME) $@
-
--$(LIB_DIR)/$(LIB_SHBASENAME):
-+$(LIB_DIR)/$(LIB_SHBASENAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
- $(RM) $@
- $(LN) $(LIB_SHLIBNAME) $@
-
---
-2.4.0
-
diff --git a/poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch b/poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
deleted file mode 100644
index 33cf2d42a..000000000
--- a/poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 08b0d67ba7eceb862cb17f52eb1911e9579726ea Mon Sep 17 00:00:00 2001
-From: Jean Delvare <jdelvare@suse.de>
-Date: Thu, 14 Dec 2017 08:52:26 +0100
-Subject: [PATCH] tools/Module.mk: Add missing dependencies
-
-Better build the library before building the tools which link against
-it, otherwise parallel builds could run into a race and break.
-
-Upstream-Status: Backport
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
-Acked-by: Angelo Compagnucci <angelo@amarulasolutions.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- lib/Module.mk | 7 +++++++
- tools/Module.mk | 10 +++++-----
- 2 files changed, 12 insertions(+), 5 deletions(-)
-
-Index: i2c-tools-4.0/lib/Module.mk
-===================================================================
---- i2c-tools-4.0.orig/lib/Module.mk
-+++ i2c-tools-4.0/lib/Module.mk
-@@ -35,6 +35,13 @@ LIB_TARGETS += $(LIB_STLIBNAME)
- LIB_OBJECTS += smbus.ao
- endif
-
-+# Library file to link against (static or dynamic)
-+ifeq ($(USE_STATIC_LIB),1)
-+LIB_DEPS := $(LIB_DIR)/$(LIB_STLIBNAME)
-+else
-+LIB_DEPS := $(LIB_DIR)/$(LIB_SHBASENAME)
-+endif
-+
- #
- # Libraries
- #
-Index: i2c-tools-4.0/tools/Module.mk
-===================================================================
---- i2c-tools-4.0.orig/tools/Module.mk
-+++ i2c-tools-4.0/tools/Module.mk
-@@ -24,19 +24,19 @@ TOOLS_TARGETS := i2cdetect i2cdump i2cse
- # Programs
- #
-
--$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o
-+$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS)
- $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-
--$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
-+$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
- $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-
--$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
-+$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
- $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-
--$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
-+$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
- $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-
--$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o
-+$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS)
- $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS)
-
- #
diff --git a/poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch b/poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
deleted file mode 100644
index 703688d08..000000000
--- a/poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 226bc03acca44cf4b300597308064c44676b6f4b Mon Sep 17 00:00:00 2001
-From: Jean Delvare <jdelvare@suse.de>
-Date: Tue, 23 Jan 2018 14:24:16 +0100
-Subject: Delete duplicate i2c-dev.h
-
-The <linux/i2c-dev.h> header file is provided by the kernel, so drop
-our own copy of this file.
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Acked-by: Wolfram Sang <wsa@the-dreams.de>
----
- include/linux/i2c-dev.h | 72 -------------------------------------------------
- 1 file changed, 72 deletions(-)
- delete mode 100644 include/linux/i2c-dev.h
-
-diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
-deleted file mode 100644
-index 839d25a..0000000
---- a/include/linux/i2c-dev.h
-+++ /dev/null
-@@ -1,72 +0,0 @@
--/*
-- i2c-dev.h - i2c-bus driver, char device interface
--
-- Copyright (C) 1995-97 Simon G. Vogl
-- Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-- MA 02110-1301 USA.
--*/
--
--#ifndef _LINUX_I2C_DEV_H
--#define _LINUX_I2C_DEV_H
--
--#include <linux/types.h>
--
--
--/* /dev/i2c-X ioctl commands. The ioctl's parameter is always an
-- * unsigned long, except for:
-- * - I2C_FUNCS, takes pointer to an unsigned long
-- * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data
-- * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data
-- */
--#define I2C_RETRIES 0x0701 /* number of times a device address should
-- be polled when not acknowledging */
--#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */
--
--/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses
-- * are NOT supported! (due to code brokenness)
-- */
--#define I2C_SLAVE 0x0703 /* Use this slave address */
--#define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it
-- is already in use by a driver! */
--#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */
--
--#define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */
--
--#define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */
--
--#define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */
--#define I2C_SMBUS 0x0720 /* SMBus transfer */
--
--
--/* This is the structure as used in the I2C_SMBUS ioctl call */
--struct i2c_smbus_ioctl_data {
-- __u8 read_write;
-- __u8 command;
-- __u32 size;
-- union i2c_smbus_data *data;
--};
--
--/* This is the structure as used in the I2C_RDWR ioctl call */
--struct i2c_rdwr_ioctl_data {
-- struct i2c_msg *msgs; /* pointers to i2c_msgs */
-- __u32 nmsgs; /* number of i2c_msgs */
--};
--
--#define I2C_RDRW_IOCTL_MAX_MSGS 42
--
--
--#endif /* _LINUX_I2C_DEV_H */
---
-cgit v1.1
diff --git a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
index fe3247d82..2b4563d4f 100644
--- a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
+++ b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
@@ -5,14 +5,10 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
- file://0001-lib-Module.mk-Add-missing-dependencies.patch \
- file://0001-tools-Module.mk-Add-missing-dependencies.patch \
- file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \
- file://remove-i2c-dev.patch \
"
-SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa"
-SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403"
+SRC_URI[md5sum] = "3536237a6b51fb10caacdc3b8a496237"
+SRC_URI[sha256sum] = "ef8f77afc70e7dbfd1171bfeae87a8a7f10074829370ce8d9ccd585a014e0073"
inherit update-alternatives
diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
index de35104c6..9d0fe3b84 100644
--- a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
+++ b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
@@ -67,7 +67,7 @@ python(){
# Read JSON manifest
import json
- pythondir = d.getVar('THISDIR',True)
+ pythondir = d.getVar('THISDIR')
with open(pythondir+'/python/python2-manifest.json') as manifest_file:
manifest_str = manifest_file.read()
json_start = manifest_str.find('# EOC') + 6
diff --git a/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb b/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb
index 56236da07..c7bc4f3b0 100644
--- a/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb
+++ b/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb
@@ -81,7 +81,7 @@ python(){
# Read JSON manifest
import json
- pythondir = d.getVar('THISDIR',True)
+ pythondir = d.getVar('THISDIR')
with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
python_manifest=json.load(manifest_file)
diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb b/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb
index 200fe4da2..75ef3f4d0 100644
--- a/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb
+++ b/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb
@@ -104,9 +104,9 @@ do_install_append_class-native() {
do_install_append_class-nativesdk() {
for tool in ${WRAPPER_TOOLS}; do
create_wrapper ${D}$tool \
- RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/..} \
- MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/misc/magic.mgc \
+ RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \
+ RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \
+ MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \
RPM_NO_CHROOT_FOR_SCRIPTS=1
done
diff --git a/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.50.bb b/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.51.bb
index 5373a61d7..f28fd2f69 100644
--- a/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.50.bb
+++ b/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.51.bb
@@ -20,8 +20,8 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
"
-SRC_URI[md5sum] = "0547831efda8492648b7f0c652865dfd"
-SRC_URI[sha256sum] = "29378312d8887cbc14ffe8a7fadef2d5a08c7e7e1be942795142346ad95629eb"
+SRC_URI[md5sum] = "6e68c19601af332fa3c5f174245f59bf"
+SRC_URI[sha256sum] = "2af9fdb265d1f025bfa634e13770239712ecbd585e4975b8226edf1df74e9c82"
PACKAGECONFIG ??= "openssl pcre zlib \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
diff --git a/poky/meta/recipes-extended/tzcode/tzcode-native_2018g.bb b/poky/meta/recipes-extended/tzcode/tzcode-native_2018i.bb
index 3e2b60aea..f056370b4 100644
--- a/poky/meta/recipes-extended/tzcode/tzcode-native_2018g.bb
+++ b/poky/meta/recipes-extended/tzcode/tzcode-native_2018i.bb
@@ -11,10 +11,10 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz
UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-SRC_URI[tzcode.md5sum] = "b48f0282b80bb7dbe16e35626f446ae9"
-SRC_URI[tzcode.sha256sum] = "aa53f4fb6570f02081be61dc11ade19ea5a280c23822a5b4016ce0c6be23c427"
-SRC_URI[tzdata.md5sum] = "e71cb1f9d8d53c43904d79d7aeeedc1b"
-SRC_URI[tzdata.sha256sum] = "02dfde534872f6513ae4553a3388fdae579441e31b862ea99170dfc447f46a16"
+SRC_URI[tzcode.md5sum] = "6a6d98be8fa2fa3485e25343e79188b4"
+SRC_URI[tzcode.sha256sum] = "aaacdb876ca6fb9d58e244b462cbc7578a496b1b10994381b4b32b9f2ded32dc"
+SRC_URI[tzdata.md5sum] = "b3f0a1a789480a036e58466cd0702477"
+SRC_URI[tzdata.sha256sum] = "82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9"
S = "${WORKDIR}"
diff --git a/poky/meta/recipes-extended/tzdata/tzdata_2018g.bb b/poky/meta/recipes-extended/tzdata/tzdata_2018i.bb
index dba82ac62..4482e89d3 100644
--- a/poky/meta/recipes-extended/tzdata/tzdata_2018g.bb
+++ b/poky/meta/recipes-extended/tzdata/tzdata_2018i.bb
@@ -9,8 +9,8 @@ DEPENDS = "tzcode-native"
SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
-SRC_URI[tzdata.md5sum] = "e71cb1f9d8d53c43904d79d7aeeedc1b"
-SRC_URI[tzdata.sha256sum] = "02dfde534872f6513ae4553a3388fdae579441e31b862ea99170dfc447f46a16"
+SRC_URI[tzdata.md5sum] = "b3f0a1a789480a036e58466cd0702477"
+SRC_URI[tzdata.sha256sum] = "82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9"
inherit allarch
diff --git a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.28.0.bb b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.28.1.bb
index c2b3cd895..693c109d8 100644
--- a/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.28.0.bb
+++ b/poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.28.1.bb
@@ -9,5 +9,5 @@ DEPENDS = "glib-2.0 intltool-native"
inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
-SRC_URI[archive.md5sum] = "370610e29b37d063ede3ef0f29c06eb9"
-SRC_URI[archive.sha256sum] = "4cb4cd7790b77e5542ec75275237613ad22f3a1f2f41903a298cf6cc996a9167"
+SRC_URI[archive.md5sum] = "83bb19d025f126fae495ab43a2f26f40"
+SRC_URI[archive.sha256sum] = "f88ea6849ffe897c51cfeca5e45c3890010c82c58be2aee18b01349648e5502f"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.18.bb b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.18.bb
index bc28e1c02..d4a21a03d 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.18.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-rt_4.18.bb
@@ -11,13 +11,13 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
-SRCREV_machine ?= "6228ee37a46479d624e608c572d241f74eee11b6"
-SRCREV_meta ?= "8f4a98c93851f7f83d796aae2871df2798b8d917"
+SRCREV_machine ?= "5cc3fddf0e2a9f390b00d50f27c726a5aea86d85"
+SRCREV_meta ?= "ce063086f1a9bd2f8d361f91757755df83aa1f13"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.18;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.18.21"
+LINUX_VERSION ?= "4.18.25"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.18.bb b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.18.bb
index b2ca26498..2efa40f16 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.18.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.18.bb
@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "4.18.21"
+LINUX_VERSION ?= "4.18.25"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine_qemuarm ?= "bd4312baf01b5aca2745245c3856b5143bf0c6ad"
-SRCREV_machine ?= "9eddc793f95f4e7e283996a007e205622c633539"
-SRCREV_meta ?= "8f4a98c93851f7f83d796aae2871df2798b8d917"
+SRCREV_machine_qemuarm ?= "214d5273e58b56f89795bf384068e7b8c21c0f8d"
+SRCREV_machine ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_meta ?= "ce063086f1a9bd2f8d361f91757755df83aa1f13"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/poky/meta/recipes-kernel/linux/linux-yocto_4.18.bb b/poky/meta/recipes-kernel/linux/linux-yocto_4.18.bb
index 96c89723e..1ecbec992 100644
--- a/poky/meta/recipes-kernel/linux/linux-yocto_4.18.bb
+++ b/poky/meta/recipes-kernel/linux/linux-yocto_4.18.bb
@@ -11,21 +11,21 @@ KBRANCH_qemux86 ?= "v4.18/standard/base"
KBRANCH_qemux86-64 ?= "v4.18/standard/base"
KBRANCH_qemumips64 ?= "v4.18/standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "bd83f95a7aa1aa180dad74dbdd6809ee9a5fe9e0"
-SRCREV_machine_qemuarm64 ?= "9eddc793f95f4e7e283996a007e205622c633539"
-SRCREV_machine_qemumips ?= "9a16770a65e7617b99f31663b1fafceb459df3dc"
-SRCREV_machine_qemuppc ?= "9eddc793f95f4e7e283996a007e205622c633539"
-SRCREV_machine_qemux86 ?= "9eddc793f95f4e7e283996a007e205622c633539"
-SRCREV_machine_qemux86-64 ?= "9eddc793f95f4e7e283996a007e205622c633539"
-SRCREV_machine_qemumips64 ?= "6641acbf076ba3f7ad96e846581272215a537904"
-SRCREV_machine ?= "9eddc793f95f4e7e283996a007e205622c633539"
-SRCREV_meta ?= "8f4a98c93851f7f83d796aae2871df2798b8d917"
+SRCREV_machine_qemuarm ?= "0002e7595bd75ecb2c1561d4b5c025130ccd31f3"
+SRCREV_machine_qemuarm64 ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_machine_qemumips ?= "28983ad3c7a64c15c154c1edf1d11472abb778f7"
+SRCREV_machine_qemuppc ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_machine_qemux86 ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_machine_qemux86-64 ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_machine_qemumips64 ?= "3be07269ed012fb6d148bd641ee40a40cb6cb13f"
+SRCREV_machine ?= "28e7781d57a59227bf1c08c7f3dbdfee16aa0dc2"
+SRCREV_meta ?= "ce063086f1a9bd2f8d361f91757755df83aa1f13"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.18;destsuffix=${KMETA}"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION ?= "4.18.21"
+LINUX_VERSION ?= "4.18.25"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
diff --git a/poky/meta/recipes-multimedia/libpng/libpng_1.6.35.bb b/poky/meta/recipes-multimedia/libpng/libpng_1.6.36.bb
index 5ae0a91a7..3cf4f7249 100644
--- a/poky/meta/recipes-multimedia/libpng/libpng_1.6.35.bb
+++ b/poky/meta/recipes-multimedia/libpng/libpng_1.6.36.bb
@@ -2,16 +2,16 @@ SUMMARY = "PNG image format decoding library"
HOMEPAGE = "http://www.libpng.org/"
SECTION = "libs"
LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4791381a76f106ac4699f6261c65ee29 \
- file://png.h;endline=144;md5=090ba5769782e8a1663a45fab1c2b36c \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=12b4ec50384c800bc568f519671b120c \
+ file://png.h;endline=144;md5=15ae15f53376306868259924a9db4e05 \
"
DEPENDS = "zlib"
LIBV = "16"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz"
-SRC_URI[md5sum] = "678b7e696a62a193ed3503b04bf449d6"
-SRC_URI[sha256sum] = "23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7"
+SRC_URI[md5sum] = "df2be2d29c40937fe1f5349b16bc2826"
+SRC_URI[sha256sum] = "eceb924c1fa6b79172fdfd008d335f0e59172a86a66481e09d4089df872aa319"
MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
diff --git a/poky/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch b/poky/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch
new file mode 100644
index 000000000..c3f44ca23
--- /dev/null
+++ b/poky/meta/recipes-multimedia/libsndfile/libsndfile1/0001-a-ulaw-fix-multiple-buffer-overflows-432.patch
@@ -0,0 +1,101 @@
+From 39453899fe1bb39b2e041fdf51a85aecd177e9c7 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Mon, 7 Jan 2019 15:55:03 +0800
+Subject: [PATCH] a/ulaw: fix multiple buffer overflows (#432)
+
+i2ulaw_array() and i2alaw_array() fail to handle ptr [count] = INT_MIN
+properly, leading to buffer underflow. INT_MIN is a special value
+since - INT_MIN cannot be represented as int.
+
+In this case round - INT_MIN to INT_MAX and proceed as usual.
+
+f2ulaw_array() and f2alaw_array() fail to handle ptr [count] = NaN
+properly, leading to null pointer dereference.
+
+In this case, arbitrarily set the buffer value to 0.
+
+This commit fixes #429 (CVE-2018-19661 and CVE-2018-19662) and
+fixes #344 (CVE-2017-17456 and CVE-2017-17457).
+
+Upstream-Status: Backport[https://github.com/erikd/libsndfile/
+commit/585cc28a93be27d6938f276af0011401b9f7c0ca]
+
+CVE: CVE-2017-17456 CVE-2017-17457 CVE-2018-19661 CVE-2018-19662
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/alaw.c | 9 +++++++--
+ src/ulaw.c | 9 +++++++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/alaw.c b/src/alaw.c
+index 063fd1a..4220224 100644
+--- a/src/alaw.c
++++ b/src/alaw.c
+@@ -19,6 +19,7 @@
+ #include "sfconfig.h"
+
+ #include <math.h>
++#include <limits.h>
+
+ #include "sndfile.h"
+ #include "common.h"
+@@ -326,7 +327,9 @@ s2alaw_array (const short *ptr, int count, unsigned char *buffer)
+ static inline void
+ i2alaw_array (const int *ptr, int count, unsigned char *buffer)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (ptr [count] == INT_MIN)
++ buffer [count] = alaw_encode [INT_MAX >> (16 + 4)] ;
++ else if (ptr [count] >= 0)
+ buffer [count] = alaw_encode [ptr [count] >> (16 + 4)] ;
+ else
+ buffer [count] = 0x7F & alaw_encode [- ptr [count] >> (16 + 4)] ;
+@@ -346,7 +349,9 @@ f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
+ static inline void
+ d2alaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (!isfinite (ptr [count]))
++ buffer [count] = 0 ;
++ else if (ptr [count] >= 0)
+ buffer [count] = alaw_encode [lrint (normfact * ptr [count])] ;
+ else
+ buffer [count] = 0x7F & alaw_encode [- lrint (normfact * ptr [count])] ;
+diff --git a/src/ulaw.c b/src/ulaw.c
+index e50b4cb..b6070ad 100644
+--- a/src/ulaw.c
++++ b/src/ulaw.c
+@@ -19,6 +19,7 @@
+ #include "sfconfig.h"
+
+ #include <math.h>
++#include <limits.h>
+
+ #include "sndfile.h"
+ #include "common.h"
+@@ -827,7 +828,9 @@ s2ulaw_array (const short *ptr, int count, unsigned char *buffer)
+ static inline void
+ i2ulaw_array (const int *ptr, int count, unsigned char *buffer)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (ptr [count] == INT_MIN)
++ buffer [count] = ulaw_encode [INT_MAX >> (16 + 2)] ;
++ else if (ptr [count] >= 0)
+ buffer [count] = ulaw_encode [ptr [count] >> (16 + 2)] ;
+ else
+ buffer [count] = 0x7F & ulaw_encode [-ptr [count] >> (16 + 2)] ;
+@@ -847,7 +850,9 @@ f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact
+ static inline void
+ d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact)
+ { while (--count >= 0)
+- { if (ptr [count] >= 0)
++ { if (!isfinite (ptr [count]))
++ buffer [count] = 0 ;
++ else if (ptr [count] >= 0)
+ buffer [count] = ulaw_encode [lrint (normfact * ptr [count])] ;
+ else
+ buffer [count] = 0x7F & ulaw_encode [- lrint (normfact * ptr [count])] ;
+--
+2.7.4
+
diff --git a/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
index b28f67528..13248f5cb 100644
--- a/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
+++ b/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
@@ -13,6 +13,7 @@ SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
file://CVE-2017-14245-14246.patch \
file://CVE-2017-14634.patch \
file://CVE-2018-13139.patch \
+ file://0001-a-ulaw-fix-multiple-buffer-overflows-432.patch \
"
SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"
diff --git a/poky/meta/recipes-support/boost/bjam-native_1.68.0.bb b/poky/meta/recipes-support/boost/bjam-native_1.69.0.bb
index 94f96e62d..94f96e62d 100644
--- a/poky/meta/recipes-support/boost/bjam-native_1.68.0.bb
+++ b/poky/meta/recipes-support/boost/bjam-native_1.69.0.bb
diff --git a/poky/meta/recipes-support/boost/boost-1.68.0.inc b/poky/meta/recipes-support/boost/boost-1.69.0.inc
index b367a80b6..923436b1e 100644
--- a/poky/meta/recipes-support/boost/boost-1.68.0.inc
+++ b/poky/meta/recipes-support/boost/boost-1.69.0.inc
@@ -12,8 +12,8 @@ BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
BOOST_P = "boost_${BOOST_VER}"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/boost/boost/${PV}/${BOOST_P}.tar.bz2"
-SRC_URI[md5sum] = "7fbd1890f571051f2a209681d57d486a"
-SRC_URI[sha256sum] = "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7"
+SRC_URI[md5sum] = "a1332494397bf48332cb152abfefcec2"
+SRC_URI[sha256sum] = "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406"
UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
diff --git a/poky/meta/recipes-support/boost/boost.inc b/poky/meta/recipes-support/boost/boost.inc
index c4faea211..9be3717fd 100644
--- a/poky/meta/recipes-support/boost/boost.inc
+++ b/poky/meta/recipes-support/boost/boost.inc
@@ -21,7 +21,6 @@ BOOST_LIBS = "\
random \
regex \
serialization \
- signals \
system \
timer \
test \
diff --git a/poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/poky/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
index fb6d9711b..8944cb37b 100644
--- a/poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
+++ b/poky/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
@@ -1,21 +1,20 @@
-From 0868761e7d2d75d472090e3ef96f3d2f9ced27f3 Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson@mentor.com>
-Date: Tue, 13 Dec 2016 10:29:32 -0700
-Subject: [PATCH 5/6] Don't set up arch/instruction-set flags, we do that
- ourselves
+From 3e4eb02eb5951058bc6f8dffbf049eb189df8291 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 18 Dec 2018 15:42:57 +0100
+Subject: [PATCH] Don't set up arch/instruction-set flags, we do that ourselves
Upstream-Status: Inappropriate
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
- tools/build/src/tools/gcc.jam | 127 ------------------------------------------
- 1 file changed, 127 deletions(-)
+ tools/build/src/tools/gcc.jam | 128 ----------------------------------
+ 1 file changed, 128 deletions(-)
diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index e3b1b952..e4fc6c32 100644
+index c57c773f..28618fb1 100644
--- a/tools/build/src/tools/gcc.jam
+++ b/tools/build/src/tools/gcc.jam
-@@ -1276,130 +1276,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+@@ -1152,131 +1152,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
<architecture>$(architecture)/<instruction-set>$(instruction-set)
: $(values) ;
}
@@ -65,6 +64,7 @@ index e3b1b952..e4fc6c32 100644
-cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
-cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
-cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
+-cpu-flags gcc OPTIONS : x86 : icelake : -march=icelake ;
-cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
-cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
-cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
@@ -146,6 +146,3 @@ index e3b1b952..e4fc6c32 100644
-cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
-# AIX variant of RS/6000 & PowerPC
-toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
---
-2.15.1
-
diff --git a/poky/meta/recipes-support/boost/boost/reproducibility-add-file-directive-to-assembler.patch b/poky/meta/recipes-support/boost/boost/reproducibility-add-file-directive-to-assembler.patch
deleted file mode 100644
index 155653316..000000000
--- a/poky/meta/recipes-support/boost/boost/reproducibility-add-file-directive-to-assembler.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-Author: Douglas Royds <douglas.royds@taitradio.com>
-Date: Thu Nov 22 09:34:22 2018 +1300
-
-Add a .file directive explicitly for all *_elf_gas.S files to prevent the linker
-adding a host build-system path as a FILE symbol to the object file.
-
-This replaces the existing patch that added the .file directive to a small
-subset of these files.
-
-Upstream-Status: Submitted [https://github.com/boostorg/context/issues/91]
-Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
-
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_arm64_aapcs_elf_gas.S 2018-11-22 09:04:27.900876941 +1300
-@@ -51,6 +51,7 @@
- * *
- *******************************************************/
-
-+.file "jump_arm64_aapcs_elf_gas.S"
- .text
- .align 2
- .global jump_fcontext
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_arm_aapcs_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_arm_aapcs_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_arm_aapcs_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_arm_aapcs_elf_gas.S 2018-11-22 09:04:28.876898240 +1300
-@@ -38,6 +38,7 @@
- * *
- *******************************************************/
-
-+.file "jump_arm_aapcs_elf_gas.S"
- .text
- .globl jump_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_i386_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_i386_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_i386_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_i386_sysv_elf_gas.S 2018-11-22 09:04:29.904920674 +1300
-@@ -24,6 +24,7 @@
- * *
- ****************************************************************************************/
-
-+.file "jump_i386_sysv_elf_gas.S"
- .text
- .globl jump_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_mips32_o32_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_mips32_o32_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_mips32_o32_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_mips32_o32_elf_gas.S 2018-11-22 09:04:41.021163195 +1300
-@@ -38,6 +38,7 @@
- * *
- * *****************************************************/
-
-+.file "jump_mips32_o32_elf_gas.S"
- .text
- .globl jump_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_ppc32_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_ppc32_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_ppc32_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_ppc32_sysv_elf_gas.S 2018-11-22 09:04:42.281190679 +1300
-@@ -73,6 +73,7 @@
- * *
- *******************************************************/
-
-+.file "jump_ppc32_sysv_elf_gas.S"
- .text
- .globl jump_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_ppc64_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_ppc64_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_ppc64_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_ppc64_sysv_elf_gas.S 2018-11-22 09:04:43.193210571 +1300
-@@ -66,6 +66,7 @@
- * *
- *******************************************************/
-
-+.file "jump_ppc64_sysv_elf_gas.S"
- .globl jump_fcontext
- #if _CALL_ELF == 2
- .text
-diff -ur boost_1_68_0.original/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/jump_x86_64_sysv_elf_gas.S 2018-11-22 09:04:44.213232818 +1300
-@@ -24,6 +24,7 @@
- * *
- ****************************************************************************************/
-
-+.file "jump_x86_64_sysv_elf_gas.S"
- .text
- .globl jump_fcontext
- .type jump_fcontext,@function
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_arm64_aapcs_elf_gas.S boost_1_68_0/libs/context/src/asm/make_arm64_aapcs_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_arm64_aapcs_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_arm64_aapcs_elf_gas.S 2018-11-22 09:04:45.153253319 +1300
-@@ -51,6 +51,7 @@
- * *
- *******************************************************/
-
-+.file "make_arm64_aapcs_elf_gas.S"
- .text
- .align 2
- .global make_fcontext
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_arm_aapcs_elf_gas.S boost_1_68_0/libs/context/src/asm/make_arm_aapcs_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_arm_aapcs_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_arm_aapcs_elf_gas.S 2018-11-22 09:04:46.097273908 +1300
-@@ -38,6 +38,7 @@
- * *
- *******************************************************/
-
-+.file "make_arm_aapcs_elf_gas.S"
- .text
- .globl make_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_i386_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/make_i386_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_i386_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_i386_sysv_elf_gas.S 2018-11-22 09:04:46.973293012 +1300
-@@ -24,6 +24,7 @@
- * *
- ****************************************************************************************/
-
-+.file "make_i386_sysv_elf_gas.S"
- .text
- .globl make_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_mips32_o32_elf_gas.S boost_1_68_0/libs/context/src/asm/make_mips32_o32_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_mips32_o32_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_mips32_o32_elf_gas.S 2018-11-22 09:04:47.925313772 +1300
-@@ -38,6 +38,7 @@
- * *
- * *****************************************************/
-
-+.file "make_mips32_o32_elf_gas.S"
- .text
- .globl make_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_ppc32_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/make_ppc32_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_ppc32_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_ppc32_sysv_elf_gas.S 2018-11-22 09:04:48.865334271 +1300
-@@ -73,6 +73,7 @@
- * *
- *******************************************************/
-
-+.file "make_ppc32_sysv_elf_gas.S"
- .text
- .globl make_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_ppc64_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_ppc64_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_ppc64_sysv_elf_gas.S 2018-11-22 09:04:50.049360089 +1300
-@@ -66,6 +66,7 @@
- * *
- *******************************************************/
-
-+.file "make_ppc64_sysv_elf_gas.S"
- .globl make_fcontext
- #if _CALL_ELF == 2
- .text
-diff -ur boost_1_68_0.original/libs/context/src/asm/make_x86_64_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/make_x86_64_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/make_x86_64_sysv_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/make_x86_64_sysv_elf_gas.S 2018-11-22 09:04:51.117383378 +1300
-@@ -24,6 +24,7 @@
- * *
- ****************************************************************************************/
-
-+.file "make_x86_64_sysv_elf_gas.S"
- .text
- .globl make_fcontext
- .type make_fcontext,@function
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_arm64_aapcs_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_arm64_aapcs_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_arm64_aapcs_elf_gas.S 2018-11-21 16:31:18.601760893 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_arm64_aapcs_elf_gas.S 2018-11-22 09:04:52.201407013 +1300
-@@ -51,6 +51,7 @@
- * *
- *******************************************************/
-
-+.file "ontop_arm64_aapcs_elf_gas.S"
- .text
- .align 2
- .global ontop_fcontext
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_arm_aapcs_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_arm_aapcs_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_arm_aapcs_elf_gas.S 2018-11-21 16:31:18.605760935 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_arm_aapcs_elf_gas.S 2018-11-22 09:04:53.269430300 +1300
-@@ -38,6 +38,7 @@
- * *
- *******************************************************/
-
-+.file "ontop_arm_aapcs_elf_gas.S"
- .text
- .globl ontop_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_i386_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_i386_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_i386_sysv_elf_gas.S 2018-11-21 16:31:18.605760935 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_i386_sysv_elf_gas.S 2018-11-22 09:04:54.389454719 +1300
-@@ -24,6 +24,7 @@
- * *
- ****************************************************************************************/
-
-+.file "ontop_i386_sysv_elf_gas.S"
- .text
- .globl ontop_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_mips32_o32_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_mips32_o32_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_mips32_o32_elf_gas.S 2018-11-21 16:31:18.605760935 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_mips32_o32_elf_gas.S 2018-11-22 09:04:55.657482363 +1300
-@@ -38,6 +38,7 @@
- * *
- * *****************************************************/
-
-+.file "ontop_mips32_o32_elf_gas.S"
- .text
- .globl ontop_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_ppc32_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_ppc32_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_ppc32_sysv_elf_gas.S 2018-11-21 16:31:18.605760935 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_ppc32_sysv_elf_gas.S 2018-11-22 09:04:56.777506781 +1300
-@@ -73,6 +73,7 @@
- * *
- *******************************************************/
-
-+.file "ontop_ppc32_sysv_elf_gas.S"
- .text
- .globl ontop_fcontext
- .align 2
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S 2018-11-21 16:31:18.605760935 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S 2018-11-22 09:04:58.485544015 +1300
-@@ -66,6 +66,7 @@
- * *
- *******************************************************/
-
-+.file "ontop_ppc64_sysv_elf_gas.S"
- .globl ontop_fcontext
- #if _CALL_ELF == 2
- .text
-diff -ur boost_1_68_0.original/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S boost_1_68_0/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S
---- boost_1_68_0.original/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S 2018-11-21 16:31:18.605760935 +1300
-+++ boost_1_68_0/libs/context/src/asm/ontop_x86_64_sysv_elf_gas.S 2018-11-22 09:04:59.609568516 +1300
-@@ -24,6 +24,7 @@
- * *
- ****************************************************************************************/
-
-+.file "ontop_x86_64_sysv_elf_gas.S"
- .text
- .globl ontop_fcontext
- .type ontop_fcontext,@function
diff --git a/poky/meta/recipes-support/boost/boost_1.68.0.bb b/poky/meta/recipes-support/boost/boost_1.69.0.bb
index 82e36fd73..324b46f16 100644
--- a/poky/meta/recipes-support/boost/boost_1.68.0.bb
+++ b/poky/meta/recipes-support/boost/boost_1.69.0.bb
@@ -1,11 +1,9 @@
require boost-${PV}.inc
require boost.inc
-SRC_URI += "\
- file://arm-intrinsics.patch \
+SRC_URI += "file://arm-intrinsics.patch \
file://boost-CVE-2012-2677.patch \
file://boost-math-disable-pch-for-gcc.patch \
file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
- file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
- file://reproducibility-add-file-directive-to-assembler.patch \
+ file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
"
diff --git a/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch b/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
index ab0b6dccc..3f1c3abae 100644
--- a/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
+++ b/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
@@ -1,4 +1,4 @@
-From 5f38f1276a3651c30bddc508122da2e7d2d3ca92 Mon Sep 17 00:00:00 2001
+From 8eb4d25c25a1c1323797d94e0727a3e42b7f3287 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 22 Jan 2018 18:00:21 +0200
Subject: [PATCH] configure.ac: use a custom value for the location of
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 8c80377..a66d393 100644
+index 4d66af9..b9ef235 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1841,7 +1841,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
+@@ -1848,7 +1848,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
diff --git a/poky/meta/recipes-support/gnupg/gnupg/relocate.patch b/poky/meta/recipes-support/gnupg/gnupg/relocate.patch
index 860f7f1d9..c494ef80b 100644
--- a/poky/meta/recipes-support/gnupg/gnupg/relocate.patch
+++ b/poky/meta/recipes-support/gnupg/gnupg/relocate.patch
@@ -1,4 +1,4 @@
-From 1eaf630343cc77d8b5d41d0b0a3551fa193c5fcf Mon Sep 17 00:00:00 2001
+From f9fc214b0bf2f67b515ca8a5333f39c497d1b518 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Wed, 19 Sep 2018 14:44:40 +0100
Subject: [PATCH] Allow the environment to override where gnupg looks for its
diff --git a/poky/meta/recipes-support/gnupg/gnupg_2.2.11.bb b/poky/meta/recipes-support/gnupg/gnupg_2.2.12.bb
index d259ed532..1f381c2d9 100644
--- a/poky/meta/recipes-support/gnupg/gnupg_2.2.11.bb
+++ b/poky/meta/recipes-support/gnupg/gnupg_2.2.12.bb
@@ -19,8 +19,8 @@ SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-
file://relocate.patch"
-SRC_URI[md5sum] = "e23a896d634e8b81681314780f5158a4"
-SRC_URI[sha256sum] = "496c3e123ef53f35436ddccca58e82acaa901ca4e21174e77386c0cea0c49cd9"
+SRC_URI[md5sum] = "421b17028878b253c5acfef056bc6141"
+SRC_URI[sha256sum] = "db030f8b4c98640e91300d36d516f1f4f8fe09514a94ea9fc7411ee1a34082cb"
EXTRA_OECONF = "--disable-ldap \
--disable-ccid-driver \
diff --git a/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.6.bb b/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.8.bb
index 32d26a34e..b40e56714 100644
--- a/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.6.bb
+++ b/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.8.bb
@@ -6,13 +6,13 @@ LICENSE = "GPLv2 & MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
"
-PV .= "+git${SRCPV}"
-SRCBRANCH ?= "release-7_6"
-SRCREV = "76ffb3b87946e4c372d112d8d00786632deab934"
-SRC_URI = "git://github.com/ivmai/libatomic_ops;branch=${SRCBRANCH}"
+SRC_URI = "https://github.com/ivmai/libatomic_ops/releases/download/v${PV}/libatomic_ops-${PV}.tar.gz"
-S = "${WORKDIR}/git"
+SRC_URI[md5sum] = "99128f05e3e3f4e0cd39aa23f23bbe0c"
+SRC_URI[sha256sum] = "1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665"
+
+S = "${WORKDIR}/libatomic_ops-${PV}"
ALLOW_EMPTY_${PN} = "1"
diff --git a/poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks b/poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks
index 7ffd632f4..63bc4dab6 100644
--- a/poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks
+++ b/poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks
@@ -2,5 +2,5 @@
# long-description: Creates a partitioned SD card image. Boot files
# are located in the first vfat partition.
-part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16
-part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --size 16
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4
diff --git a/poky/scripts/oe-git-archive b/poky/scripts/oe-git-archive
index ab19cb9aa..913291a99 100755
--- a/poky/scripts/oe-git-archive
+++ b/poky/scripts/oe-git-archive
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
#
# Helper script for committing data to git and pushing upstream
#
@@ -208,6 +208,13 @@ def parse_args(argv):
help="Data to commit")
return parser.parse_args(argv)
+def get_nested(d, list_of_keys):
+ try:
+ for k in list_of_keys:
+ d = d[k]
+ return d
+ except KeyError:
+ return ""
def main(argv=None):
"""Script entry point"""
@@ -223,11 +230,11 @@ def main(argv=None):
# Get keywords to be used in tag and branch names and messages
metadata = metadata_from_bb()
- keywords = {'hostname': metadata['hostname'],
- 'branch': metadata['layers']['meta']['branch'],
- 'commit': metadata['layers']['meta']['commit'],
- 'commit_count': metadata['layers']['meta']['commit_count'],
- 'machine': metadata['config']['MACHINE']}
+ keywords = {'hostname': get_nested(metadata, ['hostname']),
+ 'branch': get_nested(metadata, ['layers', 'meta', 'branch']),
+ 'commit': get_nested(metadata, ['layers', 'meta', 'commit']),
+ 'commit_count': get_nested(metadata, ['layers', 'meta', 'commit_count']),
+ 'machine': get_nested(metadata, ['config', 'MACHINE'])}
# Expand strings early in order to avoid getting into inconsistent
# state (e.g. no tag even if data was committed)
diff --git a/poky/scripts/runqemu b/poky/scripts/runqemu
index 08f4cfe4c..55cdd414e 100755
--- a/poky/scripts/runqemu
+++ b/poky/scripts/runqemu
@@ -115,9 +115,9 @@ def check_tun():
raise RunQemuError("TUN control device %s is not writable, please fix (e.g. sudo chmod 666 %s)" % (dev_tun, dev_tun))
def check_libgl(qemu_bin):
- cmd = 'ldd %s' % qemu_bin
- logger.debug('Running %s...' % cmd)
- need_gl = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ cmd = ('ldd', qemu_bin)
+ logger.debug('Running %s...' % str(cmd))
+ need_gl = subprocess.check_output(cmd).decode('utf-8')
if re.search('libGLU', need_gl):
# We can't run without a libGL.so
libgl = False
@@ -398,7 +398,7 @@ class BaseConfig(object):
cmd = 'MACHINE=%s bitbake -e' % arg
logger.info('Running %s...' % cmd)
- self.bitbake_e = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ self.bitbake_e = subprocess.check_output(cmd, shell=True).decode('utf-8')
# bitbake -e doesn't report invalid MACHINE as an error, so
# let's check DEPLOY_DIR_IMAGE to make sure that it is a valid
# MACHINE.
@@ -838,10 +838,7 @@ class BaseConfig(object):
self.nfs_server = '192.168.7.1'
# Figure out a new nfs_instance to allow multiple qemus running.
- # CentOS 7.1's ps doesn't print full command line without "ww"
- # when invoke by subprocess.Popen().
- cmd = "ps auxww"
- ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ ps = subprocess.check_output(("ps", "auxww")).decode('utf-8')
pattern = '/bin/unfsd .* -i .*\.pid -e .*/exports([0-9]+) '
all_instances = re.findall(pattern, ps, re.M)
if all_instances:
@@ -881,17 +878,17 @@ class BaseConfig(object):
if not src:
raise RunQemuError("No NFS_DIR is set, and can't find %s or %s to extract" % (src1, src2))
logger.info('NFS_DIR not found, extracting %s to %s' % (src, dest))
- cmd = 'runqemu-extract-sdk %s %s' % (src, dest)
- logger.info('Running %s...' % cmd)
- if subprocess.call(cmd, shell=True) != 0:
+ cmd = ('runqemu-extract-sdk', src, dest)
+ logger.info('Running %s...' % str(cmd))
+ if subprocess.call(cmd) != 0:
raise RunQemuError('Failed to run %s' % cmd)
self.clean_nfs_dir = True
self.rootfs = dest
# Start the userspace NFS server
- cmd = 'runqemu-export-rootfs start %s' % self.rootfs
- logger.info('Running %s...' % cmd)
- if subprocess.call(cmd, shell=True) != 0:
+ cmd = ('runqemu-export-rootfs', 'start', self.rootfs)
+ logger.info('Running %s...' % str(cmd))
+ if subprocess.call(cmd) != 0:
raise RunQemuError('Failed to run %s' % cmd)
self.nfs_running = True
@@ -957,9 +954,9 @@ class BaseConfig(object):
except FileExistsError:
pass
- cmd = '%s link' % ip
- logger.debug('Running %s...' % cmd)
- ip_link = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+ cmd = (ip, 'link')
+ logger.debug('Running %s...' % str(cmd))
+ ip_link = subprocess.check_output(cmd).decode('utf-8')
# Matches line like: 6: tap0: <foo>
possibles = re.findall('^[0-9]+: +(tap[0-9]+): <.*', ip_link, re.M)
tap = ""
@@ -984,8 +981,8 @@ class BaseConfig(object):
gid = os.getgid()
uid = os.getuid()
logger.info("Setting up tap interface under sudo")
- cmd = 'sudo %s %s %s %s' % (self.qemuifup, uid, gid, self.bindir_native)
- tap = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8').rstrip('\n')
+ cmd = ('sudo', self.qemuifup, str(uid), str(gid), self.bindir_native)
+ tap = subprocess.check_output(cmd).decode('utf-8').strip()
lockfile = os.path.join(lockdir, tap)
self.lock = lockfile + '.lock'
self.acquire_lock()
@@ -1020,7 +1017,7 @@ class BaseConfig(object):
if self.get('QB_NET') == 'none':
return
if sys.stdin.isatty():
- self.saved_stty = subprocess.check_output("stty -g", shell=True).decode('utf-8')
+ self.saved_stty = subprocess.check_output(("stty", "-g")).decode('utf-8').strip()
self.network_device = self.get('QB_NETWORK_DEVICE') or self.network_device
if self.slirp_enabled:
self.setup_slirp()
@@ -1134,7 +1131,7 @@ class BaseConfig(object):
if not qemu_system:
raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!")
- qemu_bin = '%s/%s' % (self.bindir_native, qemu_system)
+ qemu_bin = os.path.join(self.bindir_native, qemu_system)
# It is possible to have qemu-native in ASSUME_PROVIDED, and it won't
# find QEMU in sysroot, it needs to use host's qemu.
@@ -1172,7 +1169,7 @@ class BaseConfig(object):
if self.serialstdio:
if sys.stdin.isatty():
- subprocess.check_call("stty intr ^]", shell=True)
+ subprocess.check_call(("stty", "intr", "^]"))
logger.info("Interrupt character is '^]'")
first_serial = ""
@@ -1236,20 +1233,19 @@ class BaseConfig(object):
logger.info("Cleaning up")
if self.cleantap:
- cmd = 'sudo %s %s %s' % (self.qemuifdown, self.tap, self.bindir_native)
- logger.debug('Running %s' % cmd)
- subprocess.check_call(cmd, shell=True)
+ cmd = ('sudo', self.qemuifdown, self.tap, self.bindir_native)
+ logger.debug('Running %s' % str(cmd))
+ subprocess.check_call(cmd)
self.release_lock()
if self.nfs_running:
logger.info("Shutting down the userspace NFS server...")
- cmd = "runqemu-export-rootfs stop %s" % self.rootfs
- logger.debug('Running %s' % cmd)
- subprocess.check_call(cmd, shell=True)
+ cmd = ("runqemu-export-rootfs", "stop", self.rootfs)
+ logger.debug('Running %s' % str(cmd))
+ subprocess.check_call(cmd)
if self.saved_stty:
- cmd = "stty %s" % self.saved_stty
- subprocess.check_call(cmd, shell=True)
+ subprocess.check_call(("stty", self.saved_stty))
if self.clean_nfs_dir:
logger.info('Removing %s' % self.rootfs)
@@ -1291,10 +1287,9 @@ class BaseConfig(object):
if result and os.path.exists(result):
return result
- cmd = 'bitbake qemu-helper-native -e'
- logger.info('Running %s...' % cmd)
- out = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
- out = out.stdout.read().decode('utf-8')
+ cmd = ('bitbake', 'qemu-helper-native', '-e')
+ logger.info('Running %s...' % str(cmd))
+ out = subprocess.check_output(cmd).decode('utf-8')
match = re.search('^STAGING_BINDIR_NATIVE="(.*)"', out, re.M)
if match:
diff --git a/poky/scripts/runqemu-gen-tapdevs b/poky/scripts/runqemu-gen-tapdevs
index 11de318c1..869fee261 100755
--- a/poky/scripts/runqemu-gen-tapdevs
+++ b/poky/scripts/runqemu-gen-tapdevs
@@ -22,22 +22,28 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+uid=`id -u`
+gid=`id -g`
+if [ -n "$SUDO_UID" ]; then
+ uid=$SUDO_UID
+fi
+if [ -n "$SUDO_GID" ]; then
+ gid=$SUDO_GID
+fi
+
usage() {
echo "Usage: sudo $0 <uid> <gid> <num> <staging_bindir_native>"
- echo "Where <uid> is the numeric user id the tap devices will be owned by"
+ echo "Where <uid> is the numeric user id the tap devices will be owned by"
echo "Where <gid> is the numeric group id the tap devices will be owned by"
echo "<num> is the number of tap devices to create (0 to remove all)"
echo "<native-sysroot-basedir> is the path to the build system's native sysroot"
- echo "e.g. $ bitbake qemu-helper-native"
- echo "$ sudo $0 1000 1000 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin"
+ echo "For example:"
+ echo "$ bitbake qemu-helper-native"
+ echo "$ sudo $0 $uid $gid 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin"
+ echo ""
exit 1
}
-if [ $EUID -ne 0 ]; then
- echo "Error: This script must be run with root privileges"
- exit
-fi
-
if [ $# -ne 4 ]; then
echo "Error: Incorrect number of arguments"
usage
@@ -54,6 +60,11 @@ if [[ ! -x "$TUNCTL" || -d "$TUNCTL" ]]; then
usage
fi
+if [ $EUID -ne 0 ]; then
+ echo "Error: This script must be run with root privileges"
+ exit
+fi
+
SCRIPT_DIR=`dirname $0`
RUNQEMU_IFUP="$SCRIPT_DIR/runqemu-ifup"
if [ ! -x "$RUNQEMU_IFUP" ]; then
OpenPOWER on IntegriCloud