Commit Graph

254 Commits

Author SHA1 Message Date
Ross Burton 3b3642cf5c qemu: fix memfd_create with glibc 2.27
glibc 2.27 has added memfd_create() but this conflicts with a copy in qemu, so
take a patch from upstream to fix building with glibc 2.27.

(From OE-Core rev: 8e6672055e804a0828e2f51fae9cbac81e4e834d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05 16:26:19 +01:00
Richard Purdie 364f6b5fac qemu: Backport a patch for recent glibc versions
This fixes compile failures of qemu-native with new versions of glibc. Patch
is taken from upstream.

(From OE-Core rev: 9c54510632d22c12850962572ce7276170ce5488)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-06 17:07:39 +01:00
brian avery 0637c5ab25 qemu-helper-native: prepare native sysroot for runqemu
Make sure that native sysroot contains qemu and tunctl binaries for
runqemu usage:
  - excluded native sysroot from rm_work
  - added qemu-native to DEPENDS to put qemu binaries into native sysroot
  - forced addto_recipe_sysroot task

[YOCTO #11266]
[YOCTO #11193]

(From OE-Core rev: 2e7a155774952705d21109720985f6833fba2669)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Martin Kelly e340af0449 qemu: use python2.7 instead of python2
meta/conf/bitbake.conf puts python2.7 into the HOSTTOOLS variable but not
python2, so only python2.7 is guaranteed. In addition, on some distros -- such
as Amazon Linux -- /usr/bin/python2 doesn't exist but python2.7 does. So, use
python2.7 for the --python= argument in the qemu configure step.

(From OE-Core rev: 88dc8b532817f4779b35422a413d5c700c130a74)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
Jussi Kukkonen a6707eda1d qemu: Remove uuid PACKAGECONFIG
--enable-uuid no longer exists: There's a uuid implementation in
libqemuutil.

(From OE-Core rev: 9da623d569ae552b1772a3b3a06df3cbf76cd573)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Sona Sarmadi 0884c80070 qemu: display: CVE-2016-9912
virtio-gpu: memory leakage when destroying gpu resource

Reference:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9912

Reference to upstream patch:
http://git.qemu-project.org/?p=qemu.git;a=patch;h=b8e23926c568f2e963af39028b71c472e3023793

(From OE-Core rev: 8bf7ade372b46b8a872661a7904fbaa30fa262a2)

Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Sona Sarmadi 5724b1e3d9 qemu: display: CVE-2016-9908
virtio-gpu: information leakage in virgl_cmd_get_capset

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9908

(From OE-Core rev: f5f4a08baeb4864984fcb9a837a3a8c51274df2b)

Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Nathan Rossi 27fbd839d4 qemu: Move recipe version specific patches and features to recipe
Move all the version specific patches, overrides and configuration that
are in qemu.inc to the versioned QEMU recipe.

This includes moving patches that target the versioned recipe, ptest
configuration (which is not available in QEMU by default) and the
installing of the powerpc_rom.bin.  All these patches/files are also
only located in the FILESEXTRAPATHS that is valid from the recipe file
and not from qemu.inc itself.

The purpose of this change is to make the qemu.inc re-usable for
multiple versions of QEMU as well as forks and recipes that intend to
provide custom patches.

(From OE-Core rev: 2431faeb88a008b501547808fb8632943b992dcb)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Nathan Rossi ed25789bc0 qemu: Convert KVMOPTS to PACKAGECONFIG
Move the KVMOPTS configuration checks and option setting to a
PACKAGECONFIG option.

This also changes the checking of KVM support on the host build machine
so that it is processed as a PACKAGECONFIG _remove for class-native
only. The darwin/mingw32 overrides are kept and applied as _remove
overrides.

(From OE-Core rev: 75a1dd39a63329e9b2d41d3a12ff58049248d2ff)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Nathan Rossi 6e7a2f0ba3 qemu: Consolidate EXTRA_OECONF
Consolidate the configure options into the EXTRA_OECONF variable,
including merging any native(sdk) specific options.

This consolidation also makes the use of 'system' pixman in the
nativesdk case, this is desirable as the QEMU internal pixman may not be
available (using QEMU git as opposed to tarball) and pixman is already
in DEPENDS. Additionally the QEMU configure recommends to use the system
pixman if available.

Additionally move the options specified in the do_configure into the
EXTRA_OECONF variable. And flesh out all the target directories.

(From OE-Core rev: 9d908f6369e938f1da4456dbc07c64f328656182)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
Nathan Rossi 7065bb2148 qemu: Improve and add PACKAGECONFIG options
Move the '--disable-bluez' and '--disable-iscsi' options to
PACKAGECONFIG. And added the ${BLUEZ} dependency.

Fix up the 'gcrypt' option to depend on 'libgcrypt' instead of gcrypt.
This is the expected dependency as noted in the QEMU configure help.

Handle the '--audio-drv-list' option inside the PACKAGECONFIG[alsa]
args. The previous setting uses a ',' to denote the options for the arg
however a space inside quotes is also acceptable and allows the arg to
be used into the PACKAGECONFIG flag.

(From OE-Core rev: 0aca9b735c6f9d7ffe2826e624942a563c501d1f)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Martin Jansa 6c23b6c586 qemu: fix build with glibc-2.25
(From OE-Core rev: c0ab96a7b7d2c41167e2ad79be76f6eec2b6ebb5)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:07 +00:00
Peter Kjellerstedt 254bfb1071 recipes: Make use of the new bb.utils.filter() function
(From OE-Core rev: 0a1427bf9aeeda6bee2cc0af8da4ea5fd90aef6f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:45 +00:00
Patrick Ohly 81b7a9832f qemu: support virtual TPM
This enables the use of swtpm (from meta-security) as a virtual TPM in
qemu. These patches extend the existing support in qemu for TPM
passthrough so that a swtpm daemon can be accessed via CUSE (character
device in user space).

To use this:
 - add the meta-security layer including the swtpm enhancements for qemu
 - bitbake swtpm-native
 - create a TPM instance and initialize it with:

   $ mkdir -p my-machine/myvtpm0
   $ tmp-glibc/sysroots/x86_64-linux/usr/bin/swtpm_setup_oe.sh --tpm-state my-machine/myvtpm0 --createek
   Starting vTPM manufacturing as root:root @ Fri 20 Jan 2017 08:56:18 AM CET
   TPM is listening on TCP port 52167.
   Successfully created EK.
   Successfully authored TPM state.
   Ending vTPM manufacturing @ Fri 20 Jan 2017 08:56:19 AM CET

 - run swtpm *before each runqemu invocation* (it shuts down after use) and
   do it as root (required to set up the /dev/vtpm0 CUSE device):

   $ sudo sh -c 'PATH=`pwd`/tmp-glibc/sysroots/x86_64-linux/usr/bin/:`pwd`/tmp-glibc/sysroots/x86_64-linux/usr/sbin/:$PATH; export TPM_PATH=`pwd`/my-machine/myvtpm0; swtpm_cuse -n vtpm0' && sudo chmod a+rw /dev/vtpm0

 - run qemu:

   $ runqemu 'qemuparams=-tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0 -device tpm-tis,tpmdev=tpm0' ...

The guest kernel has to have TPM support enabled, which can be done with:

KERNEL_FEATURES_append = " features/tpm/tpm.scc"

(From OE-Core rev: 1264d26fa251ac11a9069f3e602dec6be9d8b9ba)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:44 +00:00
Khem Raj 73c70c7d13 qemu-native: Point python to python2 on build host
On buildhosts where default python has switched to using python3
qemu-native fails configure like this

| ERROR: Cannot use 'python', Python 2.6 or later is required.
|        Note that Python 3 or later is not yet supported.
|        Use --python=/path/to/python to specify a supported Python.
|

we still expect build host to have python2 pre-installed
and is always available.

(From OE-Core rev: 2cac9544752775262fa87517ed49fcac2fb3a574)

(From OE-Core rev: 42c32a9c8e3ca28e553a3b95089e0d51390c1758)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:51 -08:00
Richard Purdie f14fb8d124 depmodwrapper-cross/qemuwrapper-cross: Drop unneeded binutils dependency
By default these pull in binutils-cross since they're a cross tool
and pull in any native tool requirements. In reality they don't
need such tools at build time or runtime since they're scripts.

Therefore clear the dependency and save on some processing time.

(From OE-Core rev: 63796765122e2eee2b78930797d571acb5c244d1)

(From OE-Core rev: 50feffd0917b0ab408b34ded9c2f741a9c4e5b74)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:49 -08:00
Jussi Kukkonen f5fc727f5b qemu: Add missing 'inherit pkgconfig'
The monster configure file does call pkg-config somewhere in there.

(From OE-Core rev: 8f7eb210257318dfa630bbc39b3eb9be936fddcc)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07 14:50:10 +00:00
Aníbal Limón 8bf3f386f9 qemu: Upgrade to 2.8.0
Added patches:

- target-ppc-fix-user-mode.patch

Rebased patches:

- exclude-some-arm-EABI-obsolete-syscalls.patc

Removed patches (already in upstream):

- 0003-fix-CVE-2016-7908.patch
- 0004-fix-CVE-2016-7909.patch
- 0001-target-mips-add-24KEc-CPU-definition.patch

Changelog,

http://wiki.qemu.org/ChangeLog/2.8

(From OE-Core rev: ab7eb1c896e4ba38b6c16acae3d25534296f62b8)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Aníbal Limón f9c758a2e7 qemu: Upgrade to 2.7.1
Minor upgrade contains fixes from 2.7.0.

Removed patches (already in upstream):

- 0001-pci-assign-sync-MSI-MSI-X-cap-and-table-with-PCIDevi.patch
- 0001-virtio-zero-vq-inuse-in-virtio_reset.patch
- 0002-fix-CVE-2016-7423.patch

(From OE-Core rev: 0f29bd2c267efcb0087d73c38202ba233af636fd)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Richard Purdie 9107d6ca14 Switch to Recipe Specific Sysroots
This patch is comparatively large and invasive. It does only do one thing, switching the
system to build using recipe specific sysroots and where changes could be isolated from it,
that has been done.

With the current single sysroot approach, its possible for software to find things which
aren't in their dependencies. This leads to a determinism problem and is a growing issue in
several of the market segments where OE makes sense. The way to solve this problem for OE is
to have seperate sysroots for each recipe and these will only contain the dependencies for
that recipe.

Its worth noting that this is not task specific sysroots and that OE's dependencies do vary
enormously by task. This did result in some implementation challenges. There is nothing stopping
the implementation of task specific sysroots at some later point based on this work but
that as deemed a bridge too far right now.

Implementation details:

* Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in
  TMPDIR/sysroot-components/PACKAGE_ARCH/PN.

* WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files
  from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and
  RECIPE_SYSROOT_NATIVE.

* This construction is primarily done by a new do_prepare_recipe_sysroot task which runs
  before do_configure and consists of a call to the extend_recipe_sysroot function.

* Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native
  and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies
  for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot
  dependencies.

* We have to do a search/replace 'fixme' operation on the files installed into the sysroot to
  change hardcoded paths into the correct ones. We create a fixmepath file in the component
  directory which lists the files which need this operation.

* Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each
  time a new loader is added. These are handled by adding files in bindir with the name
  prefixed by "postinst-" and are run in each sysroot as its created if they're present.
  This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them.

* Since a recipe can have multiple tasks and these tasks can run against each other at the same
  time we have to have a lock when we perform write operations against the sysroot. We also have
  to maintain manifests of what we install against a task checksum of the dependency. If the
  checksum changes, we remove its files and then add the new ones.

* The autotools logic for filtering the view of m4 files is no longer needed (and was the model
  for the way extend_recipe_sysroot works).

* For autotools, we used to build a combined m4 macros directory which had both the native and
  target m4 files. We can no longer do this so we use the target sysroot as the default and add
  the native sysroot as an extra backup include path. If we don't do this, we'd have to build
  target pkg-config before we could built anything using pkg-config for example (ditto gettext).
  Such dependencies would be painful so we haven't required that.

* PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy
  for each machine. The paths therefore changed, the behaviour did not.

* The ccache class had to be reworked to function with rss.

* The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data
  does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal
  recipe name therefore remains a bad idea.

* The logic in insane needed tweaks to deal with the new path layout, as did the debug source
  file extraction code in package.bbclass.

* The logic in sstate.bbclass had to be rewritten since it previously only performed search and
  replace on extracted sstate and we now need this to happen even if the compiled path was
  "correct". This in theory could cause a mild performance issue but since the sysroot data
  was the main data that needed this and we'd have to do it there regardless with rss, I've opted
  just to change the way the class for everything. The built output used to build the sstate output
  is now retained and installed rather than deleted.

* The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold
  up against testing. This has been rewritten too. There are some assumptions made about paths, we
  save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is
  here works but is a little hardcoded and an area for future improvement.

* In order to work with eSDK we need a way to build something that looks like the old style sysroot.
  "bitbake build-sysroots" will construct such a sysroot based on everything in the components
  directory that matches the current MACHINE. It will allow transition of external tools and can
  built target or native variants or both. It also supports a clean task. I'd suggest not relying on
  this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have
  to have built that in a previous bitbake invocation.

* pseudo is run out of its components directory. This is fine as its statically linked.

* The hacks for wayland to see allarch dependencies in the multilib case are no longer needed
  and can be dropped.

* wic needed more extensive changes to work with rss and the fixes are in a separate commit series

* Various oe-selftest tweaks were needed since tests did assume the location to binaries and the
  combined sysroot in several cases.

* Most missing dependencies this work found have been sent out as separate patches as they were found
  but a few tweaks are still included here.

* A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib
  sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my
  hand. That implementation can probably be neater but this is on the list of things to cleanup later
  at this point.

In summary, the impact people will likely see after this change:

* Recipes may fail with missing dependencies, particularly native tools like gettext-native,
  glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors

* Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst

* There was a separate patch series dealing with roots postinst native dependency issues. Any postinst
  which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS.

There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest
and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean
we've found all the issues.

Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the
task logfiles, not the console so I've intentionally left this like that for now. We can turn it down
easily enough in due course.

(From OE-Core rev: 809746f56df4b91af014bf6a3f28997d6698ac78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
He Zhe 6dbfeb5ef3 qemu: Fix pci-assign
Fix iommu pci device assignment failure.

"qemu-system-x86_64: -device pci-assign,host=02:00.0: No IOMMU found.
Unable to assign device "(null)""

(From OE-Core rev: 2011d1cc6c05ff3979e4bd664ce918dc8eb8e8fb)

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-05 13:54:05 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Zubair Lutfullah Kakakhel 3c567e01c8 qemu: Disable qemu on target for MIPS
Disable building qemu on MIPS N64 and N32.

(From OE-Core rev: bd565243d75d0d13360a86aef6acaa594875b849)

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:06 +00:00
Kai Kang 775e7a4904 qemu: update run-ptest script
The Makefile in directory tests has been renamed, then update script
run-ptest to follow the change.

(From OE-Core rev: 364565f3f3baccc9757ce0dcb393464b38055b4f)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-23 11:10:12 +00:00
Kai Kang 5acde3db0e qemu: fix CVE-2016-7909
Backport patch to fix CVE-2016-7909 of qemu.

Ref:
https://security-tracker.debian.org/tracker/CVE-2016-7909

(From OE-Core rev: 126783ca25a5ae9daf87ac563239fbff4696a682)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-23 11:10:12 +00:00
Kai Kang 8ce19e9e0b qemu: fix CVE-2016-7423 and CVE-2016-7908
Backport patches to fix CVE-2016-7423 and CVE-2016-7908 of qemu.

(From OE-Core rev: 1f4c303fd64a4bc05882de01676f241f0df6da78)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-06 23:35:35 +00:00
Kai Kang 19be0e3f43 qemu: supplementary fix of CVE-2016-5403
It is reported in qemu community that VM always exits with:

| 2016-10-17T07:33:40.393592Z qemu-kvm: Virtqueue size exceede

when VM is suspend and resume. Solution from the maintainer of virtio
is to merge following 3 commits:

http://git.qemu.org/?p=qemu.git;a=commit;h=bccdef6
http://git.qemu.org/?p=qemu.git;a=commit;h=58a83c6
http://git.qemu.org/?p=qemu.git;a=commit;h=4b7f91e

The first 2 commits have been merged in qemu 2.7.0. Then apply the
third one.

(From OE-Core rev: db5b9254fbbc30e50b50c7c8cd1f04dcc965cd52)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-06 23:35:35 +00:00
Olaf Mandel 6e36cc9c40 Remove LIC_FILES_CHKSUM from recipes without SRC_URI
LICENSE and LIC_FILES_CHKSUM apply to the sources specified by SRC_URI,
not to the recipe itself. As such a license declaration for a source-less
recipe makes little sense. The LICENSE declaration is mandatory, but
LIC_FILES_CHKSUM can be removed in such cases.

Remove the LIC_FILES_CHKSUM declarations from all recipes that do not
need it.

CC: Paul Eggleton <paul.eggleton@linux.intel.com>
(From OE-Core rev: b18fa5f2f2f46afc6fdc58f4d29679dea9c36c43)

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-28 16:15:21 +01:00
Paul Eggleton efa3c7dd55 nativesdk-qemu-helper: drop old Zaurus flash tools
These tools are relics of an earlier time when the Zaurus devices were
reference platforms - these days they are no longer needed. It seems
amazing that they survived earlier purges.

(From OE-Core rev: 49919585e5cec2999201fce8cb1b70f1cf7f591e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-24 07:30:09 +01:00
Robert Yang b18f8a58f8 nativesdk-qemu-helper: fix for new runqemu
There is no runqemu-internal anymore, and it is a python script now
which requires several python modules.

(From OE-Core rev: 94cb6eaec37c07e7903143fb53a568ab0bf2fc5c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-09 12:07:32 +01:00
Jianxun Zhang 2984863f42 qemu: fix: cp command cannot find tests/Makeflie
bitbake qemu

This error shows up:

ERROR: qemu-2.7.0-r1 do_install_ptest_base: Function failed:
do_install_ptest_base
...
cp: cannot stat '...tmp/work/core2-64-poky-linux/qemu/2.7.0-r1
/qemu-2.7.0/tests/Makefile: No such file or directory
...

Commit 46e7b70699d8bf4db08c8bb5111974318dd5416d in qemu project
renamed tests/Makefile to tests/Makefile.include, we apply the
same change in recipe accordingly to fix this issue.

Fixes [YOCTO #10245]

(From OE-Core rev: 7009a9309051061455fa7237e09796ef12c9e308)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-09 11:53:37 +01:00
Robert Yang e6c48b1213 qemu: 2.6.0 -> 2.7.0
This upgrade can fix a qemuppc + openssh bug, the ssh connection maybe
refused or closed randomly, and it's not easy to reproduce. RP pointed
that this upgrade can fix the problem, and it does work in my local
testing.

* Update add-ptest-in-makefile.patch
* Drop backported patch 0001-configure-support-vte-2.91.patch

Here is the Changlog:
http://wiki.qemu.org/ChangeLog/2.7

(From OE-Core rev: 056ce17e168bf856ff95a6f659098403169cb889)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-09 11:53:37 +01:00
André Draszik b004e3aef9 qemu: add patch to add mips 24KEc CPU definition
This patch has been accepted upstream:
http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg05778.html

(From OE-Core rev: b89bd412a69bfda262ed795e970b362ddbec6c68)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-01 11:47:11 +01:00
Ross Burton e49d337e84 meta: update patch metadata
Enforce the correct tag names across all of oe-core for consistency.

(From OE-Core rev: 606a43dc38a00cc243f933722db657aea4129f8e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:24 +01:00
Ross Burton 2ef717dda7 qemu: add PACKAGECONFIG stanza for bzip2
This is just for reading bzip-compressed DMG files, so disable it by default.

(From OE-Core rev: 0aad5d1888549a134968f7f6d0c9d64b3e158e1e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01 16:22:40 +01:00
Jussi Kukkonen 313ae0a769 qemu: Use Gtk+3, add configure patch to find vte
(From OE-Core rev: 0474412a1d2b6b8a35931bb03fa58e31a48133e1)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23 14:26:15 +01:00
Stephen Arnold 44ab979c4d qemu-native: set ld.bfd, fix cflags, and set some environment vars
The main thing is build failures with gold linker, but qemu is also a
little too aggressive at finding random tools on the build host, so we
also set the build env for qemu-native and make sure it doesn't reset
its own (hard-coded) cflags when we don't want it to.

(From OE-Core rev: 862c9cbbef1f17b57c0ea369d88194b60623ffdd)

Signed-off-by: Stephen Arnold <sarnold@vctlabs.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 18:05:21 +01:00
Alexander Kanavin 2efef0c379 qemu: remove runtime python dependency
Nothing seems to require it.

(From OE-Core rev: 1c8cdcd1f4e80562f5c1804860ce8e1f62ecf134)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01 12:38:42 +01:00
Marek Vasut ff35bfa242 qemu: Upgrade to 2.6.0
(From OE-Core rev: 6c18103e43fd593724f4317a1453a72b0feb6989)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-22 16:11:13 +01:00
Aníbal Limón b0207e7425 qemu: Upgrade to 2.5.1.1 for fix CVE-2016-3710 and CVE-2016-3712
This is a minor upgrade only comes with security fixes in qemu VGA
and UART code to avoid corruptions.

For review details,
http://git.qemu.org/?p=qemu.git;a=log;h=v2.5.1.1

(From OE-Core rev: da522c0c248c9a8b10a90de4cd6e7e05367e637d)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20 10:20:55 +01:00
Peter Kjellerstedt bc217a6f15 qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
(From OE-Core rev: 2bf5651cbcc91333954d7d5f06bf3b247b372063)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13 13:41:27 +01:00
Joshua Lock c63c1aaaa6 qemu: updgrade to 2.5.1
This upgrade includes several worthwhile fixes, security and otherwise, including
a complete fix for CVE-2016-2857.

* drop CVE-2016-2857.patch as it's included in this release, along with several
  related patches which complete the fixes for CVE-2016-2857:
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=9bddb45dbc010cd8ee4d48bd501fa5d18dcec00c
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=e3a2cdfcb5e282139217924044ec5af00c7f8eed
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=fe90bdc25bcf9954ee286cd51de94776a17d04f6
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=d0ee85b4e4c6cc2c8fac311d6df2ed412ed0df5f
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=80b6e5723fac428ea6c08c821078286f43975df8
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=a375e0b03ee3438924b24a45e61ee189ec9361db
* drop CVE-2016-2197.patch as an equivalent fix is included in this release
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=aaf4fb6afb4653c86059255811886a5c4ea271f3
* drop CVE-2016-1568.patch as it's included in this release
  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=4f046a6ba1d558eb043dc13a80d40cf7cb62ef95

(From OE-Core rev: 8332cea4baf2bda81fa4d33ccedefaec4313d454)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:39 +01:00
Ross Burton 30ba663e35 qemu: remove explicit but redundant native build dependencies
qemu-native was optionally depending on libxext-native if the DISTRO_FEATURES
included x11.  This dependency was required back when we didn't build
libsdl-native and causes an undesirable relationship between DISTRO_FEATURES and
qemu-native.

As the dependency isn't required anymore, remove it.

(From OE-Core rev: f58f364b1ae97805abc5f9eb7b300617f59826b2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:14 +01:00
Armin Kuster 90f204043b qemu: Security fix CVE-2016-2858
(From OE-Core rev: 48909052e7b19ba108ee7813c1efdbed0c2e06ab)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:41:44 +01:00
Armin Kuster dbdf9bfe20 qemu: Security fix CVE-2016-2857
(From OE-Core rev: d1b972a55c59a3f3336b3ebd309532dc204ea97b)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29 07:41:44 +01:00
Richard Purdie 3331992a27 qemu: Limit paths searched during user mode emulation
By default qemu builds a complete list of directories within the user
emulation sysroot (-L option). The OE sysroot directory is large and
this is confusing, for example it indexes all pkgdata. In particular this
confuses strace of qemu binaries with tons of irrelevant paths.

This patch stops the code indexing up front and instead only indexes
things if/as/when it needs to. This drastically reduces the files it
reads and reduces memory usage and cleans up strace.

It would also avoid the infinite directory traversal bug in [YOCTO #6996]
although the code could still be vulnerable if it parsed those specific
paths.

(From OE-Core rev: 9ac5017b3328a18561c2912edfda2d7d97c675f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-10 23:13:54 +00:00
Armin Kuster 914ff148fa qemu: Security fix CVE-2016-2198
CVE-2016-2198 Qemu: usb: ehci null pointer dereference in ehci_caps_write

(From OE-Core rev: 33b5c3b4822b6bbb06ad5fdf7a120acd520f665d)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 22:33:39 +00:00
Armin Kuster 093835335e qemu: Security fix CVE-2016-2197
CVE-2016-2197 Qemu: ide: ahci null pointer dereference when using FIS CLB engines

(From OE-Core rev: bbc41337d28cc54d115378d4cad32f7b1c6f6cd5)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 22:33:39 +00:00
Armin Kuster 7475c4c2e5 qemu: Security fix CVE-2016-1568
CVE-2016-1568 Qemu: ide: ahci use-after-free vulnerability in aio port commands

(From OE-Core rev: b1b2f629f8e2febd086eae8fabd24322333ea172)

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:27:47 +00:00
Ross Burton 614e9ecec4 qemu: add PACKAGECONFIG for Nettle crypto support
(From OE-Core rev: 0565377851bf73be39b09b06b2aa630f2225eee3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:20 +00:00