Compare commits

...

700 Commits

Author SHA1 Message Date
Richard Purdie
9ed748a542 bitbake: daemonize: Always print any remaning UI events at exit
If there are events in the UI queue we want to print them regardless of
whether we're handling an exception or something like SystemExit.

This improves error messages for some other failure cases where currently
no logging would get printed and leave the user confused as to what went
wrong.

(Bitbake rev: 76c4f2c20216719736766e8ae7d089ccd061b71b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Richard Purdie
66b8c16659 bitbake: cooker: Ensure all tasks are shown in task dependency tree
"bitbake -g m4-native -c do_unpack" doesn't list any dependencies in
task-depends.dot. This is because no header describing the task was
added unless a task has dependencies. Tweak the code to fix this.

[YOCTO #10893]

(Bitbake rev: e2fbe728769f09ef4178e2ef4d69a2f60ffe3ebb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Mark Asselstine
c760d99466 python: don't include -tests with modules
Although 'test' is listed in the python module list
(https://docs.python.org/3/py-modindex.html) it is meant only to be
used 'internally' by folks developing python itself. Per the
documentation:

  Note The test package is meant for internal use by Python only. It
  is documented for the benefit of the core developers of Python. Any
  use of this package outside of Python’s standard library is
  discouraged as code mentioned here can change or be removed without
  notice between releases of Python.

Per the above it is best not to include this module to discourage
folks who might not head the above warnings. Additionally this module
is one of the largest py modules going, by dropping this unneeded
module from the 'modules' package we can reduce overall image size,
something which is important for many embedded deployments.

The generator scripts as well as the manifests have thus been modified
accordingly, providing a generic mechanism to exclude modules from the
'all modules' package.

(From OE-Core rev: a5bb13a5d7d7a668ca61da6b17884e3b05b95355)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Jonathan Liu
843a74d708 wic: improve generating disk system identifier
This should reduce the chance of generating 0xffffffff as the disk
system identifier.

(From OE-Core rev: 5619e72facbc9228d3cf8f844f198e03b536ac8c)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Ming Liu
7a25294b71 meta: drop do_bootdirectdisk do_vmimg references
do_bootdirectdisk and do_vmimg had been dropped by commit 929ba563:
[ image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types ]

Also drop the references to them and image-vm.

(From OE-Core rev: 609f7f4ecd17c8299b97d9face098e3cc44fa6eb)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Patrick Ohly
86abf0c1af autoconf-archive: GPLv3 + autoconf exception
The COPYING file specifies pure GPLv3, not GPLv2 & GPLv3, with the
autoconf exception in COPYING.EXCEPTION. OE-core currently has
GPL-3.0-with-GCC-exception for this in meta/conf/licenses.conf, so
this is used here despite the deprecation note for that license
identifier in https://spdx.org/licenses/GPL-3.0-with-autoconf-exception.

(From OE-Core rev: 5849391a1854743af26503db603ad578d8d19e25)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Ross Burton
7dd7ef3bd2 re2c: fix build race
(From OE-Core rev: 33bd61e34f0d17841f0817bfdcdf87320a6743ec)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Richard Purdie
64d15c298d uninative: Allow a local own-mirror to work with uninative
The games we play with path manipulation of DL_DIR in uninative mean standard
PREMIRRORS don't work and we can't easily put 'chksum' into the url path from
a url parameter with the current fetcher url handling to make a generic
remapping. We therefore add to PREMIRRORS when we know the chksum to
create a premirror mapping which can work.

[YOCTO #9888]

(From OE-Core rev: 3b0309dbb5d52e9d7abf6fd89cc999ac4cc5d2fb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03 11:14:13 +01:00
Richard Purdie
914a53cc94 bitbake: daemonize: clean up code
This was originally based on some other code but its mostly misleading
comments now. Massively clean this up and accept its now a total fork.
There are no funciton changes here, just cleanup.

(Bitbake rev: 3daa9001269e5b9156d0eb3299d2628d2d219fff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
Richard Purdie
8625f83e38 bitbake: daemonize: Ensure child process exits safely
When we create the child, if an exception occurred it was transfering
back into the parent context. We don't want to do that us use a try/finally
to ensure we exit.

We need to ensure a traceback is printed and any queued UI messages which
may not have made it to the client UI at this point.

(Bitbake rev: dec1d2c26f6cb3ffeb44beaab0129cd531a6d08b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
Richard Purdie
3010e4e7cf bitbake: process: Add some extra server startup logs
We have cases where the server is being started but we're not seeing any messages
from it. Add some earlier logging so we can try and better understand where
issues may be occurring.

(Bitbake rev: 10a6a48c0c5a2fe2051e90143e66075356853971)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
Richard Purdie
129a52725f bitbake: process: Reorder server command processing and handle EOFError
If the connection control socket and the command channel close together,
we can race and hit EOFError exceptions before we close the channel.

Reorder the code to handle this in the correct order and ignore the
EOFError exceptions as they mean the client is disconnecting and shouldn't
terminate the server.

(Bitbake rev: 974281ed72d8366baa16ee85f7e93970689b5956)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
Ross Burton
780e9fb877 bitbake: wget: fix FusionForge workaround
My previous assertion about FusionForge appears to have been wrong, or
FusionForge has changed behaviour, or both.

FusionForge now mandates that downloads have the Accept header set, despite that
header being optional, and returns a 406 Not Acceptable error if it isn't set.
As we were pretending that 406 was actually 405 (Moved) and tried to handle it as a
redirect this results in an infinite loop until Python kills the recursion.

Delete the handling of 406 as 405, and pass Accept: */* in the headers.

(Bitbake rev: bb70ae0c9aac5ec688026d23a64ac0cac1947187)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
David Reyna
9d1faf1a6f bitbake: toaster: move to new bitbake xmlrpc default
The bitbake option "-t SERVERTYPE" was deprecated and can be
removed since the desired XMLRPC listener now the default.

The bitbake server port cannot be "-1" anymore and must be
explicitly passed.

There is a race condition for the bblock file to not only
be created but to actually be populated, so a delay test loop
is required (usually only one pass).

The 'xmlrpcclient' is now the class that allows Toaster to for
example kill builds.

The events for populating the recipe parsing now either show only
the final result or are skipped entiredly, so the progress
calculator needs to be changed to not block on the parsing phase.

[YOCTO #11851]

(Bitbake rev: 2aa7ad38f760ec003fb18faa5aa0014cff191a7a)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
David Reyna
3bc3d26b46 bitbake: toaster: enable remote HTTP API for status aggregation
Add support for Toaster aggregators with a set of api links that
return JSON data for (a) builds in progress, (b) builds completed,
(c) specific build data, and (d) an is-alive health ping link.

[YOCTO #11794]

(Bitbake rev: d8e79661c69671dd424dca5cc3f7f2f855b0afed)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
Richard Purdie
3f71378fde bitbake: runqueue: Tweak debug message to make it more readable/diffable
Having this as one huge long line isn't easy to manipulate, split it into
multiple lines for ease of debugging issues.

(Bitbake rev: 5753fe81194f75fbcf4ccdc733cc585d02794cb1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:53 +01:00
Ross Burton
6986198da9 bitbake: fetch2: fix checkstatus fallback to MIRRORS
The checkstatus() code was expecting checkstatus to throw exceptions if it
failed, but in general it should return False.

(Bitbake rev: 57be5cc6228518e60f564570a39cebbeb6cf564e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:52 +01:00
Khem Raj
6f12ac612c mesa: Fix build when building with llvmpipe
Add following in mesa.inc to enable llvmpipe

PACKAGECONFIG_append_x86 = " gallium-llvm gallium r600"
PACKAGECONFIG_append_x86-64 = " gallium-llvm gallium r600"

This would enable llvmpipe for swrast, to check run this

root@qemux86:~# glxinfo | grep llvm
    Device: llvmpipe (LLVM 5.0, 128 bits) (0xffffffff)
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 5.0, 128 bits)

Backport patches to support llvm 5.0.0+
Add a patch to understand llvm version when llvm is build from git/svn

(From OE-Core rev: da29bc17e4dd748f50b054c5e3afaf8d41bf4077)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:32 +01:00
Khem Raj
5c77067ee9 llvm: Add recipe for 5.0
Based on recipe from meta-oe and clang recipe from meta-clang
Needed by mesa

Fixes
[YOCTO #11529]

(From OE-Core rev: 8724ef9c53e7804ead9ba0f019369b0e4daada63)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:32 +01:00
Khem Raj
e7bb5ae841 re2c: Transfer recipe from meta-oe and upgrade to 0.16
ninja needs it.

(From OE-Core rev: d7d46209a309735b503cfc543799faea1f794055)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Khem Raj
0c423f7272 ninja: Add recipe
llvm is using it, therefore move it from meta-oe

(From OE-Core rev: fc3aef67a95a90e9a485c6b0e93db8cdeab5d3ab)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Richard Purdie
a089f7b735 image: Make do_image_qa a dummy sstate task to match do_image_complete
Similar to do_image_complete, make do_image_qa a dummy sstate task
so that rm_work doesn't cause image generation to repeat on every
new build command.

(From OE-Core rev: ca61f5437cb2421a67f002785e644ba215e04aaf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Richard Purdie
c6958bbd87 image/rm_work: Promote do_image_complete to be more sstate like
We relied on the missing do_image_complete_setscene task to ensure the dummy
sstate tarball that was created would never be used. This lead to its own
issues and a better fix for SSTATE_SKIP_CREATION has now been merged.

We can therefore make do_image_complete look like a more standard sstate
task which means image generation doesn't keep rerunning when using rm_work.

We do need to turn do_image_complete's stamp into an sstate version to
handle this (it otherwise matches the do_image_* glob).

(From OE-Core rev: 2ff9d40dc88d43567472218cf3d3faf414398c71)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Richard Purdie
7b37b0ac07 image: Drop before do_build from do_rootfs and do_image
do_image_complete has the do_build dependency, these other two tasks
don't need it. If this is present, it complicates the dependency tree
and convinces rm_work that the tasks need to rerun even if they
already did since the stamps are removed.

Drop the unneeded dependency to help resolve this issue.

(From OE-Core rev: f61bcae0926a1ad79032119cc5656c0e862b13af)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Richard Purdie
0fcf2247b3 sstate: Improve SSTATE_SKIP_CREATION
Currently, dummy archives are created for skipped sstate tasks. We relied
on these never being installed (the setscene task is missing) however this
leads to odd behaviour as for example the setscene stamps are never looked
at.

Rather than trying to continue with the two separate behaviours, really
skip package creation. We do need the file manipulation steps to install files
under sstate control from a manifest perspective so we only skip at the final
creation step.

(From OE-Core rev: 1e95fc5419a131a5e4091b8ff01639de99284399)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Richard Purdie
35e3cb3012 rm_work: Improve handling for addto_recipe_sysroot
Rather than requiring each user to handle this individually, handle
addto_recipe_sysroot in the core class. As well as preserving the
sysroot directory, this also ensures the stamp is preserved rather
than rerunning the task every time as currently happens.

(From OE-Core rev: bf8b9858d9ccce27173d13938a83d249294cc473)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 15:13:31 +01:00
Ross Burton
4f9918ccfa libpng: fix MIRRORS usage
MIRRORS needs to be pairs of values for the original URL to match and the
location find it on the mirror.

(From OE-Core rev: a649f3da630e8ca2d3ca58b610f3918720dd5229)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-31 14:23:44 +01:00
Scott Rifenbark
2f25c9b56c yocto-project-qs: Added section for CROPS.
(From yocto-docs rev: 0d6fba532e0247db2cce4e94466f4476114d3e13)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 16:23:51 +01:00
Scott Rifenbark
b9a3edf6ce yocto-project-qs: Added writernotes style to the *.css file.
This style allows a writer to use the <para role='writernotes'>
tag to have text in the paragraph render in red.

(From yocto-docs rev: 65bb4edcd0a58ea8e17f28f9f5c13e2898c22745)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 16:23:51 +01:00
Scott Rifenbark
863a8c0bf6 yocto-project-qs: Updated overview to account for re-orged material
Because the YP development introductory information was moved to
the ref-manual, and the QS will get a CROPS section inserted,
the introductory section of the QS needed to be updated a bit.

(From yocto-docs rev: e173b762a74678cd660850e4f5bc28712c3d83ac)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 16:23:51 +01:00
Scott Rifenbark
f4aa9783bd yocto-project-qs, ref-manual: Moved YP intro from QS to ref-manual
Fixes [YOCTO #11630]

The introductory stuff in the QS is really conceptual information and
needs to be in the ref-manual where YP is introduced.  Regarding the
QS, all we really need to do is point to places where the reader can
go to find that stuff out.

Part of this move involved getting the diagram of the YP flow for
the environment from the QS to the ref-manual.  That figure was
named "YP-flow-diagram.png".  It was named "yocto-environment.png"
in the QS but I renamed it when moving it to the ref-manual.  This
caused some edits to the "Makefile" to clean up the figure lists
for tarballs.

(From yocto-docs rev: ab108c0959e3a9f36d25080245482f8a790c8c87)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 16:23:51 +01:00
Kristi Rifenbark
5a402f9d1b poky.ent: Updated CentOS required package
Replaced "python34-pip" package with "python3-pip"
in the list of required packages for CentOS' variable.

(From yocto-docs rev: 5d48ea7953169b4392d6caf0fb8f2f952479f033)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 16:23:51 +01:00
Kristi Rifenbark
6cf1e8feea poky.ent: Corrected package duplication
Removed duplicated package, "which" in list of
required packages for Fedora's variable.

(From yocto-docs rev: e016735fe7ef0d866d44df1100597ab3f3af7d5f)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 16:23:51 +01:00
Richard Purdie
548b1b0c8a uninative: Update to 1.7 uninative release
This updates to a newer glibc and updates patchelf to include a bugfix
to work with gold.

(From OE-Core rev: a2ab288bd002ebb6e64d46e941fb122e1157ff49)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Denys Dmytriyenko
20ae186dfc autoconf: fix typo in SUMMARY
(From OE-Core rev: fb6500144f2244815be3f81908ee3baad373e348)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Tom Rini
1f1d226aed imagefeatures: Add a test for various hypervisor formats
We add a new test that will create core-image-minimal for wic.vmdk,
wic.vdi and wic.qcow2.  We then confirm via qemu-img that the resulting
file is of the expected type.

Cc: Ed Bartosh <ed.bartosh@linux.intel.com>
(From OE-Core rev: 1392fdeaf6acc7c8d2ff9a5a2bf6ef2f5928957d)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Tom Rini
f809daa9ac imagefeatures: Add a test for many CONVERSION_CMDs being chained
Add a new test to create a long (and not otherwise useful) image,
ext4.bmap.gz.bz2.lzo.xz.u-boot and also the sha256sum of it.  Check that
the resulting sha256sum is valid.

Cc: Ed Bartosh <ed.bartosh@linux.intel.com>
(From OE-Core rev: ac4402bff547b017284b12c1874d4094c169419d)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Tom Rini
41cc7f8282 imagefeatures: Extend test_bmap to validate gzip
We extend the existing test_bmap test to also produce an ext4.bmap.gz
file and then have gzip confirm that it contains valid gzip data.  This
tests that we are able to chain at least 2 CONVERSION_CMDs together.

Cc: Ed Bartosh <ed.bartosh@linux.intel.com>
(From OE-Core rev: 1e9ca92f84d9d5b4e56d47dfd4b3d7f9aba3d21b)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Tom Rini
03d5daf1ae wic: Switch to using --use-uuid by default
The most portable way to specifiy a root device in a disk image that we
create is to use PARTUUID rather than /dev/sda2.  As background, both
GPT and MBR tables provide valid UUID values for each partition and the
Linux Kernel contains the logic to parse this value.  With this change
we can now boot the default disk images when used as any valid block
device that the included kernel uses.  This for example means that
VirtualBox can be used to run vmdk without changes as it uses IDE for
the virtual disk controller.

Cc: Matt Porter <mporter@konsulko.com>
(From OE-Core rev: 8a58e9bb3e76a9962f1d14a8bdd3f7de675c3492)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Tom Rini
9d07c736e3 image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types
The vmdk/vdi/qcow2 IMAGE_FSTYPEs predate wic.  As such, they provide
some similar underlying functionality in order to produce a "disk" image
that in turn can be converted into different formats that various
hypervisor types work with.  They do not however provide the ability for
other disk image types to be converted into these same output types.
Furthermore, they are less flexible than what wic does provide.  This
drops the old style vmdk/vdi/qcow2 types and re-introduces them under
the CONVERSION_CMD framework.  The equivalent of vmdk is now wic.vmdk
and so forth for the other types.

(From OE-Core rev: 929ba563f1bc7195c4981b8e139c432b2cc388ea)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Leonardo Sandoval
d2ebee7c3a cml1.bbclass: wait until menuconfig terminal finishes
There are at least two terminals types (gnome and tmux) that when
launched to show the kernel's menuconfig, we lost track of the corresponding
process ID, thus there is no way to see when they finish, yielding identical
timestamps before and after menuconfig thus compile's task
is never tainted. This commit takes the solution from [1] but now in the menuconfig's
context.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c706bfbabbf9f7caf2cf509eb91381fb49aa44cb

[YOCTO #11146]

(From OE-Core rev: 7d02ea283b6587f3f79c5846b64b9ba1d6fe8026)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Kai Kang
e35fe8c06d assimp: upgrade to 4.0.0
Upgrade assimp to 4.0.0.

* Because there is also an assimp recipe in meta-oe, so update
  DESCRIPTION, HOMEPAGE and SECTION from it.
* Remove redundant license file
* Update EXTRA_OECMAKE to fix library install path for multilib

(From OE-Core rev: e639f8845f78a0a75b9cab81d9a9f6a2810a313c)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Jonathan Liu
408c65613a wic: ensure generated disk system identifier is non-zero
Zero may be interpreted as no MBR signature present and another
partitioning program might install a new MBR signature.

(From OE-Core rev: f53b5555d6eaa171bc5882cfee807cf62576862d)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:20 +01:00
Patrick Ohly
3582f6fc01 autoconf-archive: simplify and fix recipe
The COPYING file specifies pure GPLv3, not GPLv2 & GPLv3. There is
also the COPYING.EXCEPTION file with the autotools exception, which
gets ignored here in the recipe to keep it simpler.

All of the explicit dependencies seem unnecessary, and RDEPENDS_${PN}
doesn't do anything for native recipes either, so all of that gets
removed.

It also built fine without the m4 and parallel build workarounds.

There's no need to have a separate .inc file.

(From OE-Core rev: 5002004b891895654cbad53555ee46e2ed188630)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Patrick Ohly
ae38bfe2cd autoconf-archive: move from meta-oe to OE-core
Having common macros in OE-core that are needed by autotools based
projects makes sense. For example, tpm2.0-tools in meta-measured
depended on meta-oe only because of autoconf-archive.

This is a verbatim copy of the autoconf-archive recipe in
meta-openembedded rev 1cbd1bc1, with just one change: the patch which
disabled the installation of ax_code_coverage.m4 and
ax_check_enable_debug.m4 and the dependency on gnome-common were
removed.

So now autoconf-archive in OE-core provides them. gnome-common in
meta-oe will be changed to not install them and instead depend on
autoconf-archive.

(From OE-Core rev: 40711432b82fc6efb9e40748532ed68a64fbe628)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ming Liu
9b8411d787 rootfsdebugfiles.bbclass: add a optional parameter to choose file mode
This is in case that sometimes the copied target files might be
expected to have a desired mode, for instance, the ssh keys should not
be too open, otherwise the users will get a "Permission denied" error.

(From OE-Core rev: 0ae4c1eeb1a70bae324347445895c7d312cf503d)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
c8a4feacd8 oe-selftest: wic: fix test_quemu
This test case boots the image in qemu and checks for mounted
partitions. As /boot is mounted automatically the test case fails.
Fixed this by adding /boot to the list of mounted partitions.

(From OE-Core rev: e5ba124b01ff6883a08c91daa47343dd09f6260d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
ae4ee4d511 wic: add /boot mount point to fstab by default
wic avoided adding /boot to fstab for no reason.
This exception was hardcoded in the wic code.

There is no need for this as mountpoint in .wks file is an optional
field. It can be used only if user wants to have partitions
automatically mounted on system boot.

[YOCTO #11662]

(From OE-Core rev: 2376b05512ddb8c4ec3aaf1df11071f536a76bd9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
092f4fafaa wic: rootfs: make copied rootfs unique
Used unique suffix (line number from .wks file) for the
copied rootfs directory to avoid possible conflicts.

(From OE-Core rev: 01efc234a8caab67ed3138ab2de9bbd82ce97b44)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
d4e60fe6a4 wic: rootfs: fix rootfs path reporting
wic gets rootfs paths from partition object property
'rootfs_dir' and shows them in final report.

rootfs plugin sets this property to the temporary path,
which causes temporary paths appearing in the report.

Changed the code to prevent storing temporary rootfs path
in part.rootfs_dir. This should fix the report.

(From OE-Core rev: 28d2d7d6f79df08431187c7debaab2a3fa516671)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
5541191b99 wic: use absolute paths in rootfs plugin
Using relative paths can cause copyhardlinktree API to fail as
it changes current directory when working. Converted all paths
to absolute paths using os.path.realpath.

(From OE-Core rev: a1c83cebe986e211dfc31be5cbd748f53fc298df)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
c4f9d8151f wic: copy rootfs directory before changing fstab
wic updates /etc/fstab on root partition if there are
valid mount points in .wks

When wic runs from bitbake this can cause incorrect results
or even breakage of other tasks working with the same rootfs
directory in parallel with do_image_wic.

Implemented copying rootfs directory to a temporary location
using copyhardlinktree before updating fstab to avoid conflicts with
other tasks working with the same rootfs directory.

(From OE-Core rev: 92e1c7d47e695eb4ce1a863cd0f6c49dca1c2339)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Ed Bartosh
a9cab2f0ed image_types.bbclass: ignore tar exit code 1
tar exists with 1 and produces warning "file changed as we read it"
if content is changed while tar archives it. Even hardlinking content
causes tar to fail this way as it changes file ctime.

Other tasks running in parallel with do_image_tar may need to hardlink
rootfs content in order to change it, e.g. do_image_wic does this to
update etc/fstab.

Ignored tar exit code 1 to be able to hardlink rootfs content while
do_rootfs_tar is tarring it.

[RP: Removed bashism]

(From OE-Core rev: 402b4cffbb4c58cfee93db18192f2b218ee0ae35)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Saul Wold
373ea52b89 systemtap: ensure systemtap-native is available
Since we are adding the addto_sysroot that that is specific to the
native recipe, we must split this into a seperate -native .bb recipe.

When systemtap-native is built, the intention is that it's usable
from the native sysroot when done, ensure it's there with a forced
addto_recipe_sysroot task, we also don't want to clean the sysroot
when RM_WORK is enabled otherwise we loose the binaries.

[YOCTO #11403]

(From OE-Core rev: 98fba18e93abe8efce0a5b40d51e178c9de4d1e5)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
(cherry picked from commit 2fdb59741b4fdeaa4aee10812c4a409cdc11a02d)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Aníbal Limón
0f0368d052 oeqa/core/runner: OEStreamLogger don't buffer test execution writes
Since OEQA framework uses Python logging functionality to report test
results there is a class that wraps PyUnit writes into logging commands
(OEStreamLogger), so don't buffer the actual test execution to have
insight of what is currently executing.

This fix will change a little the test output format adding an '\n'
previous the test result, for example:

From:

test_nonmatching_checksum (lic_checksum.LicenseTests) ... ok

To:

test_nonmatching_checksum (lic_checksum.LicenseTests)
 ... ok

This is because the new line added by the PyUnit StreamLogger because
currently we don't have a manner to identify when a test execution
starts at report level (write msg).

[YOCTO #11827]

(From OE-Core rev: 4c2276469f58a88f864eb374c00dbbaace702de4)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Aníbal Limón
2d50f153b5 oeqa/{core,selftest}: Add support to validate if a specified test case isn't found
If some test module/case is specified to run and isn't found the OEQA
framework didn't notice it, so complete the implementation using
modules_required and validate for the test case prescense.

Raise an exception when the test module/case required isn't found.

[YOCTO #11645]

(From OE-Core rev: e50b415aaaa1581473f85f0a8afa278b5f95129b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Andrej Valek
4c09b7a745 libpcre: upgrade 8.40 -> 8.41
(From OE-Core rev: 07c5eb7f9232ecd4a094040cbe85af2727bd2bd5)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Jackie Huang
6c35b66658 ncurses: add SYSROOT_DESTDIR for siteconfig_gencache
After switching to Recipe Specific Sysroots, ncurses
will not be populated in its own sysroots, then
siteconfig_gencache fails to find some headers,
so add ${SYSROOT_DESTDIR}/${includedir} into the
search list to fix the issue.

(From OE-Core rev: 2ef34f7fb60ecdff29aae1d54a90a2e765c15e1e)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Jackie Huang
e925d9b9cc siteinfo: fix siteinfo_get_files to work with RSS
The siteconfig cache files in ACLOCALDIR setup by autotools.bbclass
has been dropped after switching to RSS, so change the siteconfig
search path back to SITECONFIG_SYSROOTCACHE and the parameter
name changed from aclocalcache to sysrootcache.

(From OE-Core rev: 5b1454304483a0bc725b32fd5458e5281c68112f)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Jackie Huang
a88d33f47f debianutils: set higher priority than busybox for run-parts
debianutils-run-parts should have higher priority than
busybox (which is 50), so set the priority to 60 for
debianutils-run-parts.

(From OE-Core rev: 56f6fc7d6de0a46046ea2abcc392b1da88e398ec)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Juan M Cruz Alcaraz
1305b64ffe package/bbclass: sources are packaged separately from debug.
The configuration variable PACKAGE_DEBUG_SPLIT_STYLE includes
the new mode debug-with-srcpkg that instructs the system to
remove the source files from the debug package but include them in
a separate package with a "-src" suffix in the name.

[YOCTO #9998]

(From OE-Core rev: b8f9ffa37f67172a01837c88c861dc736d267569)

Signed-off-by: Juan M Cruz Alcaraz <juan.m.cruz.alcaraz@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
California Sullivan
68e5381691 module.bbclass: move make scripts earlier
Some out of tree modules require the scripts for configuration. For
example, backport-iwlwifi.

(From OE-Core rev: 7a045f6df2366026d28fe8d36e6d594ce5aa559a)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Richard Purdie
fab2219af4 Revert "core-image-minimal-initramfs: use initramfs-framework by default"
This reverts commit 28fc6ba761ed4a47efa7c43e7f7dff5e2fe72b5e since it causes
runqemu.RunqemuTests.test_boot_machine_iso and runqemu.RunqemuTests.test_boot_deploy_hddimg
to fail in oe-selftest.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:46:19 +01:00
Leonardo Sandoval
c147d7753f bsp/help: include a warning showing deprecation of create-layer plugin
This plugin will be removed starting 2.5 development in favour
of using 'bitbake-layers create-layer' script/plugin, offering a single
script to manage layers.

(From meta-yocto rev: 76dd79e345d8edb22fc7aefd31f2a1f150916718)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Christopher Larson
e75639f85a bitbake: tests/fetch: fix GitShallowTest.test_bitbake
`git fetch --tags` seems to interact badly with `mirror=fetch`, resulting in
the regular branches not being fetched, so drop the unnecessary `--tags`. This
fixes this unit test failure: `bb.fetch2.FetchError: Fetcher failure: Unable
to resolve 'master' in upstream git repository in git ls-remote output for
/tmp/tmp4ag_mgmn/gitsource`

[YOCTO #11698]

(Bitbake rev: 2d0203fae08c5ff8dc3e9afaa9a819abc4a1af6f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
e4c9a92cb4 bitbake: main: Always return 0 for bitbake --kill-server
If the server isn't running return 0 as to do otherwise complicates
scripts which do cleanup of bitbake servers which would potentially
be memory resident.

(Bitbake rev: 0f85c54385f325f3ebbf911b35bbac11b8863b6b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
5f835043f2 bitbake: process: Clean up server communication timeout errors
This timeout path was commonly hit due to errors starting the server. Now we
have a better way to handle that, the retry logic can be improved and cleaned
up. This patch:

* Makes the timeout 5s rather than intervals of 1s with a message. Paul
  noted some commands can take around 1s to run on a server which has just
  been started on a loaded system.
* Allows a broke connection to exit immediately rather than retrying something
  which will never work.
* Drops the Ctrl+C masking, we shouldn't need that anymore and any issues
  would be better handled in other ways.

This should make things clearer and less confusing for users and is much cleaner
code too.

(Bitbake rev: 8633b7cd03cfaba3e0359aa5da22fc76b66768c7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
07cee9dea1 bitbake: process: Don't leak open pipes upon reconnection
If we reconnect to the server, stop leaking pipes and clean up
after ourselves.

(Bitbake rev: f41e4e971e807157be68cf4496580494b8b60643)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
b2c39835bb bitbake: process/cooker: Allow UI process to know if the cooker was started successfully
Currently if the server fails to start, the user sees no error message and
the server will be repeatedly attempted to be started until some longer
timeouts expire. There are error messages in the cookerdeamon log but
nobody thinks to look there.

Add in a pipe which can be used to tell the starting process whether the cooker
did actually start or not. If it fails to start, no further attempts can be
made and if present, the log file can be shown to the user.

[YOCTO #11834]

(Bitbake rev: 57000d44beb1aeba37dfc70782b0d6418943acc5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
dd3a59d354 bitbake: process: Move socket keep alive into BitBakeProcessServerConnection
This cleans up the socket keep alive into better class structured code
and adds cleanup of the open file descriptors upon shutdown.

(Bitbake rev: 77fd3a3a29a569e212374b27aea742ddbaafcdd5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
76b6cdf414 bitbake: process: Allow BBUIEventQueue to exit cleanly
Currently the monitoring thread exits with some error code or runs indefinitely. Allow
closure of the pipe its monitoring to have the thread exit cleanly/silently.

(Bitbake rev: 930d077637928213e13a07c78fee3bf7a8c37ebf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
8b7aa5bfd6 bitbake: process: Ensure ConnectionReader/Writer have fileno() and close() methods
Expose the underlying close() and fileno() methods which allow connection
monitoring and cleanup.

(Bitbake rev: f79187f4ebfad7969be47b429995e7f7a3e33c1e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Richard Purdie
25e52d34d0 bitbake: event: Don't write duplicate logs to stdout and stderr in no UI case
This code would duplicate messages to stdout and stderr when no UI connected
and there were error level messages.

Rework the code so it either uses stderr (for errors and above) or
stdout for warnings/debug but not both for the same messages.

(Bitbake rev: 45cff5734ba2ba8c8d36d17d722a5804d39b258b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30 08:43:36 +01:00
Scott Rifenbark
3c1c4ceaa4 yocto-project-qs, ref-manual: Upgraded tar to 1.27 from 1.24
The minimum version of tar is now 1.27. This was changed in both
the yocto-project-qs and ref-manual.

(From yocto-docs rev: b0fe513e08de860e94a3617fd62382430e321c77)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 23:00:23 +01:00
Scott Rifenbark
6d7b42f650 dev-manual: Added Links for specific container use
At the end of the section that describes how to set up the
development machine for CROPS, I added some user links for more
information based on the type of container the use is interested
in.

(From yocto-docs rev: 6888d8454839bbb2ecdf96ce421c7d8723931d65)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 23:00:23 +01:00
Scott Rifenbark
a2dfac68b5 dev-manua: Added Crops setup section.
(From yocto-docs rev: e2ba131b98705f98463030dde043d858b500690d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 23:00:23 +01:00
Scott Rifenbark
38ee8ae876 dev-manual: Added steps to set up native linux host
Fixes [YOCTO #11630]

Added content for steps to set up a native Linux host for using
the Yocto Project.

(From yocto-docs rev: d8a18d382c584dbdfa7f5f190a92cc7cde0f9601)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 23:00:23 +01:00
Ng, Wei Tee
aec9e9b1dc core-image-minimal-initramfs: use initramfs-framework by default
Use the initramfs-framework for initialization by default due to
the modularity and expansibility.

[YOCTO #10987]

(From OE-Core rev: 28fc6ba761ed4a47efa7c43e7f7dff5e2fe72b5e)

Signed-off-by: Ng, Wei Tee <wei.tee.ng@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Ng, Wei Tee
8b960914ac initramfs-framework: include install-efi module in recipe for installation
Utilized the existing init-install-efi.sh script and renamed it to
install-efi.sh to manage the installation process of images in
initramfs-framework model. This script will be executed when
"install" option is being chosen in the grub menu and install
the image on the target platform. A new install-efi module is
being added in the recipe to handle the installation process
using initramfs-framework.

[YOCTO #10989]

(From OE-Core rev: 41b34441c22143cbabace3d794ead05801afb7a0)

Signed-off-by: Ng, Wei Tee <wei.tee.ng@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Ng, Wei Tee
716d5d9e65 initramfs-framework: module to support boot live image
setup-live module is a new module being introduced to integrate the
functionality of init-live.sh into new scriptlet named setup-live in
order to support the live boot image. The udev-extraconf rdepends is
being added to perform automounting. It gets to run before the rootfs
and finish module.

The setup-live scriplet include the changes for:

- Create a conditional loop for the bootparam_root variable. If it is
not set, then it will boot from ROOT_IMAGE. Else, it will boot normally
which is not from removable media.

- Gives a standard path to the original boot disk mount which can be
used to. While /media/sda is a good guess, it isn't always right, nor
is it a good assumption that only one boot disk is in the system.

- The current rootfs module has no support for rootfs images, currently
it only support for rootfs partitions for wic image. Therefore, there
is a need to assign the rootfs image for live image.

[YOCTO #11701]

(From OE-Core rev: 4d3300e85a8e65207a415b9cf84c9fa1f71b0406)

Signed-off-by: Ng, Wei Tee <wei.tee.ng@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Chen Qi
05e4f13971 dbus/dbus-test: upgrade to 1.10.20
(From OE-Core rev: 96c54b2ceee7cdeb40efaa3f224766c5ea65d181)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Chen Qi
71f6b3882d sysstat: upgrade to 11.5.7
(From OE-Core rev: 6ee5abcc67c35d390d12bbc906787b87df80be3b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Chen Qi
2d9b22db6c sudo: upgrade to 1.8.20p2
The checksum for doc/LICENSE is changed, but the content only changes
year from '2013' to '2017', so the license remains the same.

(From OE-Core rev: e1d27852bf21be49db574ed207bc90d42c4bd898)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Chen Qi
61711c912b cups: upgrade to 2.2.4
(From OE-Core rev: 6547285f855d9826c2055ea97ceb07eb81aeb841)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Chen Qi
dba27e245e diffutils: upgrade to 3.6
diffutils-3.5-gcc7.patch is removed as it's merged in this version.

do_configure_prepend is removed to solve the following configure error.

  error: possibly undefined macro: gl_TYPE_WINT_T_PREREQ

A workaround patch is made to fix the following compilation error for glibc.

  error: dereferencing pointer to incomplete type 'const struct rpl_option'

(From OE-Core rev: 0c09f9f5700696670b2a9d0466124309100eb296)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Chen Qi
e1e723db1d pciutils: upgrade to 3.5.5
(From OE-Core rev: d1e05e9cbddea40ff582fae4ec7e2e7a4f52fd8f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
b876b08129 webkitgtk: update to 2.16.6
(From OE-Core rev: 198ccdbefa481f725492b5d8834213fe26431be5)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
11d07f067d mpg123: update to 1.25.4
(From OE-Core rev: 97a4e2d564807caba5e527d95871972464c261c6)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
21f491974d vala: upgrade to 0.36.4
(From OE-Core rev: 03d0beec5b5e6cadbda398a28c754811a71e529e)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
6e6d07d645 epiphany: upgrade to 3.24.3
(From OE-Core rev: 10de5bf834bf95af05fa8b1c67f0f42a47c6a34e)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
65080777b1 bash-completion: upgrade to 2.7
(From OE-Core rev: ec5938795c44163303d8708d3386947567c05f28)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
afe07094cb btrfs-tools: upgrade to 4.11.1
(From OE-Core rev: c1152321e3bcf7a61103d77759da17575155225c)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Alexander Kanavin
9dd27d7963 icu: update to 59.1
License checksum change due to copyright year update.

Latest icu will not compile with anything less than C++11, so
drop the enforcement of an earlier C++ version. This should be okay,
as there is now a fix in place for the problem of mixing native gcc 4/5
compiled code:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c21cec84886d9c70396e9be0ceb9a8ef300b54be

(From OE-Core rev: b002f44ed5a07b42deb8cccdb192e12091cd654f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Andre McCurdy
ff736d8d61 mirrors.bbclass: provide git repo fallbacks using the https protocol
Use MIRRORS to provide git repo fallbacks using the https protocol,
for cases where git native protocol fetches may fail due to local
firewall rules, etc.

These rules should cover all git native repos used by recipes within
oe-core, with the exception of mtd-utils, for which there's currently
no upstream alternative to the git native protocol for anonymous
access ( see http://git.infradead.org/mtd-utils.git ).

(From OE-Core rev: abb8895d5b42a5dc171360a261a2652acd14ee7e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:53 +01:00
Andre McCurdy
b1bbc082bd gnu-config: update SRC_URI to new savannah.gnu.org hostname
http://sv.gnu.org/ now redirects to http://savannah.gnu.org/

(From OE-Core rev: cf21f45fc7fa7a70df48e9eb6bdf38d0aa902f9b)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
sweeaun
6e37751019 kernel-devsrc: Remove .kernel-meta from package
[YOCTO #11730]

Include .kernel-meta directory in the prune list of the find to
prevent .kernel-meta directory included into installable package.

(From OE-Core rev: 3bcf227dc68f215b2d4d7b58aeea71d237ac719e)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Alexander Kanavin
3310f06db7 eudev: update to 3.2.2
(From OE-Core rev: b3175533438801a4244bc2eb102fd72613f74289)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Maxin B. John
433cbec72e harfbuzz: upgrade to 1.4.7
1.4.6 -> 1.4.7

(From OE-Core rev: c05beaee30f4389fb59693e6690ab156214bcc74)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Joe Slater
25717652b6 go: centralize definition of COMPATIBLE_HOST
Put it in goarch.bbclass which all go related recipes inherit.

(From OE-Core rev: 9e899bbc081cb932c1492f6d6802b908d70ef42f)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Ed Bartosh
111c426a33 image_types_wic: add dependency to e2fsprogs-native
Added e2fsprogs-native to the list of default dependencies for
wic (WKS_FILE_DEPENDS_DEFAULT) as all fs-related utilities
have to be in this list.

Thanks to Patrick Ohly for noticing this.

[YOCTO #11817]

(From OE-Core rev: b1d9f5ba5d75c6e4dae10d9d9b2c03fd3099721d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Ed Bartosh
3a4a738bc5 oe-selftest: wic: change mkfs.btrfs options
test_mkfs_extraopts test case fails on ab with error caused
by using -K --mixed options:
 output: extent-tree.c:2696: btrfs_reserve_extent: BUG_ON `ret` triggered, value -28

For this test case it's not important to use particular options,
so changing options to anything less influential is OK.

Changed extra options for mkfs.btrfs to '--quiet' to fix the failure.

(From OE-Core rev: 6a1489f8deb2b26181ca340a0f6ef62aa18a5188)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Lans Zhang
d95db290e9 rpm: allow to enable RPM file signing
RPM file signing is enabled with --with-imaevm during configuration.
If enabled, the RPM signing tool rpmsign will call libimaevm.so provided
by the recipe ima-evm-utils.

(From OE-Core rev: 9d7797e4374c111f0dff523fd49354bcc33dc2af)

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Ed Bartosh
b139ac4910 wic-tools: add dependency to e2fsprogs-native
Added e2fsprogs-native to the list of dependencies for wic-tools
as all fs-related utilities have to be in this list.

(From OE-Core rev: d0ebcf62109d6a131e02cd4c0f04bba203ed6579)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Robert Yang
74b8f86a05 runqemu: chmod 0o777 for lockdir
Multi-users may run qemu on the same host, all of them should be able to
create or remove lock in lockdir, so set lockdir's mode to 0o777.

Note, os.mkdir()'s mode is default to 0o777, but the current umask value is
first masked out, so use os.chmod() to set it.

(From OE-Core rev: 4a5d21dbdc88982c2c90e660811b84983eaebeb7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Robert Yang
5c7d025ced runqemu: validate combos
Error out ealier if the combos is invalid, e.g.:
$ runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic

This will fail at kernel panic, no we check and error out early. We can
add other checkings in the future.

[YOCTO #11286]

(From OE-Core rev: 8c6f253dfb4899324e91dd5d082190909e2bd25d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Robert Yang
0420171c08 runqemu: check tar.bz2 and .tar.gz
Handle them as nfs, so that cmd like the following can be boot:
$ runqemu tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2

[YOCTO #11286]

(From OE-Core rev: 552093d1f60ca335d95bcfc9d6070ec551ebe6c0)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Robert Yang
b9568cdd46 runqemu: check qbconfload before running bitbake
If qbconfload (.qemuboot.conf is found) is present, we can get
DEPLOY_DIR_IMAGE from it rather than "bitbake -e".

(From OE-Core rev: 89e97033a8a27a695567c321ed0ebf17f23f8d9b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Robert Yang
b8c208e8e8 runqemu: add --debug and --quiet
And move some debug info into logger.debug(), this can make it easy to
read key messages like errors or warnings.

I checked meta/lib/oeqa/ they don't depend on these messages. And I have
run "oe-selftest -a", it doesn't break anything.

[YOCTO #10474]

(From OE-Core rev: e696425e7627edada128b40304fddc84d8d56ba7)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:52 +01:00
Paul Eggleton
d4c3ace097 bitbake: bitbake-diffsigs: fix regression after recent server changes
We were bridging the gap between the server and UI here by calling a
bb.siggen.find_siginfo, a function defined and set on that module from
the metadata. This worked from the UI side before but since the recent
server changes is no longer accessible. Create a new command so this can
execute on the server side and return the result by way of a new event.

(We're still running compare_sigfiles() on the signature generator but
that isn't quite the same thing and does still work.)

Fixes [YOCTO #11844].

(Bitbake rev: fdcea991baa4f83d9c98d468d7b49c8c388a4a15)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 15:14:20 +01:00
Mark Hatle
0342c4270e bitbake: lib/fetch2/__init__.py: Fix unpack comment
(Bitbake rev: b8f477de204ab5d0680b2b7c42370d13395be46c)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 15:14:20 +01:00
Mark Hatle
c6c1823ef2 bitbake: lib/bb/utils.py: Add missing debug level
(Bitbake rev: a0cd748d2f830a305da086eff3462875f64f2a70)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 15:14:20 +01:00
Richard Purdie
8e15e9b6e4 gnome-themes-standard: Fix packages so dev-pkgs image generation works
A change from Ross removed the dual -dev/-dbg packages but this broke
deb/ipk rootfs constuction due to a dependency on a package which doesn't
exist (for dev-pkgs images). Remove the dependency on that package to
allow images to build.

(From OE-Core rev: 51b3ee298635b11d5784caaa0ac1c8f4034c25a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-26 10:12:06 +01:00
Andre McCurdy
961d2366de bitbake: fetch2/__init__.py: replace stray logger.warn() with logger.warning()
Update stray usage of deprecated logger.warn(), which was introduced
to fetch2/__init__.py after all other instances had been replaced by
logger.warning():

  http://git.openembedded.org/bitbake/commit/?id=5a53e7d7b017769a6eb0f0a6335735a1fe51a5ec
  http://git.openembedded.org/bitbake/commit/?id=676a5f592e8507e81b8f748d58acfea7572f8796

(Bitbake rev: 1b14f115a9e929e29e91e8ac70826a3fe7259961)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 23:15:53 +01:00
Tom Rini
a035d6563e image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDs
When we have more than one CONVERSION_CMD being used, for example
ext4.gz.sha256sum we will see errors about "metadata is not
deterministic".  This is because we do not have a stable order of
intermediate files that will be removed in the generated shell command.
We fix this by calling sorted() on the set of rm_tmp_images so that we
will have a stable hash again.

Cc: Patrick Ohly <patrick.ohly@intel.com>
(From OE-Core rev: 98a2afeb3a53bec7a72a4a9846e1dba636cc6f3d)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 23:15:53 +01:00
Jose Perez Carranza
859d9a477a oeqa/buildperf: Add 'bitbake -m' on sync function to ensure bitbake is unloaded
Add 'bitbake -m' to the sync method and ensure all process related to
bitbake are correctly unloaded before doing the different measurements.
Also add a call to sync funtion on Test4 before final measurment of
eSDK deploy dir disk usage.

(From OE-Core rev: 9210c9ce051dfffaa7afa36bb4a926cea289ffd4)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 23:15:53 +01:00
Alexander Kanavin
f7eb49e5db valgrind: fix upstream version check
(From OE-Core rev: f4e86314dac536755b2489a5b442b0f36909cae5)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Alexander Kanavin
000ba1b67c oprofile: fix upstream version check
(From OE-Core rev: 7ca10a92b9f7a9102d44e3b110a485917fa0224a)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Tom Rini
e18cec750b image_types.bbclass: Make u-boot signed images more versatile
With the introduction of chaining compression/conversion support we can
convert the old image_types_uboot.bbclass code that did a hand-chaining
of a set of ${filesystem}.${compression} into generic and arbitrary
support to sign whatever the user wants to sign for their image.

This, for the record, does remove setting a valid compression type in
the record in favour of just saying none.  This is not a generally
useful feature in U-Boot and I believe being versatile in terms of being
able to pass in arbitrary compressions is more important.

(From OE-Core rev: 65f27122950a35a67ce39ae4cfe93d0dca6b0dab)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Tom Rini
6fbbdc626a image.bbclass: Correct chaining compression support
When chaining of compression/conversion types was added, we had a new
way to handle doing things like "ext4.bz2.sha256sum" or
"ext2.gz.u-boot".  However, because the U-Boot image class isn't
included normally, it wasn't properly converted at the time.  After the
support was added the "clean" argument that the .u-boot code uses no
longer functions.  The fix for this inadvertently broke chaining
compression/conversion.  First, correct the u-boot conversion code.

Fixes: 46bc438374de ("image.bbclass: do exact match for rootfs type")
Cc: Zhenhua Luo <zhenhua.luo@nxp.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Patrick Ohly <patrick.ohly@intel.com>
(From OE-Core rev: 0a7ce0b971a208956cb895ba5a869ec8c5d94703)

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Alexander Kanavin
975bea4400 package_rpm.bbclass: disable generation of .build-id links
As we're not using them and they're getting in the way of
reproducibility.

[YOCTO #11718]

(From OE-Core rev: 1bd3ed18379c330c1c733dc9f043dbbe8aa0d254)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Ross Burton
6f3f5d9f46 gnome-themes-standard: don't generate multiple -dev and -dbg packages
(From OE-Core rev: b56e33fa439429f6d93860a49653ba1b16e00bbb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Ross Burton
e97acdcc94 libpng: use SourceForge mirror
The Gentoo mirror also deletes old versions when they're not used, so revert
back to the canonical SourceForge site, adding /older-releases/ to MIRRORS to
handle new releases moving the version we want.

Original idea by Maxin B. John <maxin.john@intel.com>.

(From OE-Core rev: 791a3493c88c9c249f21f6d893b2061e1d8a0af6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Ross Burton
e76d3b2a35 elfutils: use HTTP instead of FTP to fetch
FTP is inferiour to HTTP is all respects, so use the HTTP URL for the tarball.

(From OE-Core rev: 6a9e38be6e9dcbeff033944f9a3a18e3838af10d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:13 +01:00
Enrico Scholz
babc9c4d0d externalsrc: place copy of git index into /tmp and do not use copyfile2
Using shutil.copy2() to copy .git/index to a temporary file tries to
copy SELinux attributes which might fail for confined users in SELinux
environments.

E.g. our builders are running in docker containers and modification of
sources (inclusive updated of .git/index) is done outside.  Trying to
copy .git/index fails with

| $ python3 -c 'import shutil; shutil.copy2("index", "a")'
| ...
| PermissionError: [Errno 13] Permission denied: 'a'

and an AVC like

| denied  { relabelto } for  pid=18043 comm="python3" name="a" dev="dm-29" ino=1067553 scontext=system_u:system_r:container_t:s0:c39,c558 tcontext=unconfined_u:object_r:build_file_t:s0 tclass=file permissive=0

is created.  This can not be solved by adapting the SELinux policy because
this is a very deep constraint violation:

| constrain file { create relabelfrom relabelto } ((u1 == u2 -Fail-)  or (t1 == can_change_object_identity -Fail-) ); Constraint DENIED
|
| Possible cause is the source user (system_u) and target user (unconfined_u) are different.

I do not see much sense in using 'shutil.copy2()' here; 'shutil.copyfile()'
seems to be a better choice (target file is created in a secure way by
tempfile.NamedTemporaryFile()).

By placing the tempfile into /tmp we avoid potential problems related to
git's 'core.sharedRepository'.  As a (positive) side effect, the source
tree will not be modified anymore (at least by this part of code) which
prevented to mount it read-only from somewhere else.

(From OE-Core rev: 3c3c8ecc61dfed68987750d79b5482ab2f6fa02f)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:12 +01:00
Ming Liu
232e3b3a8a buildtools-tarball: drop deltask package/packagedata
They are redundant since nopackages are being inherited.

(From OE-Core rev: 71af69fa898e5614920710ca9e0cea832a2401e4)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:12 +01:00
Ming Liu
5adabdb168 uninative-tarball: drop deltask package/packagedata
They are redundant since nopackages are being inherited.

(From OE-Core rev: 2414e9f286d34af2db5982a988b78362decb7961)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:12 +01:00
Ming Liu
c59ee50082 package-index: inherit nopackages
Drop deltask do_package* syntax, inheriting nopackages instead.

(From OE-Core rev: 2eee6c4ac9ce1b020e9a6658a957459f1915fdb1)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:12 +01:00
Paul Eggleton
5abdc0d728 wic-tools: ensure pseudo is available
wic will attempt to use pseudo from the wic-tools sysroot to run, but it
was only sure to be in there if do_install had executed - which is not
the case if it had been restored from sstate, in which case it failed
horribly as seen when running the wic.Wic.test_fs_types and
test_mkfs_extraopts tests on the Yocto Project autobuilder recently. Add
an explicit dependency on pseudo-native to ensure it's always there.

(From OE-Core rev: ada7408a55ec58e4aa1b094462f8a681e60be613)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:59:12 +01:00
Benjamin Esquivel
c6ac6a827d add fedora-26 to the SANITY_TESTED_DISTROS
tested the quickstart guide on Fedora 26 and confirmed that it
can build a core-image-sato and run the image via runqemu.

(From meta-yocto rev: 4e719fb77d035123d0e2ff84d10cb68c7cc8eccd)

Signed-off-by: Benjamin Esquivel <code@esquibits.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:58:48 +01:00
Ross Burton
3c1fba5d30 bitbake: fetch/wget: mitigate a wget race condition when listing FTP directories
When wget is fetching a listing for a directory over FTP it writes to a
temporary file called .listing in the current directory.  If there are many such
operations happening in parallel - for example during 'bitbake world -c
checkpkg' - then up to BB_NUMBER_THREADS instances of wget will be racing to
write to, read, and delete the same file.

This results in various failures such as the file disappearing before wget has
processed it or the file changing contents, which causes checkpkg to randomly
fail.

Mitigate the race condition by creating a temporary directory to run wget in
when doing directory listings.

[ YOCTO #11828 ]

(Bitbake rev: 91d4ca93df092cf86ab84faaa94cc66ff9f43057)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-25 15:53:19 +01:00
Richard Purdie
33b73b2d79 bitbake: process: Change timeout warning to a note
The warning message currently shown can occur more frequently than previously
if a previous bitbake server is shutting down and we're reconnecting to a new
server. Change it to a note message to match the higher level connection
logging retry messages and so as not to interfer with selftests.

(Bitbake rev: b7514340cd6a2753eb217b059229bb279c3849ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 16:57:14 +01:00
Richard Purdie
76ecfa5f69 bitbake: cooker/process: Drop server_main function
Now that there is only one server, this abstraction is no longer needed
and causes indrection/confusion. The server shutdown is also broken with
the cooker post_server calls happening too late, leading to "lock held"
warnings in the logs if PRServ is enabled.

Remove the abstraction and put the shutdown calls in the right order
with respect to the locking.

(Bitbake rev: c0ddde7cf680225127d6285685652b905ed176c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 16:57:14 +01:00
Richard Purdie
57196bc6e4 bitbake: prserv/serv: Improve process exit handling
The server shutdown is currenlty laggy and race prone. This patch:

* adds a waitpid so that no zombie server is left around if its not
  running in daemon mode.
* adds a quit "sentinal" using a pipe so that we're not sitting in
  a socket poll() until timeout in order just to quit.
* use a select() call to poll the socket and the pipe for a quit signal.

The net result of this change is that the prserv exits with the cooker server
and it does so immediately and doesn't wait for the select/poll calls to
timeout. This makes bitbake a lot more responsive for startup/shutdown and
doesn't cause UI timeout errors as often when prserv is used.

(Bitbake rev: 0b5a837477d18442caf97dd0fa14a806c54f5842)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 16:57:14 +01:00
brian avery
0f20512dea poky: Remove machine specific kernel overrides
This patch removes the machine specific overrides in poky.conf for all
the qemu machines.  With this patch, if you set
PREFERRED_VERSION_linux-yocto="X%" then all the qemu machines as well as
the sample hardware boards will use that version. Without this patch,
the hardware boards would have used version X but the qemu machines
would have needed to have a PREFERRED_VERSION_linux-yocto_qemuarm="X%"
for qemuarm to use that version, for example.  If we need to force a
specific machine (hardware or qemu) to a particular default version we
should add it to the machine conf files for that machine, not in the
distro conf.

(From meta-yocto rev: 6b194a137dcedcae7e4b03f9ebed822d44f53fe2)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:55 +01:00
brian avery
a2b4731cef meta-yocto-bsp: Remove superfluous kernel set
The genericx86 and genericx86-64 machine confs do not need to set the
PREFERRED_PROVIDER_virtual/kernel as they will use the one set by the
distribution. If there needed to be a different version for one of these
machines in the future, we could add it in to the machine.conf.

(From meta-yocto rev: 89dd8159fc83f54d7fe234b619a28f5d97519156)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:55 +01:00
Joe Slater
f19dd2be62 linux-yocto: only suggest default kernel type
The distro should set a default kernel type (?=) which could be
overriden by local.conf (=) or extensions (templates).  The kernel itself
should only use "??=" to provide a value which allows builds to succeed.

(From OE-Core rev: d3a41fbd94462efc8c6f1b55f6fb54001b447c45)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:32 +01:00
Mikko Rapeli
87af2104af cve-check.bbclass: use "+git" as separator in PV instead of "git+"
PV is the recipe major version number. cve-check tries to map that to
NVD database release versions of the component. If the recipe sources
are taken from git, the PV can be automatically modified to include
git details, but the syntax is like 233+gitAUTOINC+a1e2ef7ec9.
In CVE checks we want to remove the git details and just use the major
version information, in this example 233.

Thus use "+git" as the separator and use the first part before the separator
as SW product version number in CVE check.

Fixes version number for e.g. systemd recipe. If systemd PV is
233+gitAUTOINC+a1e2ef7ec9 there will be no matches from CVE database where
latest release mentioned is plain 233. If the filter is set to +git, then
CVE PV is 233 and issues like this are detected by do_cve_check:

https://nvd.nist.gov/vuln/detail/CVE-2017-1000082

(From OE-Core rev: db8815abe3db60b0510fb378bf6d82172c2f2768)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:32 +01:00
Martin Kelly
a2cf84afff gstreamer1.0-python: add new recipe
Previously, we had a gst-python recipe, but it supported only GStreamer
0.1. After GStreamer switched the Python bindings to use GObject
introspection, we were no longer able to build the bindings, and they
were dropped in this patch:

https://patchwork.openembedded.org/patch/93793/

However, at this point, we have a gobject-introspection class, so we can
use the bindings again, this time with GStreamer 1.0.

(From OE-Core rev: 6650bd1b9c770b01525356f9a1fabd758360ee8f)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:32 +01:00
Nicolas Dechesne
9d6b0c508b ffmpeg: fix pkg-config utilization
in config.log we can see:
WARNING: aarch64-linaro-linux-pkg-config not found, library detection may fail.

ffmpeg configure script is not looking for pkg-config at the rigt place since it
is assuming cross compilation. let's force its value in the recipe.

This patches 'fixes' library detection, so it also adds:

--disable-libxcb
--disable-libxcb-shm
--disable-libxcb-xfixes
--disable-libxcb-shape

Which were dangling configure options, which started to be enabled after the
pkg-config fix, so they need now to be explicitely disabled. Follow up patch
will enable these options when DISTRO_FEATURES has x11.

(From OE-Core rev: 3d5f11f0a1fd036e28a1d3f0c3169d8e21cc1358)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:32 +01:00
Patrick Ohly
ba1ea783fd ovmf-shell-image.bb: simplify dependencies
The image consists only of the EFI system partition, therefore
we can avoid depending on the default wic tools.

(From OE-Core rev: f147b2502ae53d63a884a46e994ae18e12ec4ef6)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Nicolas Dechesne
9a7ddbe10c ffmpeg: add PACKAGECONFIG for sdl2
Enabling sdl2 will bring ffplay applications, which can be handy when working
with ffmpeg.

(From OE-Core rev: 5c880eb08ec29e169b9f6b7d6f2e0598a0395d30)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
1d9a27d0cd kernel.bbclass: set CVE_PRODUCT to linux_kernel if not set by recipe
It is used by NVD database CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2017-7273

Setting this in kernel.bbclass fixes CVE reporting for all users of
the class.

(From OE-Core rev: 2e3d325440a50265c73f7d2e782530a02458bc33)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
edaeec5809 cve-check.bbclass: use weak assignment for default CVE_PRODUCT
This way also bbclasses can override it. For example kernel.bbclass
could set CVE_PRODUCT to linux_kernel for all users of the class
which compile Linux kernels.

(From OE-Core rev: 74672a7de5ada45ab8e25b89cbdea3ec33b63b7f)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
487c28986b wpa-supplicant_2.6.bb: set CVE_PRODUCT to wpa_supplicant
It is used in NVD database CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2015-1863

(From OE-Core rev: cc3882ca2fea2c5a8830311eeb7840ae98da9b3c)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
b134fda353 sqlite3.inc: set CVE_PRODUCT to sqlite
It is used in NVD for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2016-6153

(From OE-Core rev: cec6f26f4d2f16c9a58fac5a6344e3d43b36ed09)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
fde69b8241 quota_4.03.bb: set CVE_PRODUCT to linux_diskquota
It is used in NVD for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2012-3417

(From OE-Core rev: 07be7cb9405e4a6289edad8afb3a50c1f8651620)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
ef738c5a6a lttng-ust_2.9.1.bb: set CVE_PRODUCT to ust
It is used in NVD for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2010-3386

(From OE-Core rev: 1c6643f139911ab27618d20f9d4ca609235a680b)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
095dac9129 python.inc: set CVE_PRODUCT to python
All python versions are just python in NVD like this CVE
for python 3.4.4:

https://nvd.nist.gov/vuln/detail/CVE-2016-5699

(From OE-Core rev: 848e1be494e8ea10c729f95f02acb366e1843d75)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
3e9e96a1f0 nspr_4.14.bb: set CVE_PRODUCT to netscape_portable_runtime
This is used in NVD database entries like CVE:

https://nvd.nist.gov/vuln/detail/CVE-2016-1951

(From OE-Core rev: c75e5d3f4b9293cf2f2ebdd3a23743b3df7aa3df)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
e1e79e946e libsndfile1_1.0.28.bb: set CVE_PRODUCT to libsndfile
It is used in NVD to CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2017-6892

(From OE-Core rev: adfb1c7fe28a6ef2bcf698f7415fd86b01bdc489)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
0160ec630e libsamplerate0_0.1.9.bb: set CVE_PRODUCT to libsamplerate
It is used in NVD for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2017-7697

(From OE-Core rev: baafa21919082a8b61af3345c35922d205b254c6)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
e21383f8e1 libpcre2_10.23.bb: set CVE_PRODUCT to pcre2
It is used in NVD as product name for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2017-8786

(From OE-Core rev: ce32c5b8ee77012b36c74323f298dc561741aebd)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
e93cca8add libpcre_8.40.bb: set CVE_PRODUCT to prce
It is used in NVD for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2017-7246

(From OE-Core rev: 523e823988f08679a384a14c4e768b2819f8a6bf)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
5d68f0a822 icu.inc: set CVE_PRODUCT to international_components_for_unicode
NVD uses it for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2014-8146

(From OE-Core rev: eaac39100cadc81c89e6eb5ab389cd684699aa90)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
07afa97ea5 glibc-common.inc: set CVE_PRODUCT to glibc
All recipes which include this .inc map to glibc NVD component.

(From OE-Core rev: 613a13725db4e05539974cc7c66584a287d7b4bd)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
2f9360d2c8 glib.inc: set CVE_PRODUCT to glib
NVD uses product glib and vendor gnome for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2016-6855

(From OE-Core rev: 69d6342d45316389afb4b062088919689db0a6dd)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
2db6cdbc6f gcc-common.inc: set CVE_PRODUCT to gcc
All recipes which include this are using gcc as product name in NVD like

https://nvd.nist.gov/vuln/detail/CVE-2015-5276

(From OE-Core rev: bd6f1430334412588c143d8029be39fe814672cd)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
1b8e31afcc flac_1.3.1.bb: set CVE_PRODUCT to libflac
NVD uses product name libflac for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2014-8962

(From OE-Core rev: e09bd27059b26affddf466f4e55a7f4c719c3b17)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
71d451d169 eglinfo.inc: set CVE_PRODUCT to eglinfo
Upstream is called eglinfo no matter how the recipes are named.
There are no existing CVE's for eglinfo in NVD yet.

(From OE-Core rev: 0b8e2a017e117810c83039a316a11da66fe148b1)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
ba828811d7 bluez5.inc: set CVE_PRODUCT to bluez
bluez is the product name in NVD database for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2016-7837

(From OE-Core rev: aade84aa54bb2f958572623ed6464184efd19862)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
Mikko Rapeli
d2950cacf7 acpid.inc: set CVE_PRODUCT to acpid2
It is used in NVD database for CVE's like:

https://nvd.nist.gov/vuln/detail/CVE-2011-4578

(From OE-Core rev: 966052df79df0f68565ebc40887170322d3f85b8)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:31 +01:00
zhengrq
7100c46a40 glibc-package.inc: add support for armeb of multilib
Add support for armeb of multilib.

(From OE-Core rev: ac3acdcdc313ee13739d378e88b907b31765cfee)

Signed-off-by: zhengrq <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Alexander Kanavin
ebfc2e42dd rpm/dnf: fix Upstream-Status to reflect upstream submission status
(From OE-Core rev: 1ed4b8438087fe6d61203ffbe9737ac382e0d6eb)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Chen Qi
695b3fa02e dhcp: add dhclient.service
Add dhclient.service. This service file mainly comes from meta-systemd,
with modifications to take nfs boot into consideration.

While using eth0 as the nfsboot interface, we'd like dhclient service
to skip it like what ifup and connman do in sysvinit.

(From OE-Core rev: faa8d0f5e8db4a99367d42ba8c8de5b2e339d8d2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Ross Burton
7b078d95fb glibc: fix upstream-status tag in a patch
(From OE-Core rev: 76c824fa3b43fd8902fb89c575b2954e8b1a6ab8)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
sweeaun
027f3d0aef libffi: Support musl-x32 build
Added target musl-x32 in configure.ac to support musl-x32 build in libffi.

(From OE-Core rev: 318e33a708378652edcf61ce7d9d7f3a07743000)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Jose Lamego
07f87dadd7 python*-setuptools: upgrade to 36.2.0
Both python-setuptools and python3-setuptools need to be
upgraded to latest upstream version.

license checksum is now targeted to be performed over the actual
license text at license file.

These changes were tested using qemux86 with core-image-minimal.

(From OE-Core rev: 6ad635a33b5a49fa51165b6ac7606b27438f5d96)

Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Khem Raj
37ec69301a mkelfimage: Fix build on x86_64 with hardening
We get linking errors on some hosts like
| ld -static --warn-multiple-gp --warn-common -T linux-i386/convert.lds -o objdir/linux-i386/convert ob
jdir/linux-i386/head.o objdir/linux-i386/convert_params.o
| objdir/linux-i386/convert_params.o: In function `printf':
| convert_params.c:(.text+0x1fd): undefined reference to `__stack_chk_fail_local'

This is because the build system is defaulting to host linker when building
32bit binaries and it may not have same defaults as OE toolchain and issue
gets highlighted.

fix it by using cross linker for 32bit links when building on x86_64

(From OE-Core rev: 470c8a0fb5f51a626a194c8fd3aabd448b50ebfa)

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-07-24 09:13:30 +01:00
Ed Bartosh
ec5c4e97c8 patchelf: fix segfault for binaries linked by gold
Due to a bug in calculating adresses of modified program
headers patchelf breaks executables linked by Gold linker
causing them to segfault, e.g.
$ tmp/sysroots-components/x86_64/m4-native/usr/bin/m4 --help
Segmentation fault

This is reproducible only in some cases and only for executables
of ET_DYN type produced by Gold or by ld linked with pie.

This should be solved by fix-adjusting-startPage.patch that
fixes calculation logic.

[YOCTO #11785]

(From OE-Core rev: 4e4c96db4b1d2356b5d071cee6746a96eca20439)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Ed Bartosh
52f2d81c9a patchelf: change patch status
The patch has been accepted upstream.
Changed patch status Pending -> Accepted.

(From OE-Core rev: 4e9b1e9798e7b12664d4afc611e430a988b6b1ca)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-24 09:13:30 +01:00
Scott Rifenbark
15901164ee dev-manual, ref-manual: Eliminated pre-built section
Fixes [YOCTO #11630]

I took the section that described how to use a pre-built kernel
and run it through QEMU out.  This is basically a QEMU usage
section and is not in that area.  There were some QEMU speed
up items suitable for the QEMU concepts section in the ref-manual.
I put those in that area.

(From yocto-docs rev: b081013aa10b42e4eb88ed54940112c5ae106911)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Scott Rifenbark
2217d97ba9 dev-manual, ref-manual: Re-wrote QEMU section.
Fixes [YOCTO #11630]

I converted the QEMU section to a procedure.  Also took the
tips section and created individual sections from that.

Cleaned up some areas in the QEMU conceptual section in the
ref-manual

(From yocto-docs rev: dfd3466be605fdd7438653bf54fd0df3594a5c50)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Scott Rifenbark
88c188f990 ref-manual: Added QEMU reference section
Fixes [YOCTO #11630]

The dev-manual had a section on QEMU that combined a lot of
reference information and usage information.  I took the reference
information out and moved it to the ref-manual into a new section
in the second chapter, "Using YP".

(From yocto-docs rev: 188596c576e357925383d0cc3bd2b0cdf41926ec)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Scott Rifenbark
da066d8cdf dev-manual: Scrubbed machine type for runqemu command.
(From yocto-docs rev: 9d7042661ab106055e4c09e4bbb41a8592c715c4)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Scott Rifenbark
33969a3c92 sdk-manual: Converted extracting root filesystem to procedure
(From yocto-docs rev: 371b7c6c4d0d18c7212e0af3ca3ff558de347633)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Scott Rifenbark
5731def901 sdk-manual: Converted SDK build section to procedure
The section needed to be a step-by-step procedure.

(From yocto-docs rev: de4868c97c1199b39b3c3e68b4ff159f6546cd9e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Scott Rifenbark
8b04dca455 sdk-manual: Updated section to locate and install pre-built SDK
The section "Locating Pre-Built SDK Installers" was turned into
a procedure.  I also added some information on the actual names
of the *.sh files.

(From yocto-docs rev: 548886d5a392164783596c0c04779aaffd6ac930)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-22 09:19:25 +01:00
Maxin B. John
5ffec4ad91 bluez5: upgrade to 5.46
5.45 -> 5.46

This includes the new testing utility "advtest"

(From OE-Core rev: 514e9be6b00cd39bb8b2eaf117125109fba17910)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Jose Lamego
853b79db69 python3-git: upgrade to 2.1.5
python3-git needs to be upgraded to latest upstream version.

"git" is added as RDEPENDS.

These changes were tested using qemux86 with core-image-minimal.

(From OE-Core rev: 0b48514d1d26d234c158a4b72087a67d2478362a)

Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Jose Lamego
b571e422c5 python3-mako: update to 1.0.7
python3-mako need to be upgraded to latest upstream version.
This change was tested using qemux86 with core-image-minimal

(From OE-Core rev: 1a2bb950b38035b842d120697d076cfdc832fa37)

Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Maxin B. John
187aa1b9bb libtirpc: upgrade to 1.0.2
1.0.1 -> 1.0.2

Remove these Backported and upstreamed patches:
        1. 0001-Fix-for-CVE-2017-8779.patch
        2. libtirpc-0.2.1-fortify.patch
        3. libtirpc-1.0.2-rc3.patc

(From OE-Core rev: 351a629114c67691ba434a27ec42671474fdc605)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Maxin B. John
e25ff31d95 sqlite3: upgrade to 3.19.3
3.19.2 -> 3.19.3

Fixes a bug associated with auto_vacuum that can lead to database
corruption.

(From OE-Core rev: 2635067901c932888a998ea0fbb45f5d4d3c7c24)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Maxin B. John
887fa65fca orc: upgrade to 0.4.27
0.4.26 -> 0.4.27

(From OE-Core rev: d852730365183f835d4c580775f2393822d60b86)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Maxin B. John
4fe3407cbc libsolv: upgrade to 0.6.28
0.6.27 -> 0.6.28

(From OE-Core rev: dd4c896a3248176c8d992a829d10e2ab135f6522)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Maxin B. John
3b8ca07a0c libjpeg-turbo: upgrade to 1.5.2
1.5.1 -> 1.5.2

Remove this backported patch:
        1. fix-mips.patch

(From OE-Core rev: 5b3c92af0cc7f12313d2e7ac02dc68f8e01b76a1)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Bian Yaqin
aea13401f8 screen: 4.5.1 -> 4.6.0
Update screen from 4.5.1 to 4.6.0

(From OE-Core rev: 422cfb92af8d7d2982dc76614388f22aeb658062)

Signed-off-by: Bian Yaqin <bianyq@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Ricardo Ribalda Delgado
2b77e439f1 base.bbclass: Make .jar file depend on unzip-native
Unzip is required for jar files. Without this patch:
ERROR: junit4-4.3.1-r0 do_unpack: Unpack failure for URL:
'http://downloads.sourceforge.net/junit/junit-4.3.1-src.jar'. Unpack
command
PATH="/var/lib/jenkins/workspace/qt5122-dyspro/build/tmp/sysroots-uninative/x86_64-linux/usr/bin ......."
unzip -q -o '/var/lib/yocto/downloads/junit-4.3.1-src.jar' failed with
return value 127

Suggested-by: Ross Burton <ross.burton@intel.com>
(From OE-Core rev: 96665f8b204b0f0ba571bb6634203aada5983f8a)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Jussi Kukkonen
dfd6b60a31 systemd-bootchart: Fix build with glibc 2.26
xlocale.h is no more, don't include it.

(From OE-Core rev: 4fdc7841a1ec5dfc0a3a3af5e630c9def7a66a24)

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>
2017-07-21 22:51:38 +01:00
Dengke Du
405f210b4b acl: reduce local pending patches
(From OE-Core rev: e35a14b28e021dc6db06e4471efbb7b25e45ee91)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Dengke Du
8087400c7e at: reduce local pending patches
(From OE-Core rev: 07d37b0065c60a9926002f713187ddc6bc26a146)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Jussi Kukkonen
f5bdf4d37f vulkan-demos: Rename ${bindir}/screenshot
This conflicts with sato-screenshot.

(From OE-Core rev: 2cd6ef9309541c625bc3c3bd48e06dcf4a6edd80)

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>
2017-07-21 22:51:38 +01:00
Otavio Salvador
d26aadc8e4 mesa: Upgrade to 17.1.5 release
This is a stable bugfix release. Following upstream bugs were fixed:

Bug 100242 - radeon buffer allocation failure during startup of Factorio
Bug 101657 - strtod.c:32:10: fatal error: xlocale.h: No such file or directory
Bug 101666 - bitfieldExtract is marked as a built-in function on OpenGL ES 3.0, but was added in OpenGL ES 3.1
Bug 101703 - No stencil buffer allocated when requested by GLUT

Also, the following patches were included in this release and as such
deleted:

- etnaviv_fix-shader-miscompilation.patch

(From OE-Core rev: 6e23b9589cd2e35d865f5d5e3469ad251c263af1)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Ed Bartosh
7916a5f013 oe-selftest: wic: add test_mkfs_extraopts test case
Test new wks option --mkfs-extraopts with all filesystems
supported by wic.

(From OE-Core rev: 79e853c450708e1e06684cf1216337cbad964770)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Ed Bartosh
7a2730fe7a wic: add description of --mkfs-extraopts
Updated help contents with the description of new
wks option --mkfs-extraopts

(From OE-Core rev: 69c95f74013d0d8b199abc38ba0d6f3ff952eed3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Ed Bartosh
9f481f5ac9 wic: implement wks option --mkfs-extraopts
This option specifies extra options to pass to mkfs.<fstype> utilities.

[YOCTO #11709]

(From OE-Core rev: 67b7c67edba305fbd31967baa10d27c2e603ec77)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:38 +01:00
Saul Wold
fedac61ad9 pkgconfig: allow kernel to be build with esdk
When the kernel's menuconfig target is called while using the esdk or an
esdk-based container, the pkg-config info that is found is not correct.
The pkg-config info is for the target, but we need the eSDK's information
in order to build the host based menuconfig.

The new pkg-config-esdk script checks both that it's in SDK and being
called from the check-lxdialog script in order to limit the scope of when
the pkg-config automagically switches to pkg-config-native.

The pkg-config-esdk is only installed as pkg-config inside the eSDK, which
is why we use the sstate post install script and check for if we are in the
esdk environment using the WITHIN_EXT_SDK

[YOCTO #11155]

(From OE-Core rev: 0954452d151613fa758fbde8ee9469b30d80776b)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Saul Wold
d98a2f4df0 populate_sdk_ext: Add variable to indicate running in eSDK
This allows for other scripts to know that they are being executed in
the context of the eSDK in order to provide different behaviour as
needed.

[YOCTO #11155]

(From OE-Core rev: ebdd9b5a19eb6fb6c3249be4f0e2480a3de2aa8f)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Martin Jansa
e0fc81e29a icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CC
* without this we cause nativesdk-linux-libc-headers to depend
  on target specific KERNEL_CC (through icecc_get_tool ->
  icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH ->
  TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by
  bitbake-diffsigs:

  OE qemux86@ ~/build/oe-core $ ls /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
  /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f
  /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2

  OE qemux86@ ~/build/oe-core $ bitbake-diffsigs /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
  basehash changed from 39774238b66763c598153132e87a2c1a to aa2d66e770bf533e312536eb0a401c4c
  Variable TARGET_CC_KERNEL_ARCH value changed from '${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork-marm', '', d)} TUNE_FEATURES{thumb} = Set' to ''

(From OE-Core rev: aef5d6052a60f506e842110381a221aed042e054)

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-07-21 22:51:37 +01:00
Martin Kelly
c8b91f665b licenses.conf: enable CDDLv1 license
The CDDL license is now used by open-vm-tools in meta-openembedded, so
we need to add it in order to prevent warnings.

(From OE-Core rev: 0dd9db29e56c75181219bb0dbac88a91989b702b)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
David Vincent
225b809456 initscripts: start bootmisc.sh at 36 instead of 55
bootmisc.sh is responsible for setting the system date to a sane
default. Currently, it is the last script to be run from the rcS
runlevel.

Problem is that the files created before appear to have been created
on 1/1/1970. Most notably, /var/log/dmesg created in dmesg.sh cannot be
properly rotated with logrotate which does not consider it a valid date
and stops processing.

There is no blocker on moving this script right before populating
volatiles because it just requires the local and virtual filesystems to
be mounted to work.

(From OE-Core rev: a0f6508847a28a78cb0a1e9613b6e5cc3047d995)

Signed-off-by: David Vincent <freesilicon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Romain Perier
97c3a88082 logrotate: Add systemd support
Currently, this recipe only supports daily scheduling via a cron job.
This commit adds support for systemd in the recipe, as the feature is
already supported on upstream. When the corresponding distro feature is
enabled the systemd variant will be used. The timer granularity and its
accuracy are also configurable.

(From OE-Core rev: b942d0b17cb6622b653283109307346dcfb4f205)

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Romain Perier
98d3a094d0 logrotate: Bump to 3.12.3
This commit updates the recipe to the last upstream tag. Then, as the
tarball no longer contains the pre-generated Makefile, inherit from
autotools

(From OE-Core rev: 72490b7a327867872987e63d340051c4980044b2)

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Chang Rebecca Swee Fun
c2318ef416 devtool: standard: enable options for PREMIRRORS and MIRRORS
Since we have provide an option to manually enable PREMIRRORS and MIRRORS
in recipetool, we need to make sure devtool is having the same options
as devtool uses recipetool in creating new recipes.

(From OE-Core rev: 198bddeb928a318c3ad168bcb4f83b5cd9a604fb)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Chang Rebecca Swee Fun
819179d775 devtool: find-recipe: enable new subcommand for devtool
devtool find-recipe will prints out the path to the recipe
in a workspace.

This subcommand can also help to find recipe outside of
current workspace using "-a" or "--any-recipe" option.

This enhancement helps developer to get the recipe path
when working with devtool.

[YOCTO #11434]

(From OE-Core rev: 5a16b3c804c5eca331a1c08a7ce31a54909af105)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Chang Rebecca Swee Fun
5778e35378 scriptutils: pass in logger as parameter
logger was not defined in scriptutils.py based on the
observation in python traceback.

Traceback (most recent call last):
  File "/workdir/poky/scripts/devtool", line 351, in <module>
    ret = main()
  File "/workdir/poky/scripts/devtool", line 338, in main
    ret = args.func(args, config, basepath, workspace)
  File "/workdir/poky/scripts/lib/devtool/utilcmds.py", line 55, in
edit_recipe
    return scriptutils.run_editor(find_recipe(args, config, basepath,
workspace))
  File "/workdir/poky/scripts/lib/scriptutils.py", line 141, in
run_editor
    logger.error("Execution of '%s' failed: %s" % (editor, exc))
NameError: name 'logger' is not defined

We pass in logger as parameter to run_editor() from where it has
been called (devtool/utilcmds.py and recipetool/newappend.py),
which both modules already has logger setup.

(From OE-Core rev: 21f04b61973dd9029f0e6bff5445e31cd762bf32)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Chang Rebecca Swee Fun
2c035b266f scriptutils: exit politely when no text editor available
devtool edit-recipe now has ugly tracebacks if executed without an
editor available. This happens in the build containers whenever no
text editor is available.

subprocess.check_call will run text editing command with recipe path
provided. It will wait for command to complete. If the return code
was zero then return, otherwise raise CalledProcessError exception.

This enhancement will suppress the traceback by catching the exception
and prompt the error messages in a proper manner shown below:

pokyuser@59c99c507238:/workdir/docker-dbg$ devtool edit-recipe ifupdown
/bin/sh: 1: vi: not found
ERROR: Execution of 'vi' failed: Command 'vi
"/workdir/docker-dbg/workspace/recipes/ifupdown/ifupdown_0.8.16.bb"'
returned non-zero exit status 127

[YOCTO #11434]

(From OE-Core rev: c536ccfd162fc8871838fa229012c562e3f8e0d9)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Chen Qi
50ef2da7ca systemd: workaround login failure on qemumips64 when 'pam' is enabled
Append " -fno-tree-switch-conversion -fno-tree-tail-merge" to
FULL_OPTIMIZATION to workaround login problem on qemumips64. Otherwise,
user cannot login onto the target even username and password are
provided.

(From OE-Core rev: 35403ba3707c3c8dd94bcc557eef6f7c66696bc5)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Kai Kang
744460e9f2 ghostscript: remove legacy patch png_mak.patch
png_mak.patch was created for ghostscript 9.16 and causes make circular
dependency now. Check source code base/png.mak after apply png_mak.patch:

Line 77: $(MAKEDIRS) : $(pnglibconf_h)
Line 83: $(pnglibconf_h) : $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(TOP_MAKEFILES) $(MAKEDIRS)

So remove png_mak.patch.

(From OE-Core rev: 8a5890cc0b0a6c110edb36aec3614c3ebeb54e24)

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>
2017-07-21 22:51:37 +01:00
Ed Bartosh
d66314a18c image_types: use initrd from pre-sstate directory
mkelfImage was failing trying to use initrd from ${DEPLOY_DIR_IMAGE}:
DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_elf
| Cannot open `tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio.gz':
No such file or directory

As the images have only one deploy point it's not possible to reference
something the images themselves are deploying. They need to reference it
in the "pre-sstate" directory ${IMGDEPLOYDIR}, not the post sstate one
${DEPLOY_DIR_IMAGE}.

Fixed by using ${IMGDEPLOYDIR} instead of ${DEPLOY_DIR_IMAGE} in
mkelfImage command line.

[YOCTO #11767]

(From OE-Core rev: 13d675b0f8968bcfdf36035fd959be285e3da378)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Zhenbo Gao
52be83b3c1 lsb: add checking for chkconfig existence when creating the symbolic
remove_initd and remove_initd will be created as the symbolic file
of chkconfig, which will be not existed when systemd is configured,
so adding the check for the existence of chkconfig before creating
the symbolic.

(From OE-Core rev: 0417cc64516c47fb4daddc80e41e3f9c6ab927fc)

Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Ed Bartosh
8fb8a21b7d wic: fix calculation of partition number
Total number of partitions should be taken into account when calculating
real partition number for msdos partition table. The number can be
different for the 4th partition: it can be 4 if there are 4 partitions in
the table and 5 if there are more than 4 partitions in the table. In the
latter case number 4 is occupied by extended partition.

[YOCTO #11790]

(From OE-Core rev: 5689139b3cd862e2df49f6b21171f513e8a46c60)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Robert Yang
bfd831a869 cryptodev: 1.8 -> 1.9
* Remove backported patch:
  - 0001-Adjust-to-another-change-in-the-user-page-API.patch
  - 06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
  - cb186f682679383e8b5806240927903730ce85d9.patch
  - kernel-4-10-changes.patch

* Update patch:
  - 0001-Disable-installing-header-file-provided-by-another-p.patch

* Update FILES_${PN} since there are files in bindir:
  /usr/bin/hmac_comp
  /usr/bin/cipher_comp
  /usr/bin/async_hmac
  /usr/bin/cipher-aead-srtp
  /usr/bin/hash_comp
  /usr/bin/async_speed
  /usr/bin/async_cipher
  /usr/bin/sha_speed
  /usr/bin/hashcrypt_speed
  /usr/bin/hmac
  /usr/bin/cipher-gcm
  /usr/bin/cipher
  /usr/bin/fullspeed
  /usr/bin/speed
  /usr/bin/cipher-aead

(From OE-Core rev: 27202954ce7abda22f7e81c2d72a80f0fa7006d8)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Otavio Salvador
d2990a2da6 u-boot: Upgrade to 2017.07 release
This patch upgrades the U-Boot to the 2017.07 release.

(From OE-Core rev: b322e1b1cb4cd4d4cc53f868b53ca9b069772755)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Mark Asselstine
17d181f059 python3: fix weakref spewing exceptions during interp finalization
When py3 applications are exiting we often see errors similar to the
following:

Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7fcb56b09400>
Traceback (most recent call last):
  File "/usr/lib64/python3.5/weakref.py", line 117, in remove
  TypeError: 'NoneType' object is not callable

After a quick search this was found to be a well reported issue
upstream and had an appropriate fix which is backported here.

(From OE-Core rev: 8aaf09a916a2f66f1a6a79cbddf45390ecefde4f)

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00
Jussi Kukkonen
9e25a095e1 gnome-common: Remove as deprecated
Nothing in oe-core requires gnome-common and it is also deprecated
upstream: Remove it.

(From OE-Core rev: 14b41d6ad6f582a229b6bd62fc4eb17f615d1ad7)

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>
2017-07-21 22:51:37 +01:00
Dengke Du
b38e816533 bison: reduce local pending patches
(From OE-Core rev: 119dd0889f34d88a5261383d743709db32bf3a1b)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 11:12:44 +01:00
Maxin B. John
0ffa0ae5e7 bluez5: update patch status
Update the status of following patch from Pending to Accepted:
        a) 0001-hciattach-bcm43xx-fix-the-delay-timer-for-firmware-d.patch

(From OE-Core rev: f9ccac5dd359e9b874a39cd879ea23c841085eab)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 11:12:44 +01:00
Patrick Ohly
c8f64501ad bitbake: fetch2/wget.py: improve error handling during sstate check
When the sstate is accessed via HTTP, the existence check can fail due
to network issues, in which case bitbake silently continues without
sstate.

One such network issue is an HTTP server like Python's own SimpleHTTP
which closes the TCP connection despite an explicit "Keep-Alive" in
the HTTP request header. The server does that without a "close" in the
HTTP response header, so the socket remains in the connection cache,
leading to "urlopen failed: <urlopen error [Errno 9] Bad file
descriptor>" (only visible in "bitbake -D -D" output) when trying to
use the cached connection again.

The connection might also get closed for other reasons (proxy,
timeouts, etc.), so this is something that the client should be able
to handle.

This is achieved by checking for the error, removing the bad
connection, and letting the check_status() method try again with a new
connection. It is necessary to let the second attempt fail
permanently, because bad proxy setups have been observed to also lead
to such broken connections. In that case, we need to abort for real
after trying twice, otherwise a build would just hang forever.

[YOCTO #11782]

(Bitbake rev: 6fa07752bbd3ac345cd8617da49a70e0b2dd565f)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 09:26:37 +01:00
David Reyna
882e85cd83 bitbake: toaster: trim build target input
Trim the entered built target value so that Toaster is not
confused with no real targets nor a ghost second target.

[YOCTO #11727]

(Bitbake rev: dd83c732b945ba6f9b7cdf66f6e88cfd15a745a0)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 09:26:18 +01:00
David Reyna
a25ece2d77 bitbake: toaster: set clone progress default to off
Set the clone progress to be off by default for the benefit of
command line projects and 'Local Yocto' builds. For Toaster managed
projects that do use the clone feature the clone progress status
is already explicitly set by the existing code and thus displayed.

[YOCTO #11744]

(Bitbake rev: d25a3088150b2a277242027c12becdeb88c45517)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 09:26:18 +01:00
David Reyna
36568b9e1e bitbake: toaster: include setscene in task progress
Change the task progress counting from the task order field
which excludes setscene to the task completion field which
counts all completed tasks regardless of type.

[YOCTO #9971]

(Bitbake rev: 485b328430dcdfd0b52f09f01ebd490d09459ea3)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 09:26:18 +01:00
Richard Purdie
b4f0266716 bitbake: Update to version 1.35.0 (development version with server rework changes)
(Bitbake rev: eef7a1a3eb0365da5ed2bc9688203fba3b6a61b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
5a8f9aa347 subversion: Upgrade 1.9.5-> 1.9.6
(From OE-Core rev: 5212d88104b7a53d4bd8bf2320aca9455099ac80)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Aníbal Limón
3aa299d51b argparse_oe: Add int_positive type
Sometimes only expect positive values from cmdline so it's better
to filter at parsing cmdline step instead of validate later.

(From OE-Core rev: 3ef5b518febd047bf90a0955fa2b9fb78ba6dde5)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Aníbal Limón
c8330a053b oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from env
The BBPATH environment could be set and can make a failure when try
to build an extensible sdk because it will look the bitbake.lock
file in the original build folder.

Example:

$ export BBPATH=`pwd`
$ bitbake core-image-minimal -c populate_sdk_ext

ERROR: bitbake failed:
ERROR: Only one copy of bitbake should be run against a build directory
ERROR: core-image-minimal-1.0-r0 do_populate_sdk_ext: Function failed:
copy_buildsystem

(From OE-Core rev: 33634b4c38d84e1c5d06056766933f1fe4f47e8d)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Aníbal Limón
ad734fd64a oeqa/selftest/{context,case}: Handle KeyboardInterrupt/SIGINT and SIGTERM
In order to avoid corrupt local.conf and bblayers.conf adds
signal handler for SIGTERM and use try/finally (KeyboardIntrrupt) block
to restore previously backuped configuration.

[YOCTO #11650]

(From OE-Core rev: 9419c81e69d2facc82e39c846466670c09e6b444)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Aníbal Limón
f4a978485f selftest/cases/package: Call parent setUpClass method
Since config paths are now passed in Test context the setUpClass
method is expected to be call.

(From OE-Core rev: 7281c995ff2b009c3fb23c7af1d91fe106ca8f87)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Aníbal Limón
bec45829e3 oeqa/core/loader: Generate function _make_failed_test dynamically
Python versions has different features from branches 3.4.x, 3.5.x and
3.6.x, i expected in wrong mode that was incremental for example changes
in 3.4.4 be in 3.5.x but that's not true.

The _make_failed_test internal method differs and is only available in
certain versions >= 3.4.4 and in 3.5.x and 3.6.x branches but not
realeses have been made including it.

So to avoid futher problems inspect the _make_failed_test and generates
function definition according what parameters are needed, the unique
supossition is that exception argument is always passed.

Related to,
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d8380d098a290510b442a7abd2dd5a50cabf5844

(From OE-Core rev: b4740d2b325a80bcecc5e56dff9add9081fcd31b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
1ae1df3853 oeqa/eSDK: Ignore errors during directory cleanup
The cleanup can fail with:

ERROR [0.000s]: tearDownClass (eSDK.oeSDKExtSelfTest)
FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock'

which is due to bitbake taking a small amount of time to shut down the server.
The easiest fix is just to ignore these kinds of errors, bitbake shouldn't create
any new files during shutdown.

(From OE-Core rev: 68009f4eb323e07cec8c4421d546bd3125dec033)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
e69665f3e5 recipetool: Setup logging before calling prepare
This avoids test failures like:

======================================================================
ERROR [0.946s]: test_recipetool_load_plugin (recipetool.RecipetoolTests)
INFO - ----------------------------------------------------------------------
INFO - Traceback (most recent call last):
  File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/recipetool.py", line 514, in test_recipetool_load_plugin
    with open(srcfile) as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'NOTE: Starting bitbake server...\n/media/build1/poky/meta-selftest/lib/recipetool/bbpath.py'
INFO - ----------------------------------------------------------------------

which comes from:

$ recipetool --quiet pluginfile
NOTE: Starting bitbake server...
/media/build1/poky/meta-selftest/lib/recipetool/bbpath.py

since there is corruption in the output despite the --quiet option. Setting
the logging up before calling tinfoil.prepare() resolves this.

(From OE-Core rev: e124eb73e6a66abbf43dffd82b834e906163614b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
821cb0b819 devtool: Setup logging before calling prepare
This avoids test failures like:

INFO - ======================================================================
INFO - FAIL [1.755s]: test_devtool_layer_plugins (devtool.DevtoolTests)
INFO - ----------------------------------------------------------------------
INFO - Traceback (most recent call last):
  File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 1354, in test_devtool_layer_plugins
    self.assertEqual(result.output, s[::-1])
AssertionError: "NOTE: Starting bitbake server...\noY senu[36 chars]rciM" != "oY senuZ s'enoynA morF tiforP oN edaM tfosorciM"
- NOTE: Starting bitbake server...
  oY senuZ s'enoynA morF tiforP oN edaM tfosorciM
INFO - ----------------------------------------------------------------------

since there is corruption in the output. Setting the logging up before
calling tinfoil.prepare() resolves this.

(From OE-Core rev: 3c479fb17ae4d3e7e5f0889af0f68257ef66475c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
ac4682fc9c oe-pkgdata-util: Setup logging before calling prepare
This avoids test failures like:

INFO - ======================================================================
INFO - FAIL [1.046s]: test_find_path (pkgdata.OePkgdataUtilTests)
INFO - ----------------------------------------------------------------------
INFO - Traceback (most recent call last):
  File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/media/build1/poky/meta/lib/oeqa/selftest/cases/pkgdata.py", line 50, in test_find_path
    self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
AssertionError: 'NOTE: Starting bitbake server...\nzlib: /lib/libz.so.1' != 'zlib: /lib/libz.so.1'
- NOTE: Starting bitbake server...
  zlib: /lib/libz.so.1
INFO - ----------------------------------------------------------------------

since there is corruption in the output. Setting the logging up before
calling tinfoil.prepare() resolves this.

(From OE-Core rev: 39c1bf1feccc8dca57160a1e3cd8a50e8c30ef02)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
0d72748e81 recipetool: create: refactor code for ensuring npm is available
Across devtool and recipetool we had an ugly set of code for ensuring
that we can call an npm binary, and much of that ugliness was a result
of not being able to run build tasks when tinfoil was active - if
recipetool found that npm was required and we didn't know beforehand
(e.g. we're fetching from a plain git repository as opposed to an npm://
URL where it's obvious) then it had to exit and return a special result
code, so that devtool knew it needed to build nodejs-native and then
call recipetool again. Now that we are using real build tasks to fetch
and unpack, we can drop most of this and move the code to the one place
where it's still needed (i.e. create_npm where we potentially have to
deal with node.js code in a plain source repository).

(From OE-Core rev: 8450de16ddb02d863204b411a94c6d84e0f88817)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
b5e42005e9 classes/base: set do_unpack dependencies for rpm files
If we're unpacking any rpm (not just .src.rpm) then we'll need to call
rpm2cpio.sh. As of OE-Core rev a7da1aade118d1ccf1b286f82556cd9f706bd2a4
that script no longer uses file-native, but there is a chance that the
rpm file will be compressed internally using xz (for example, rpms from
Fedora) and therefore the script will need xzcat provided xz-native.

(From OE-Core rev: 2f31f1795bc0c85b1646bc7d9596bbe778cb84e5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
e4346e8be5 recipetool: create: reimplement fetching with normal fetch/unpack tasks
Now that we have the ability to run the tasks in a more standard context
through tinfoil, change recipetool's fetching code to use that to fetch
files using it. This has the major advantage that any dependencies of
do_fetch and do_unpack (e.g. for subversion or npm) will be handled
automatically. This also has the beneficial side-effect of fixing a
recent regression that prevented this fetch operation from working with
memory resident bitbake.

Also fix devtool's usage of fetch_uri() at the same time so that we can
completely replace it.

Fixes [YOCTO #11710].

(From OE-Core rev: 9a47a6690052ef943c0d4760630ee630fb012153)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
7d474e27bc recipetool: create: eliminate second fetch for packages
When dealing with package files (.rpm, .ipk etc.) we need to unpack them
ourselves to get the metadata, which is thrown away when the fetcher
unpacks them. However, since we've already fetched the file once, I'm
not sure as to why I thought I needed to fetch it again - we can just
get the local path and then unpack it directly.

(From OE-Core rev: be45e9b17e9dbc8c2594d3a939be377ab0720a7c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
047d37633b recipetool: create: ensure meaningful error for malformed tarballs
If you pointed recipetool at a URL that should be a tarball e.g.
https://tls.mbed.org/download/start/mbedtls-2.4.2-apache.tgz but instead
it returns an HTML page, we try to unpack it, gzip complains but the
operation doesn't seem to fail - instead we just get back an empty
source tree. Change the checks to account for this - if the source tree
is empty, check if the downloaded file in DL_DIR looks like an HTML file
and error accordingly if it is. If it's not, error out anyway because
no source was unpacked and it should have been (otherwise we just
blindly set up EXTERNALSRC for this which is pointless).

Fixes an aspect of [YOCTO #11407].

(From OE-Core rev: 8496113b63d5a5d1f99056610c0fdb972a6200d4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
a9848fdd46 devtool: extract: refactor kern-tools-native handling
When extracting linux-yocto kernel source, we don't need to dance around
shutting down and starting up tinfoil anymore, we can just execute the
tasks as needed when needed using tinfoil's new build_targets()
function. This allows us to tidy up the code structure a bit.

(From OE-Core rev: 5c7f5031023fb74b5f2f26d6b3c829981f2f54d2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Paul Eggleton
dbc7ca268c classes/staging: change fixme debug message from note to debug
These messages were added for debugging during the recipe specific
sysroot work. They may still be useful but they don't need to be notes -
if they are they show up in recipetool / devtool output when fetching
source.

(From OE-Core rev: a0e93d5c5dcf59d1898a3db727a5ab2d75e3d20e)

(From OE-Core rev: bc1a4af950a2600028d89b7dcb4ff8f409b52739)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
0ad65be8bf oe-init-build-env-memres: Drop it
With the new server structure we no longer need this separate
environment init script. Just set BB_SERVER_TIMEOUT to be greater
than zero and bitbake will remain in memory and the UI will auto-reconnect
to it.

Also clean out the old shutdown code from oe-init-build-env which
also doesn't make sense now.

(From OE-Core rev: a17724d687f9c04dc21f2f369da2b492f7119ba0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:25 +01:00
Richard Purdie
0a9e0f03f5 conf/sanity: Update minimum bitbake verison to 1.35.0 for server rework
(From OE-Core rev: b63fcffe8b6a3f94d4812cd03fb974e173eff3e5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:44:24 +01:00
Paul Eggleton
002a99c6b9 bitbake: fetch2: fire an event when there are missing checksums
If BB_STRICT_CHECKSUMS is set to anything other than "1" i.e. we're not
going to raise an error, then fire an event so that scripts can listen
for it and get the checksums.

(Bitbake rev: 8b2ccb4b865f2df118ef668847df682a83f9c500)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
de4066ea52 bitbake: fetch2: allow hiding checksum warning
If BB_STRICT_CHECKSUMS is set to "ignore" then don't display a warning
if no checksums are specified in the recipe. This is not intended to be
used from recipes - it is needed when we move to using more standard
code paths to fetch new files from scripts i.e. where we don't know what
the checksums are in advance.

(Bitbake rev: f15ca7339de8a448a93a14cf6130b3925178a920)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
2b5c3617c2 bitbake: tinfoil: add more doc comments
We want this API to be easier to use, so add missing function
documentation to help with that.

(Bitbake rev: 3e0e002d6497caa987f327cd83ad4db82cca6810)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
388ae704bb bitbake: tinfoil: add simple API for getting cached recipe information
A common task for tinfoil-using scripts is to iterate over all recipes.
This isn't too difficult with the current API, but the pkg_* variables
are a little awkward and are really designed for bitbake's internal
usage - and it gets a bit more difficult when you want to access some of
the other information such as packages and rprovides. To resolve this,
create a new recipe info class and add an all_recipes() function to
generate this for all recipes. Also add a get_recipe_info() function to
get the information for a specific recipe (by PN).

(It might perhaps be suggested that we already have a structure similar
to this in the cache, however the one we add here is designed for
external use and allows the internal structures to change if needed
without affecting the API).

(Bitbake rev: 308994028e59735ca726c5d2c1f0f85baccfe89d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
9e8bbe7c6f bitbake: tinfoil: enable access to additional cached items
Add access to fn_provides, packages, packages_dynamic and rproviders on
the recipecache object. This requires an additional corresponding
command plumbing to be added.

(Bitbake rev: 3df9b7c615174a6557581f3cd157842a28f6bb26)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
7eb654cb4d bitbake: tinfoil: add functionality for running full builds
Up to this point, if you wanted to run build tasks in the normal way
they get run from a python script, there was no other way than to shell
out to bitbake. Worse than that, you couldn't have tinfoil active during
that because only one bitbake instance could be running at once. As long
as we're prepared to handle the events produced, we can create a wrapper
around calling the buildTargets command. Borrow code from knotty to do
this in such a way that we get the expected running task display
(courtesy of TermFilter) and Ctrl+C handling.

(Bitbake rev: 43761eee756be52a1021be53a40dc591a6c35fa7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
e1285712fa bitbake: knotty: make it possible to use termfilter without either console
This isn't useful for knotty itself, but for use from tinfoil
in case we can't get access to either the console or errconsole, allow
either to be unspecified (None).

(Bitbake rev: 7544de437fc66b81502ecdb5db859182c45827cb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
87182f2ce7 bitbake: lib/bb/ui/uihelper: indicate to caller of eventHandler() if events handled
It is useful for the caller to know whether the uihelper has handled the
event passed so that it can skip other event handling code if so.

(Bitbake rev: be498abfbbb19bdd31e5b53713a74049007e3737)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
21bb330f46 bitbake: lib/bb/event: refactor printing events
We really ought to have just one place where the string representation
of these events is produced. This doesn't take any real control away
from the UI - if an alternative representation is desired, that can
still be made.

(Bitbake rev: cb15db2a799be6d8eab9a2a43a9a573f89229cff)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
eb7401d470 bitbake: tinfoil: set a flag when recipes have been parsed
Make it easy to determine if recipes are parsed (and thus information
about available recipes is in memory).

(Bitbake rev: 7efde2df2ff25063d36ac015146f1975284a69ff)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:12 +01:00
Paul Eggleton
b0f0eaf63c bitbake: tinfoil: add a parse_recipes() function
Python style recommends underscore based naming rather than camelCase,
and thus the former has been used for most of tinfoil's functions. Add
an underscored version of parseRecipes() for consistency and change the
one place we call it to use the new version.

(Bitbake rev: 821f6c41d850752d2bcc2ccd4f8e75b2897a0a3e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Paul Eggleton
192b2e1536 bitbake: tinfoil: add internal mode to build_file() function
In OE's devtool we want to repeatedly run build_file() without showing
unnecessary messages and triggering buildhistory for each call.
build_file() is just a wrapper around the buildFile command. Change
the final "hidewarning" parameter of the buildFile command to "internal"
and have this call a new buildFileInternal() function without triggering
any of the normal build events, silencing the normal info messages from
the runqueue ("Executing RunQueue Tasks", "Tasks Summary" etc.) and
avoiding calling parseConfiguration() which we've already done at this
point.

(Bitbake rev: ba53e067a2d448dd63b4ca252557ce98aa8e6321)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Robert Yang
579b811233 bitbake: bb/main.py: fix logic for --observe-only
Fixed:
$ bitbake --observe-only
FATAL: '--observe-only' can only be used by UI clients connecting to a server.

And even:
$bitbake --observe-only -B localhost:-1
FATAL: '--observe-only' can only be used by UI clients connecting to a server.

This was beucase the brackets were in a wrong position.

(Bitbake rev: 4ffc91a2b3eb13e98078e6b1913f056a0c1797bc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Robert Yang
c276e38bf8 bitbake: bb/main.py: avoid starting server when not needed
Fixed 1:
$ . ../poky/oe-init-build-env-memres .
$ bitbake -m
$ bitbake -m # shutdown it again
$ bitbake -m
Starting bitbake server...
Terminated bitbake server.

It starts the server and kill it which is redundant.

$ bitbake -m
$ bitbake --status-only
Starting bitbake server...

It starts the server which is not what we need.

(Bitbake rev: 335fd0106359dddfe1eeb0c7d0bc03f8454b895c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Robert Yang
38af7fef51 bitbake: bb/main.py: fix infinite loop for --server-only
Fixed:
$ bitbake --server-only -B localhost:-1
Infinite loop
Reconnecting to bitbake server...
[snip]

Break the loop when server-only can fix the problem.

(Bitbake rev: c4d5c3dab5b35f3c6713efad1c8a23229ce4e56b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Robert Yang
47ce5bb034 bitbake: server/process.py: fix self.bitbake_lock.write()
There is no global var "configuration", so the old code hang at
self.bitbake_lock.write(), and nothing wrote to bitbake.lock. I didn't
figure out why it hang (but not print errors).

Reproducer:
$ bitbake -B localhost:-1 world -k

Check bitbake.log, there was nothing, now fixed.

(Bitbake rev: dbdd9010663cd8dcb328e1b6fb40e3a777293bc5)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Richard Purdie
1cfefc8b0f bitbake: cookerdata/cooker: Restore original datastore upon client disconnect
(Bitbake rev: 67ae612ab890965357d24a9bd35610cf813b79ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Richard Purdie
4602408c69 bitbake: server: Rework the server API so process and xmlrpc servers coexist
This changes the way bitbake server works quite radically. Now, the
server is always a process based server with the option of starting
an XMLRPC listener on a specific inferface/port.

Behind the scenes this is done with a "bitbake.sock" file alongside
the bitbake.lock file. If we can obtain the lock, we know we need
to start a server. The server always listens on the socket and UIs
can then connect to this. UIs connect by sending a set of three file
descriptors over the domain socket, one for sending commands, one for
receiving command results and the other for receiving events.

These changes meant we can throw away all the horrid server abstraction
code, the plugable transport option to bitbake and the code becomes
much more readable and debuggable. It also likely removes a ton of
ways you could hang the UI/cooker in weird ways due to all the race
conditions that existed with previous processes.

Changes:

 * The foreground option for bitbake-server was dropped. Just tail
   the log if you really want this, the codepaths were complicated enough
   without adding one for this.
 * BBSERVER="autodetect" was dropped. The server will autostart and
   autoconnect in process mode. You have to specify an xmlrpc server
   address since that can't be autodetected. I can't see a use case
   for autodetect now.
 * The transport/servetype option to bitbake was dropped.
 * A BB_SERVER_TIMEOUT variable is added which allows the server
   to stay resident for a period of time after the last client
   disconnects before unloading. This is used if the -T/--idle-timeout
   option is not passed to bitbake.

This change is invasive and may well introduce new issues however I
believe the codebase is in a much better position for further
development and debugging.

(Bitbake rev: 72a3dbe13a23588e24c0baca6d58c35cdeba3f63)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Richard Purdie
21a19e0e0b bitbake: daemonize: Various fixes
Currently if this code is used with something like oeqa's xml logging
it fails as sys.stdout is an io stream. Add in try/except to handle
this case.

Add a waitpid() call to remove a zombie whilst forking.

Also, append to the logfile, don't overwrite it (otherwise
debugging can be a real pain when the server is restarting for
unknown reasons).

(Bitbake rev: 4e780fa19fc720948cf73133f56f7d837ad9283a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Richard Purdie
62bd2e365e bitbake: cookerdata: Add a function to find TOPDIR
Finding the top level build directory is currently hard and relies on
having a complete cooker being setup. Add a helper function which
does the same thing without all the extra overhead. This is needed
to be able to locate the bitbake lockfile and hence the socket
for connecting clients in the new server model.

(Bitbake rev: d196afe68032898c31a8599ca7d3ceba58d96b0a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Richard Purdie
577b75086e bitbake: server: Remove base classes and inline code
In preparation for rewriting this code, expand the relatively useless
base classes into the code itself.

(Bitbake rev: a1c6151420d86bac658c08ae714647062edd6ef2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Richard Purdie
dd71707d5a bitbake: event/command: Allow UI to request the UI eventhander ID
The UI may want to change its event mask however to do this, it needs the
event handler's ID. Tweak the code to allow this to be stored and add
a command to query it.

Use the new command in the process server backend.

(Bitbake rev: f8cf2cb58b80ce74f756a11a9773b6b0e78d51ee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 08:41:11 +01:00
Alejandro Hernandez
201fe6ee42 linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.9
Upgrades to Linux 4.9.36

(From meta-yocto rev: f99882d06f69d828fd2070a22f091065e8ca06d0)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-20 09:57:59 +01:00
Alejandro Hernandez
8be00a945c linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.4
Upgrades to Linux 4.4.76

(From meta-yocto rev: 96c1eb3de2ec9f7731d2c134b5b85b4db81c1da7)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-20 09:57:59 +01:00
Alejandro Hernandez
8af5fc97e0 linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.1
Upgrades to Linux 4.1.42

(From meta-yocto rev: f328f98de4578a0182bdd84d69dc924521c71488)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-20 09:57:59 +01:00
Kevin Hao
7813f097b8 meta-yocto-bsp: bump to the latest linux stable kernel for the non-x86 BSPs
Bump to the latest stable kernel for 4.1, 4,4 and 4.9.

(From meta-yocto rev: 41128b3640e5733e62cb633f7a3ce704dff6a4f2)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-20 09:57:59 +01:00
Ross Burton
57f606b12b libgcrypt: upgrade to 1.7.8
Fixes CVE-2017-7526, 'flush+reload side-channel attack on RSA secret keys dubbed
"Sliding right into disaster"'.

(From OE-Core rev: c4c2fb3732dbb290b7f0ca43af2e8662f99e4582)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-19 15:13:40 +01:00
Ross Burton
9393207bcd libgcrypt: merge bb and inc file
(From OE-Core rev: 4b48c0afdf24c4fc71479893c262b5f35d8c188a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-19 15:13:40 +01:00
Ross Burton
50af58cedb systemd: refuse to load units with errors (CVE-2017-1000082)
If a unit has a statement such as User=0day where the username exists but is
strictly speaking invalid, the unit will be started as the root user instead.

Backport a patch from upstream to mitigate this by refusing to start units such
as this.

(From OE-Core rev: 549cb941c5b19909fb00f2bef9c04172ca1c162d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-19 11:30:16 +01:00
Paul Eggleton
fcf4312731 bitbake: fetch2: fix indentation
(Bitbake rev: 6683338598ce97278f188fbcd780c3e3754e5b9a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-18 22:39:33 +01:00
Paul Eggleton
34c1302273 bitbake: cooker: fix whitespace
(Bitbake rev: a5f9603988b0a897696e529391b4d95c5e339833)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-18 22:39:33 +01:00
Paul Eggleton
819c98d9ea bitbake: cache.py: fix whitespace
(Bitbake rev: e22b1f1c0e57c6ada4fb044791159546e2260dad)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-18 22:39:33 +01:00
Paul Eggleton
f93c9157e5 bitbake: cookerdata: fix indentation and trailing spaces
Fix one incorrect indentation and several lines with trailing spaces.

(Bitbake rev: 4dbf4f1907a32f303c2e9acf2f27817cf3c9ec38)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-18 22:39:33 +01:00
Paul Eggleton
c361cac161 bitbake: knotty: fix indentation
(Bitbake rev: 06a96d267dec5b542725defb8f01403f505c4f44)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-18 22:39:33 +01:00
Aníbal Limón
5a5c6c7fb6 bitbake: bb/server/process: Handle EINTR on idle_commands select
If a signal is sent like SIGWINCH the select could be interrupted
so ignore the InterruptError like in XMLRPC server [1].

[1]
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/server/xmlrpc.py#n307

(Bitbake rev: 96bb174325493764718c61c12c943c37b882cd61)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-18 22:32:02 +01:00
Joshua Lock
a4f2bf37b7 mpc8315e-rdb: add wic.bmap to IMAGE_FSTYPES
In order to match the other meta-yocto-bsp MACHINE definitions add wic.bmap
to the produced images.

(From meta-yocto rev: 43c3e1194bf789d16c3e9bd41b8aae0098362677)

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>
2017-07-17 15:14:27 +01:00
Joshua Lock
438ea5a1c3 poky: add Ubuntu 17.04 Zesty Zapus to SANITY_TESTED_DISTROS
The new Ubuntu releases on 2017-04-13, after cutoff for Yocto Project 2.3.

I've been running builds of some images and a world build in a container
over the past couple of days without issue. I've also run a complete
oe-selftest run (with SANITY_TESTED_DISTROS = "") and did not observe any
errors.

(From meta-yocto rev: ecdaf38e0b6beaeaf8ea7f804ca73a18f0dbe371)

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>
2017-07-17 15:14:27 +01:00
Carlos Alberto Lopez Perez
993cef6bbe webkitgtk: Upgrade to 2.16.5
Adjust some dependencies: libgcrypt is now required (instead of gnutls)
and the following build deps where missing: gettext-native, glib-2.0
and glib-2.0-native.

Also the CMake argument ENABLE_CREDENTIAL_STORAGE has been renamed to
USE_LIBSECRET.

This new upstream release (2.16.4 actually) includes security fixes for
CVE: CVE-2017-2538

(From OE-Core rev: ef68005a8c527e9b1d05b7769f0ec8ebe9ec3f91)

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Jussi Kukkonen
a1d94933f2 gnome-desktop: Don't use gnome-common
Add a patch to no use gnome-common macros

(From OE-Core rev: 9c3e4be45268d4ba91558751d0a35858aed53f27)

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>
2017-07-17 14:01:39 +01:00
Jussi Kukkonen
b663374cf4 python3-pygobject: Don't use gnome-common
Patch out the one use of gnome-common macros: pygobject is moving to
autoconf-archive in next release so this patch is temporary.

(From OE-Core rev: 22525a706196544919586e1bc764f362661685ae)

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>
2017-07-17 14:01:39 +01:00
Jussi Kukkonen
e94b159b2e matchbox-desktop: Upgrade to 2.2
Only change is dropping dependency on gnome-common
(which is deprecated upstream).

(From OE-Core rev: 77ac45c242e65d90cda43199a33dae85dec0cd0a)

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>
2017-07-17 14:01:39 +01:00
Ross Burton
1884950498 libgcrypt: upgrade to 1.7.7
(From OE-Core rev: 99392e366047ee14e0ac94ac0ad2d97fed02e097)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Robert Yang
73fc26cfcd libbsd: 0.8.3 -> 0.8.5
* The LIC_FILES_CHKSUM is changed becauses the files updated the date, and added
  a BSD-3-clause-John-Birrell for man/timeradd.3bsd, this license is already
  there for other files.

* Update 0002-Remove-funopen.patch

* Remove 0003-Fix-build-breaks-due-to-missing-a.out.h.patch, the a.out
  code is gone in the source, so this patch is not needed any more.

(From OE-Core rev: 1be785e420c838080ce5dc608192794e46961582)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Fan Xin
3c24505d16 apr: 1.5.2 -> 1.6.2
Update apr from 1.5.2 to 1.6.2

(From OE-Core rev: 88e7f5c25f1e303b9d68fe25d7e785b9412c6138)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Changhyeok Bae
fb449921ac ethtool: Upgrade to 4.11
Restore SRC_URI address

(From OE-Core rev: 79212fea2ad6bf61097a8e1cda2e17ea30d059cb)

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Dengke Du
1d7fab4b0f chrpath: reduce local pending patches
(From OE-Core rev: 29e55fe5c5085e40dc9408294a9c59368b029f08)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Dengke Du
ff576d1071 dropbear: reduce local pending patches
(From OE-Core rev: 9b2e3b8235ee545b0eb666266c5db2ec7cb9e21f)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Patrick Ohly
b066632e2e base-files: ignore "mesg n" error messages
When using "su - myuser" to change from root to a non-privileged user,
"mesg n" from the default .profile fails with "mesg: error: tty device
is not owned by group `tty' or "mesg: cannot open /dev/ttyS0:
Permission denied", depending on whether mesg comes from busybox or
util-linux.

This does not happen during a normal login because permissions on
/dev/tty* get changed while doing that, something that isn't possible
with plain "su -".

As the error can't be avoided and failures of mesg probably aren't
particularly important, now error messages get dumped to /dev/null.

[YOCTO #11127]

(From OE-Core rev: 4511a524f906c97db7c7674ad34e7bc8630649e3)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Patrick Ohly
3ae1f267d4 util-linux: fix "su -" and package su separately
"su -" == "su --login" was broken because it uses /etc/pam.d/su-l and
lacking that, falls back to /etc/pam.d/other which denies the
operation. The fix is to symlink "su-l" to the normal "su" pam config
file.

Because "su" usually comes from "shadow" and has been broken like this
without anyone noticing, it probably is not used much and thus should
be packaged separately so that it can be installed only when really
needed. For backwards compatibility, "util-linux" still pulls it in.

It is a bit strange that DISTRO_FEATURES are getting checked when
deciding whether the packages should be defined. It is not wrong, the
packages will be simply empty and thus probably not created when the
distro feature is on and the package config is off. Perhaps there is a
reason, so this is kept unchanged. The symlink however only gets
created when su.util-linux really gets built.

[YOCTO #11126]

(From OE-Core rev: 1ad32536c2d4a3e55e698d27d827caee788cb0f7)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Hongxu Jia
a731d879a7 dhcp: fix shutdown not work by SIGTERM while bind9 enable threads
In https://source.isc.org/git/bind9.git, since the following
commit applied:
...
commit b99bfa184bc9375421b5df915eea7dfac6a68a99
Author: Evan Hunt <each@isc.org>
Date:   Wed Apr 10 13:49:57 2013 -0700

    [master] unify internal and export libraries

    3550.       [func]          Unified the internal and export versions of the
                        BIND libraries, allowing external clients to use
                        the same libraries as BIND. [RT #33131]
...
(git show b99bfa184bc9375421b5df915eea7dfac6a68a99 -- ./lib/isc/unix/app.c)

In this commit, if bind9 enable threads(ISC_PLATFORM_USETHREADS),
it blocks signal SIGHUP, SIGINT and SIGTERM in isc__app_ctxstart.
Which caused dhclient/dhcpd could not be stopped by SIGTERM.

It caused systemd's reboot hung which send SIGTERM by default.

(From OE-Core rev: 7d3e734481e5d400d03ffd0a12669913fd264c5f)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Kai Kang
39f74e11fd bind: 9.10.3-P3 -> 9.10.5-P3
Upgrade bind from 9.10.3-P3 to 9.10.5-P3

* Update md5sum of LIC_FILES_CHKSUM that it update year in file COPYRIGHT
* Remvoe mips1-not-support-opcode.diff which has been merged
* Remove CVE patches that there are backported from upstream
* Use python3 for build and make sure install .py files to right directory

(From OE-Core rev: 9ee6a0a6599d081767b63382a576e67aed12cf4d)

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>
2017-07-17 14:01:39 +01:00
Bruce Ashfield
e6c05f57a5 linux-yocto-dev: bump to 4.12+
(From OE-Core rev: 26aaa6cca9de678fa6d6e89902d14aff9cf3c8b0)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:39 +01:00
Bruce Ashfield
6a3ab0f721 linux-yocto/4.9: update to v4.9.36
Integrating the -stable release with the following commits:

   9f86f302ec0e Linux 4.9.36
   a29fd27ca268 KVM: nVMX: Fix exception injection
   d1d3756f07da KVM: x86: zero base3 of unusable segments
   f3c3ec96e5fb KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
   1eeb79426332 KVM: x86: fix emulation of RSM and IRET instructions
   982d8d92f256 arm64: fix NULL dereference in have_cpu_die()
   a4bfcab30928 mtd: nand: brcmnand: Check flash #WP pin status before nand erase/program
   de5862335ed7 i2c: brcmstb: Fix START and STOP conditions
   8ee785016d5a brcmfmac: avoid writing channel out of allocated array
   65fc82cea84f infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data
   3e51ccbadd15 objtool: Fix another GCC jump table detection issue
   92e66676523a clk: scpi: don't add cpufreq device if the scpi dvfs node is disabled
   8a6f400a374c cpufreq: s3c2416: double free on driver init error path
   1781a29b31fa iommu/amd: Fix interrupt remapping when disable guest_mode
   0e55856b8f29 iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
   f0c31c674abd iommu/dma: Don't reserve PCI I/O windows
   d7fcb303d1ee iommu: Handle default domain attach failure
   c19bfc6765d4 iommu/vt-d: Don't over-free page table directories
   d5c5e8ba5d9d ocfs2: o2hb: revert hb threshold to keep compatible
   8af88a950b42 x86/mm: Fix flush_tlb_page() on Xen
   3667dafd6c04 x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
   b287ade87c91 x86/boot/KASLR: Fix kexec crash due to 'virt_addr' calculation bug
   15541e64163c tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
   a2c222bef08f ARM: 8685/1: ensure memblock-limit is pmd-aligned
   7661b19687b2 ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation
   4efe34b500a7 ARM: dts: OMAP3: Fix MFG ID EEPROM
   07bb2c7e7ea3 ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer
   e57aa416ca4c regulator: tps65086: Fix DT node referencing in of_parse_cb
   88baad2e7159 regulator: tps65086: Fix expected switch DT node names
   9846c67974d6 spi: fix device-node leaks
   c52829f60f5f spi: When no dma_chan map buffers with spi_master's parent
   478273e11521 sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting
   eea0261db8ef watchdog: bcm281xx: Fix use of uninitialized spinlock.
   4211442b2088 netfilter: use skb_to_full_sk in ip_route_me_harder
   ac2730234cc1 xfrm: Oops on error in pfkey_msg2xfrm_state()
   c460f2beb6f0 xfrm: NULL dereference on allocation failure
   1e1666257cb6 xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
   647f605276c0 mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings
   f9f73c58feef ravb: Fix use-after-free on `ifconfig eth0 down`
   adfe95fe5b42 ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets
   168bd51ec5ef sctp: check af before verify address in sctp_addr_id2transport
   399566f8a4fb net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
   b6f75b986a7f perf probe: Fix to probe on gcc generated functions in modules
   9f8ffe4e0952 tipc: allocate user memory with GFP_KERNEL flag
   18b200e0c8ee net: phy: dp83867: allow RGMII_TXID/RGMII_RXID interface types
   e1eac347d971 perf probe: Fix to show correct locations for events on modules
   cc439964fab1 be2net: fix MAC addr setting on privileged BE3 VFs
   02434def6fd0 be2net: don't delete MAC on close on unprivileged BE3 VFs
   fa1dbf505aef be2net: fix status check in be_cmd_pmac_add()
   5f54c4e1e2af usb: dwc2: gadget: Fix GUSBCFG.USBTRDTIM value
   0e9867b7113c s390/ctl_reg: make __ctl_load a full memory barrier
   9d00195bc0af swiotlb: ensure that page-sized mappings are page-aligned
   68a5dc385735 coredump: Ensure proper size of sparse core files
   d21816c24591 aio: fix lock dep warning
   82835fb33ce5 perf/x86: Reject non sampling events with precise_ip
   1c68633329d2 perf/core: Fix sys_perf_event_open() vs. hotplug
   48131dd0f2b1 x86/mpx: Use compatible types in comparison to fix sparse error
   283994074501 x86/tsc: Add the Intel Denverton Processor to native_calibrate_tsc()
   6baa8c92dab9 mac80211: initialize SMPS field in HT capabilities
   8eaaf66d41ad pmem: return EIO on read_pmem() failure
   25319ae8e8a7 drm/amd/powerplay: refine vce dpm update code on Cz.
   f275ac7fc5d2 drm/amd/powerplay: fix vce cg logic error on CZ/St.
   77e82094a3c9 drm/radeon/si: load special ucode for certain MC configs
   4ae8dc6acb71 net: thunderx: acpi: fix LMAC initialization
   f88f06e18318 arm64: assembler: make adr_l work in modules under KASLR
   aabb797b4c12 spi: davinci: use dma_mapping_error()
   c32462d0b523 scsi: lpfc: avoid double free of resource identifiers
   582c1ca0ea1d HID: i2c-hid: Add sleep between POWER ON and RESET
   c78b8de5c05c perf/x86/intel: Use ULL constant to prevent undefined shift behaviour
   6130fac99481 mac80211: recalculate min channel width on VHT opmode changes
   d48cb21fd50b net: phy: marvell: fix Marvell 88E1512 used in SGMII mode
   849f2d0665e0 pinctrl: intel: Set pin direction properly
   3a6edbc95ba0 perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code
   b8c5e7b12413 drm/etnaviv: trick drm_mm into giving out a low IOVA
   2bc8fcd633d8 Documentation: devicetree: change the mediatek ethernet compatible string
   c5c8743642ae kernel/panic.c: add missing \n
   00f468f51dd5 ibmveth: Add a proper check for the availability of the checksum features
   32bd4d2ed9d8 vxlan: do not age static remote mac entries
   b07bf2364605 ip6_tunnel: must reload ipv6h in ip6ip6_tnl_xmit()
   7fdc81f6e1a9 virtio_net: fix PAGE_SIZE > 64k
   a6c3e01bf32e mlxsw: spectrum_router: Correctly reallocate adjacency entries
   ff3b1dd026bb vfio/spapr: fail tce_iommu_attach_group() when iommu_data is null
   8895ef4e5357 drm/amdgpu: check ring being ready before using
   e5a2ba9af818 net: dsa: Check return value of phy_connect_direct()
   c6f284899e01 amd-xgbe: Check xgbe_init() return code
   e99d86d76eed platform/x86: ideapad-laptop: handle ACPI event 1
   e9a87e0f5bbb iwlwifi: fix kernel crash when unregistering thermal zone
   322baf72eed5 scsi: virtio_scsi: Reject commands when virtqueue is broken
   5d5c293af834 xen-netfront: Fix Rx stall during network stress and OOM
   72191c7d82e7 swiotlb-xen: update dev_addr after swapping pages
   884baf2abf6d virtio_console: fix a crash in config_work_handler
   c3eab85ff11a Btrfs: fix truncate down when no_holes feature is enabled
   e8b5068b64d0 Btrfs: Fix deadlock between direct IO and fast fsync
   83571e9ef7c9 gianfar: Do not reuse pages from emergency reserve
   c48a862c47d4 objtool: Fix IRET's opcode
   251d00bf1309 bpf: don't trigger OOM killer under pressure with map alloc
   a7a2a6d34fe7 bnxt_en: Fix "uninitialized variable" bug in TPA code path.
   da805bc788b0 xen-netback: protect resource cleaning on XenBus disconnect
   7bdccaa5da12 xen-netback: fix memory leaks on XenBus disconnect
   5dcd08594276 net: ethtool: Initialize buffer when querying device channel settings
   6e315b2b10b6 powerpc/eeh: Enable IO path on permanent error
   ea7b808165a5 net: korina: Fix NAPI versus resources freeing
   fded17be01ab perf/x86/intel: Handle exclusive threadid correctly on CPU hotplug
   3eeb3459b7e6 net: phy: dp83848: add DP83620 PHY support
   10c24e89b2b8 drm/amdgpu: add support for new hainan variants
   9f2a36a7504c drm/amdgpu: fix program vce instance logic error.
   0c9626619777 qla2xxx: Fix erroneous invalid handle message
   8cfcaa2899f3 qla2xxx: Terminate exchange if corrupted
   42a1d5b47594 scsi: lpfc: Set elsiocb contexts to NULL after freeing it
   7782ab228f64 stmmac: add missing of_node_put
   ee4494c6bda8 scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
   80b1a1180e4e KVM: x86: fix fixing of hypercalls
   afaee3ef5136 xen/blkback: don't free be structure too early
   13fa36f9fbc8 ARM64: dts: meson-gxbb-odroidc2: fix GbE tx link breakage
   8bface142a8d dt: bindings: net: use boolean dt properties for eee broken modes
   3897ae12b706 net: phy: use boolean dt properties for eee broken modes
   40373d91a0f7 net: phy: fix sign type error in genphy_config_eee_advert
   752ba680eb70 dt-bindings: net: add EEE capability constants
   97ace183074d net: phy: add an option to disable EEE advertisement
   0e8eca987e27 net: ethtool: add support for 2500BaseT and 5000BaseT link modes
   8886196a7320 sparc64: Zero pages on allocation for mondo and error queues.
   41172b772da4 sparc64: Handle PIO & MEM non-resumable errors.
   2aa6d036b716 mm: numa: avoid waiting on freed migrated pages
   08cb8e5f83fd l2tp: take a reference on sessions used in genetlink handlers
   599e6f038777 l2tp: hold session while sending creation notifications
   d9face6fc62a l2tp: fix duplicate session creation
   806e98835683 l2tp: ensure session can't get removed during pppol2tp_session_ioctl()
   6539c4f991c2 l2tp: fix race in l2tp_recv_common()
   d2da8d394147 usb: gadget: f_fs: Fix possibe deadlock
   ed96148d7f8e x86/mm: Fix boot crash caused by incorrect loop count calculation in sync_global_pgds()
   1c0fa383b339 dm thin: do not queue freed thin mapping for next stage processing
   466877f2d257 drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
   78c4244f8bdb gpiolib: fix filtering out unwanted events
   cb2c6fdf620f NFSv4.1: Fix a race in nfs4_proc_layoutget
   7d0e27fe24c5 ALSA: hda - set input_path bitmap to zero after moving it to new place
   093750c3dec4 ALSA: hda - Fix endless loop of codec configure
   dad3135e762b MIPS: Fix IRQ tracing & lockdep when rescheduling
   e9e24faf823e MIPS: pm-cps: Drop manual cache-line alignment of ready_count
   f7d3d40ea124 MIPS: Avoid accidental raw backtrace
   3d4ac49a9538 MIPS: head: Reorder instructions missing a delay slot
   b1355226a64e mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()
   dbc808362b6c drm/ast: Handle configuration without P2A bridge
   8dc9f9dede5b xen/blkback: don't use xen_blkif_get() in xen-blkback kthread
   4ebe28d23d35 NFSv4.x/callback: Create the callback service through svc_create_pooled
   955f270b6f5d NFSv4: fix a reference leak caused WARNING messages
   b89bd0c715c1 netfilter: synproxy: fix conntrackd interaction
   ced7689be60d netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
   8e2316399b8f rtnetlink: add IFLA_GROUP to ifla_policy
   b9ca9b0f5510 ipv6: Do not leak throw route references
   e4089baa08c4 sfc: provide dummy definitions of vswitch functions
   08058c258afb net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
   f1a0e7d172b0 decnet: always not take dst->__refcnt when inserting dst into hash table
   c7d422d68fe9 net/mlx5e: Fix timestamping capabilities reporting
   25ff35074e27 net/mlx5: Wait for FW readiness before initializing command interface
   176b9874a203 net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it
   4c246863e7b4 sctp: return next obj by passing pos + 1 into sctp_transport_get_idx
   fded2d74a350 ipv6: fix calling in6_ifa_hold incorrectly for dad work
   cac2a9bb4034 igmp: add a missing spin_lock_init()
   ecd6627f48bd igmp: acquire pmc lock for ip_mc_clear_src()
   059686754c18 proc: snmp6: Use correct type in memset
   78b24ab695ab net/mlx5e: Fix wrong indications in DIM due to counter wraparound
   9854e5865990 net/mlx5e: Added BW check for DIM decision mechanism
   57360bc3c7a6 net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse
   bb566ce3a60e net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
   8cda426a7cfa sctp: disable BH in sctp_for_each_endpoint
   c6d4ff85722b Fix an intermittent pr_emerg warning about lo becoming free.
   bb84290cd296 af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
   386ed38f0f28 net: vrf: Make add_fib_rules per network namespace flag
   b5cc68e0c190 net: Zero ifla_vf_info in rtnl_fill_vfinfo()
   fd9b13e6c175 decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
   d2f459e3feb0 net: don't call strlen on non-terminated string in dev_set_alias()
   98184bbb8dae ipv6: release dst on error in ip6_dst_lookup_tail
   92905e331aea Linux 4.9.35
   855b08e57777 brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2()
   21eaaa76b701 jump label: fix passing kbuild_cflags when checking for asm goto support
   ffa96c1a6afe net: phy: fix marvell phy status reading
   5da6415e427b spi: double time out tolerance
   25c7794ed046 dmaengine: bcm2835: Fix cyclic DMA period splitting
   81135c71bde3 net: phy: Initialize mdio clock at probe function
   948c4f17ab7e rt2x00: avoid introducing a USB dependency in the rt2x00lib module
   225969acc0f1 usb: gadget: f_fs: avoid out of bounds access on comp_desc
   5306119473b2 mtd: spi-nor: fix spansion quad enable
   dcd015f733a7 of: Add check to of_scan_flat_dt() before accessing initial_boot_params
   f20603874211 rxrpc: Fix several cases where a padded len isn't checked in ticket decode
   581659a87820 drm/amdgpu: adjust default display clock
   217e035d5120 drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
   e4b8d1e84410 drm/radeon: add a quirk for Toshiba Satellite L20-183
   61ea7c2817bd drm/radeon: add a PX quirk for another K53TK variant
   3900f24aa6fa iscsi-target: Reject immediate data underflow larger than SCSI transfer length
   463440e6de4a iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP
   1f576d53d854 target: Fix kref->refcount underflow in transport_cmd_finish_abort
   99f66b5182a4 arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
   a53bfdda06ac time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
   02a37ccd6347 time: Fix clock->read(clock) race around clocksource changes
   c81d034bd09a brcmfmac: unbind all devices upon failure in firmware callback
   ba2d8d67875c brcmfmac: use firmware callback upon failure to load
   1dd15bd62221 brcmfmac: add parameter to pass error code in firmware callback
   20d8f785f974 Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
   8eaa481dfb4c powerpc/64s: Handle data breakpoints in Radix mode
   414f51ceb6ff powerpc/kprobes: Pause function_graph tracing during jprobes handling
   f719f20abe2a signal: Only reschedule timers on signals timers have sent
   99afebe8fef9 HID: Add quirk for Dell PIXART OEM mouse
   cdf300d6105d cxgb4: notify uP to route ctrlq compl to rdma rspq
   fb6dc831b5cf CIFS: Improve readdir verbosity
   2f1527e359f4 KVM: PPC: Book3S HV: Context-switch EBB registers properly
   468aa930c0a2 KVM: PPC: Book3S HV: Preserve userspace HTM state properly
   df3a787b3a71 KVM: s390: gaccess: fix real-space designation asce handling for gmap shadows
   5220378bd91c perf/x86/intel: Add 1G DTLB load/store miss support for SKL
   7c679fe729c2 lib/cmdline.c: fix get_options() overflow while parsing ranges
   bc6eecff3d95 autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
   4b660fcbc64e powerpc/perf: Fix oops when kthread execs user process
   3d6848e491df fs/exec.c: account for argv/envp pointers
   552a14a572a2 ALSA: pcm: Don't treat NULL chmap as a fatal error
   8c9c55a0f576 ALSA: firewire-lib: Fix stall of process context at packet error
   4ae2cb91a636 xen-blkback: don't leak stack data via response ring
   e5c49c1703ae xen/blkback: fix disconnect while I/Os in flight
   0e051f17bd04 clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset
   493ecd5cd73e Linux 4.9.34
   ce7fe8595902 mm: fix new crash in unmapped_area_topdown()
   5d10ad629726 Allow stack to grow up to address space limit
   cfc0eb403816 mm: larger stack guard gap, between vmas
   04651048c79a alarmtimer: Rate limit periodic intervals
   b355b899c74a crypto: Work around deallocated stack frame reference gcc bug on sparc.
   7dfe7ca9ec12 vTPM: Fix missing NULL check
   ecae47331a43 MIPS: .its targets depend on vmlinux
   6b706cbb16e9 MIPS: Fix bnezc/jialc return address calculation
   22921a9e232a usb: dwc3: exynos fix axius clock error path to do cleanup
   f0ee203c864f usb: gadget: composite: Fix function used to free memory
   8ee7f06f4dca alarmtimer: Prevent overflow of relative timers
   766283254b67 genirq: Release resources in __setup_irq() error path
   8a48b7eace4d sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()
   cf6ac3abb323 iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500
   f7ae7d2229d2 swap: cond_resched in swap_cgroup_prepare()
   1419b8752153 mm/memory-failure.c: use compound_head() flags for huge pages
   0c0d3d8730db USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
   3ff5f4f6a8a7 USB: gadget: fix GPF in gadgetfs
   06178662474c usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
   4581d7dd44f3 usb: xhci: Fix USB 3.1 supported protocol parsing
   2abac4084fb9 drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
   f28ba80c6a3e misc: mic: double free on ioctl error path
   02d009e865a8 ath10k: fix napi crash during rmmod when probe firmware fails
   07612c1227e8 usb: r8a66597-hcd: decrease timeout
   f75f4d196ab5 usb: r8a66597-hcd: select a different endpoint on timeout
   c8091f0e8549 USB: gadget: dummy_hcd: fix hub-descriptor removable fields
   374aceef5912 pvrusb2: reduce stack usage pvr2_eeprom_analyze()
   9ae5dac225e2 USB: usbip: fix nonconforming hub descriptor
   7b5bce3a5128 usb: core: fix potential memory leak in error path during hcd creation
   12bfbe157d06 USB: hub: fix SS max number of ports
   cb53a4e03b2f usb: gadget: udc: renesas_usb3: lock for PN_ registers access
   dd65c0958b77 usb: gadget: udc: renesas_usb3: fix deadlock by spinlock
   723bd3b9f83f usb: gadget: udc: renesas_usb3: fix pm_runtime functions calling
   b51e4b0ac661 IB/mlx5: Fix kernel to user leak prevention logic
   dca02651cee7 iio: adc: ti_am335x_adc: allocating too much in probe
   cf308c15103e iio: proximity: as3935: recalibrate RCO after resume
   56251d138570 iio: st_pressure: Fix data sign
   a1d51f7abf71 staging: iio: tsl2x7x_core: Fix standard deviation calculation
   773fdcdc0957 staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
   ed13a9c6464b mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
   caa6f1c7bcbe x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
   ad3faea03fdf serial: sh-sci: Fix late enablement of AUTORTS
   a50aacf5de52 serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
   879d61f218a9 drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.
   5899b635ecc7 drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake
   5b754c994f38 mac80211: don't send SMPS action frame in AP mode when not needed
   3e8c503d0a16 mac80211: fix dropped counter in multiqueue RX
   6568f8f70152 mac80211: strictly check mesh address extension mode
   c8143269c9c4 mac80211: fix IBSS presp allocation size
   841e4e775bb1 mac80211: fix packet statistics for fast-RX
   f79d740f3289 mac80211: fix CSA in IBSS mode
   bd3f89002e52 usb: musb: dsps: keep VBUS on for host-only mode
   a317afc0c1ce drm/i915: Fix GVT-g PVINFO version compatibility check
   7f7bb1173db8 drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.
   f6e99a2efc03 mac80211/wpa: use constant time memory comparison for MACs
   2ec5b68bf62e mac80211: don't look at the PM bit of BAR frames
   63d34ea7042a vb2: Fix an off by one error in 'vb2_plane_vaddr'
   5d5605cc5833 cpufreq: conservative: Allow down_threshold to take values from 1 to 10
   47537bceb7b7 ila_xlat: add missing hash secret initialization
   95f47cd7d7d8 can: gs_usb: fix memory leak in gs_cmd_reset()
   a6d6282040b7 configfs: Fix race between create_link and configfs_rmdir
   222aa34e5d79 fs: pass on flags in compat_writev
   050639ef5810 Linux 4.9.33
   bdc9a03fd9ce sparc64: make string buffers large enough
   933b9b11f7ca drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.
   4f59a7a895c4 drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail
   8e1a4006ff92 s390/kvm: do not rely on the ILC on kvm host protection fauls
   a2f68276822c xtensa: don't use linux IRQ #0
   57211e84dda0 RDMA/qedr: Return max inline data in QP query result
   c5ea7aa57e24 RDMA/qedr: Don't spam dmesg if QP is in error state
   13a87589af5f RDMA/qedr: Don't reset QP when queues aren't flushed
   bbf61096e42c RDMA/qedr: Fix and simplify memory leak in PD alloc
   a4fa249385b6 RDMA/qedr: Dispatch port active event from qedr_add
   c47538f61016 netfilter: nft_log: restrict the log prefix length to 127
   fefdd79403e8 netfilter: nf_tables: fix set->nelems counting with no NLM_F_EXCL
   f68a45776a62 tipc: fix nametbl_lock soft lockup at node/link events
   1d6e36d730ed tipc: add subscription refcount to avoid invalid delete
   9f8df4f86a3f tipc: fix connection refcount error
   c7a552e771cc tipc: ignore requests when the connection state is not CONNECTED
   2552e2c11575 ARCv2: smp-boot: wake_flag polling by non-Masters needs to be uncached
   8cb6045ec40d ARC: smp-boot: Decouple Non masters waiting API from jump to entry point
   ae36f6a65af6 vhost/vsock: handle vhost_vq_init_access() error
   b13b3b706a9d kernel/watchdog: prevent false hardlockup on overloaded system
   0ce66ee6aec1 kernel/watchdog.c: move shared definitions to nmi.h
   b969a240448b kernel/watchdog.c: move hardlockup detector to separate file
   dbd9eee1aaaf userfaultfd: fix SIGBUS resulting from false rwsem wakeups
   9618fba26499 proc: add a schedule point in proc_pid_readdir()
   e23b1c05a50f frv: add missing atomic64 operations
   918684681dc2 frv: add atomic64_add_unless()
   013bbbc3e902 romfs: use different way to generate fsid for BLOCK or MTD
   093d494c6d1d mn10300: fix build error of missing fpu_save()
   5e4cafca06bf usb: musb: Fix external abort on non-linefetch for musb_irq_work()
   fb72eca1333c sctp: sctp_addr_id2transport should verify the addr before looking up assoc
   bf812fe92683 sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment
   12a583ddf02a bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status().
   66deb409251c bnxt_en: Fix RTNL lock usage on bnxt_update_link().
   e89ffe41e9a6 bnxt_en: Enhance autoneg support.
   710ea9b028de bnxt_en: Fix bnxt_reset() in the slow path task.
   cb7188295d18 net-next: ethernet: mediatek: change the compatible string
   e9ace99c4bb0 r8152: avoid start_xmit to schedule napi when napi is disabled
   c1a7106b3b01 r8152: fix rtl8152_post_reset function
   9507910ca46d r8152: re-schedule napi for tx
   4242f0bce47e r8152: check rx after napi is enabled
   993ba7ffcf6e r8152: avoid start_xmit to call napi_schedule during autosuspend
   6149abe7f404 nvmet-rdma: Fix missing dma sync to nvme data structures
   5a0d41409b4d nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
   d16268259683 ravb: unmap descriptors when freeing rings
   47c362f147aa drm/ast: Fixed system hanged if disable P2A
   bfa4d2e461da drm/nouveau: Fix drm poll_helper handling
   c94e2edacea7 drm/nouveau: Don't enabling polling twice on runtime resume
   c7a29cf6c34a drm/nouveau: Handle fbcon suspend/resume in seperate worker
   d2beb1a9dd82 drm/nouveau: Rename acpi_work to hpd_work
   ef66745a1bd2 drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
   eb846414674c gtp: add genl family modules alias
   7dddbfcd96e2 net: phy: micrel: add support for KSZ8795
   2f970b437e86 parisc, parport_gsc: Fixes for printk continuation lines
   4038524f7fef net/mlx5: Return EOPNOTSUPP when failing to get steering name-space
   b445ecbdff83 net/mlx5: E-Switch, Err when retrieving steering name-space fails
   2bcbe747629e drm/i915: Check for NULL i915_vma in intel_unpin_fb_obj()
   e6549f36278c net: adaptec: starfire: add checks for dma mapping errors
   a15bbf44ab2f pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES
   326fdffd7078 drm: Don't race connector registration
   82b6693bd415 drm: prevent double-(un)registration for connectors
   d934fe02ba17 cec: fix wrong last_la determination
   62614714e30a pinctrl: baytrail: Rectify debounce support (part 2)
   3564d41e5c84 gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page
   581e4003bf12 net/mlx4_core: Avoid command timeouts during VF driver device shutdown
   c33f1bd7f289 drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
   cf336eea809d drm/nouveau: prevent userspace from deleting client object
   16f733d8db52 ipv6: fix flow labels when the traffic class is non-0
   0542f9791246 FS-Cache: Initialise stores_lock in netfs cookie
   34f1a4626bad fscache: Clear outstanding writes when disabling a cookie
   11696dcea282 fscache: Fix dead object requeue
   f4d2d05ffb8b net: fix ndo_features_check/ndo_fix_features comment ordering
   3a6ebd3f963c net: phy: Fix PHY module checks and NULL deref in phy_attach_direct()
   ea14fabd43a5 net: phy: Fix lack of reference count on PHY driver
   2fba4f5b70f3 ethtool: do not vzalloc(0) on registers dump
   8de6ea44af5c log2: make order_base_2() behave correctly on const input value zero
   5331baaeb7e6 kasan: respect /proc/sys/kernel/traceoff_on_warning
   8936b74fd339 shmem: fix sleeping from atomic context
   3ec4141c68de jump label: pass kbuild_cflags when checking for asm goto support
   36d9659cde0d PM / runtime: Avoid false-positive warnings from might_sleep_if()
   40f6d71c0a09 ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in
   1cadd394bbf9 ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
   d536202202ee vfio/spapr_tce: Set window when adding additional groups to container
   d385ed7ad307 ipv6: addrconf: fix generation of new temporary addresses
   d7b2b380c08d net: thunderx: Fix PHY autoneg for SGMII QLM mode
   baaa84b43608 kernel/ucount.c: mark user_header with kmemleak_ignore()
   c419fe260b54 powerpc/powernv: Properly set "host-ipi" on IPIs
   47a5aabc3424 i2c: piix4: Fix request_region size
   c1a4306f24a0 i2c: piix4: Request the SMBUS semaphore inside the mutex
   7a6fcf38fabb sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
   9217eeefee15 sierra_net: Skip validating irrelevant fields for IDLE LSIs
   bed8b8627a33 net: hns: Fix the device being used for dma mapping during TX
   008798746e6e NET: mkiss: Fix panic
   ae0b63eb344e ibmvnic: Initialize completion variables before starting work
   4544ba3173b7 ibmvnic: Call napi_disable instead of napi_enable in failure path
   74e24d1ea1a4 NET: Fix /proc/net/arp for AX.25
   2557969fb4f7 gfs2: Use rhashtable walk interface in glock_hash_walk
   44bc7cae6031 tipc: Fix tipc_sk_reinit race conditions
   cb351da6f2ba ipv6: Inhibit IPv4-mapped src address on the wire.
   12ec2560d467 ipv6: Handle IPv4-mapped src to in6addr_any dst.
   116589a5a7e0 tcp: tcp_probe: use spin_lock_bh()
   a2901d01a6c7 net: xilinx_emaclite: fix receive buffer overflow
   bff3001afae7 net: xilinx_emaclite: fix freezes due to unordered I/O
   65e72723add0 ibmvnic: Fix endian error when requesting device capabilities
   b5a1aa812a16 ibmvnic: Fix endian errors in error reporting output
   d864e675c789 netfilter: nf_conntrack_sip: fix wrong memory initialisation
   220b67a16fde partitions/msdos: FreeBSD UFS2 file systems are not recognized
   7a7b2d5f65a7 drm/i915: Prevent the system suspend complete optimization
   b372d35a5226 PCI/PM: Add needs_resume flag to avoid suspend complete optimization
   05afd4c0af6a Linux 4.9.32
   3eb235a1af14 netfilter: nft_set_rbtree: handle element re-addition after deletion
   a8fc3159ee2c cpufreq: schedutil: Fix per-CPU structure initialization in sugov_start()
   afe8d4a51c76 cpufreq: schedutil: move cached_raw_freq to struct sugov_policy
   09fcb3561d9e drm/i915/vbt: split out defaults that are set when there is no VBT
   555c443a1ab9 drm/i915/vbt: don't propagate errors from intel_bios_init()
   a6a7d8ade88c usercopy: Adjust tests to deal with SMAP/PAN
   eefa5e13dff9 ARM: 8637/1: Adjust memory boundaries after reservations
   1df21f45fd55 ARM: 8636/1: Cleanup sanity_check_meminfo
   9e09d90ac5ac arm64: entry: improve data abort handling of tagged pointers
   1d61ccb5ac27 arm64: hw_breakpoint: fix watchpoint matching for tagged pointers
   791d94ef40f6 arm64: traps: fix userspace cache maintenance emulation on a tagged pointer
   d95202487334 serial: sh-sci: Fix panic when serial console and DMA are enabled
   9ff4a1a36a58 drivers: char: mem: Fix wraparound check to allow mappings up to the end
   106c77e82572 cpu/hotplug: Drop the device lock on error
   eb8fa317cb01 ASoC: Fix use-after-free at card unregistration
   82ecd2f054bd ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT
   66e982d8f1a1 ALSA: timer: Fix race between read and ioctl
   aae14f569f5d drm/nouveau/tmr: fully separate alarm execution/pending lists
   7860d0e5e2bf drm/vmwgfx: Make sure backup_handle is always valid
   a76ff847013a drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()
   64c21af51d71 drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
   3743c0e1276d perf/core: Drop kernel samples even though :u is specified
   6e6d89e18e53 powerpc/kernel: Initialize load_tm on task creation
   2cfdf4fd3292 powerpc/kernel: Fix FP and vector register restoration
   cbf687acc1e1 powerpc/hotplug-mem: Fix missing endian conversion of aa_index
   b4624ff952ec powerpc/numa: Fix percpu allocations to be NUMA aware
   bb0a300f18ce powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function
   59d9a40b5839 scsi: qla2xxx: Fix mailbox pointer error in fwdump capture
   64dc431432ec scsi: qla2xxx: Set bit 15 for DIAG_ECHO_TEST MBC
   ab2b484e8038 scsi: qla2xxx: Modify T262 FW dump template to specify same start/end to debug customer issues
   fe42472e53eb scsi: qla2xxx: don't disable a not previously enabled PCI device
   f75e09ebd3e4 KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages
   66d6448475c6 btrfs: fix memory leak in update_space_info failure path
   4d15ab90ec2b btrfs: use correct types for page indices in btrfs_page_exists_in_range
   3fd1233dabd5 cxl: Avoid double free_irq() for psl,slice interrupts
   172c70d1cd82 cxl: Fix error path on bad ioctl
   84bef90a454f ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path
   3d4922b5bb5b ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments()
   55a00f816bd7 ufs: set correct ->s_maxsize
   aed005fb7956 ufs: restore maintaining ->i_blocks
   bf7bfef3eee3 fix ufs_isblockset()
   4896c87d2464 ufs: restore proper tail allocation
   61604a2626a3 fs: add i_blocksize()
   829a1cab22c4 cpuset: consider dying css as offline
   5aa8f833ca78 Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled
   dff4c8bb1397 cgroup: Prevent kill_css() from being called more than once
   b59ec7072c84 ahci: Acer SA5-271 SSD Not Detected Fix
   b3a42bb630bd drm/msm: Expose our reservation object when exporting a dmabuf.
   974a4eb16e84 target: Re-add check to reject control WRITEs with overflow data
   96d7b43b42ba cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
   acd8f9173960 mei: make sysfs modalias format similar as uevent modalias
   716dd37398ad iio: proximity: as3935: fix iio_trigger_poll issue
   bad3b49b01aa iio: proximity: as3935: fix AS3935_INT mask
   8067c911c5e9 iio: light: ltr501 Fix interchanged als/ps register field
   e33679f994db iio: adc: bcm_iproc_adc: swap primary and secondary isr handler's
   c5a8004434f0 staging/lustre/lov: remove set_fs() call from lov_getstripe()
   5404b0c0ea85 usb: chipidea: debug: check before accessing ci_role
   59db536f5812 usb: chipidea: udc: fix NULL pointer dereference if udc_start failed
   405ac24a0aec usb: gadget: f_mass_storage: Serialize wake and sleep execution
   1308eeec2fc5 drm: Fix oops + Xserver hang when unplugging USB drm devices
   c404f0dee7a8 ext4: fix fdatasync(2) after extent manipulation operations
   2e16921d1743 ext4: fix data corruption with EXT4_GET_BLOCKS_ZERO
   9890b9cb75c9 ext4: keep existing extra fields when inode expands
   9850844e0a0e ext4: fix SEEK_HOLE
   9636c086532b xen/privcmd: Support correctly 64KB page granularity when mapping memory
   08229c119c42 cfq-iosched: fix the delay of cfq_group's vdisktime under iops mode
   1f67d28d2707 dmaengine: mv_xor_v2: set DMA mask to 40 bits
   eb5afaba6177 dmaengine: mv_xor_v2: remove interrupt coalescing
   b2c8bb06bc83 dmaengine: mv_xor_v2: fix tx_submit() implementation
   0d0918504a96 dmaengine: mv_xor_v2: enable XOR engine after its configuration
   e2a092eab8a5 dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx
   67b1684c4a5e dmaengine: mv_xor_v2: properly handle wrapping in the array of HW descriptors
   f08c84d4c745 dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly
   f2e9d10bf1a2 dmaengine: ep93xx: Don't drain the transfers in terminate_all()
   b7e7a4d52a95 dmaengine: ep93xx: Always start from BASE0
   cd0ef520aa70 dmaengine: usb-dmac: Fix DMAOR AE bit definition
   3e7a76b290f1 KVM: arm/arm64: vgic-v2: Do not use Active+Pending state for a HW interrupt
   2a5c08a4d3fe KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt
   81555e45852a KVM: async_pf: avoid async pf injection when in guest mode
   85c19308cb37 arm: KVM: Allow unaligned accesses at HYP
   8abce1e49c82 arm64: KVM: Allow unaligned accesses at EL2
   b9824dd75fcf arm64: KVM: Preserve RES1 bits in SCTLR_EL2
   19c9a115085e KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation
   78f87ce2a17f kvm: async_pf: fix rcu_irq_enter() with irqs enabled
   4809f0e56d98 efi: Don't issue error message when booted under Xen
   e273ed246617 nfsd: Fix up the "supattr_exclcreat" attributes
   bfeac838043f nfsd4: fix null dereference on replay
   34bae9b3ba98 drm/amdgpu/ci: disable mclk switching for high refresh rates (v2)
   d4783eb9f082 crypto: gcm - wait for crypto op not signal safe
   2d0280070e6c crypto: drbg - wait for crypto op not signal safe
   d24c1c1977d8 KEYS: encrypted: avoid encrypting/decrypting stack buffers
   24369761029a KEYS: fix freeing uninitialized memory in key_update()
   1b253e023f8f KEYS: fix dereferencing NULL payload with nonzero length
   0e479742e8d1 crypto: asymmetric_keys - handle EBUSY due to backlog correctly
   7c24a70c70b7 ptrace: Properly initialize ptracer_cred on fork
   3802abc6e0df serial: ifx6x60: fix use-after-free on module unload
   04ac452dadbf arch/sparc: support NR_CPUS = 4096
   433a50e681df sparc64: delete old wrap code
   b6bb22de0c9e sparc64: new context wrap
   975f3cdc3915 sparc64: add per-cpu mm of secondary contexts
   7932bfad0e82 sparc64: redefine first version
   65e3443b61a8 sparc64: combine activate_mm and switch_mm
   e7590a1b15c8 sparc64: reset mm cpumask after wrap
   b3ad7a3e57b3 sparc: Machine description indices can vary
   8d665e039e66 sparc64: mm: fix copy_tsb to correctly copy huge page TSBs
   4b684e6474d0 sparc64: Add __multi3 for gcc 7.x and later.
   0255284edddc net: bridge: start hello timer only if device is up
   3dd4daf112fd net: stmmac: fix completely hung TX when using TSO
   a83564d12863 net: ethoc: enable NAPI before poll may be scheduled
   a97f807363d4 net/ipv6: Fix CALIPSO causing GPF with datagram support
   0aa89f1b07de net: ping: do not abuse udp_poll()
   599a4478d8cb ipv6: Fix leak in ipv6_gso_segment().
   c242e1a8140e vxlan: fix use-after-free on deletion
   3ee35b96825e tcp: disallow cwnd undo when switching congestion control
   61c92d5a533c cxgb4: avoid enabling napi twice to the same queue
   abbcb731d69c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
   b5e9b7ad0dd4 vxlan: eliminate cached dst leak
   96d145216b58 bnx2x: Fix Multi-Cos

(From OE-Core rev: d9d950bd48566e5a2e92ad4a2fd943ad828fb8df)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Bruce Ashfield
54047f4ec2 linux-yocto/4.4: update to v4.4.76
Integrating the -stable commit with the following changes:

   4282d39575bf Linux 4.4.76
   be8c39b47061 KVM: nVMX: Fix exception injection
   77d977dd78b3 KVM: x86: zero base3 of unusable segments
   3b1609f6c436 KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
   b9b3eb5c774e KVM: x86: fix emulation of RSM and IRET instructions
   3491a0b59fcd cpufreq: s3c2416: double free on driver init error path
   aad7041e721e iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
   48952c6d517a iommu: Handle default domain attach failure
   3de9630abe3b iommu/vt-d: Don't over-free page table directories
   404ef3b4bf62 ocfs2: o2hb: revert hb threshold to keep compatible
   5d650fcef901 x86/mm: Fix flush_tlb_page() on Xen
   6fb3b322307e x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
   7cd8c4903171 ARM: 8685/1: ensure memblock-limit is pmd-aligned
   d4960d58158b ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation
   6ca11db55f62 sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting
   f6115ec09225 watchdog: bcm281xx: Fix use of uninitialized spinlock.
   f99737ce2e56 xfrm: Oops on error in pfkey_msg2xfrm_state()
   ac78351c96e8 xfrm: NULL dereference on allocation failure
   398ac7a19f17 xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
   736b342cc9b4 jump label: fix passing kbuild_cflags when checking for asm goto support
   53ae0c2ffef7 ravb: Fix use-after-free on `ifconfig eth0 down`
   db1323b77c2b sctp: check af before verify address in sctp_addr_id2transport
   d521e9c384f9 net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
   9837392c2b3e perf probe: Fix to show correct locations for events on modules
   0593fa8f34a2 be2net: fix status check in be_cmd_pmac_add()
   5416a88c2fef s390/ctl_reg: make __ctl_load a full memory barrier
   9a536d587246 swiotlb: ensure that page-sized mappings are page-aligned
   878f37efac3e coredump: Ensure proper size of sparse core files
   c20bdc08af9b x86/mpx: Use compatible types in comparison to fix sparse error
   14339b018bc2 mac80211: initialize SMPS field in HT capabilities
   11dd9e2c4803 spi: davinci: use dma_mapping_error()
   be91b09750bf scsi: lpfc: avoid double free of resource identifiers
   4ac60b20f703 HID: i2c-hid: Add sleep between POWER ON and RESET
   70f41003b9d1 kernel/panic.c: add missing \n
   e4272ebefc83 ibmveth: Add a proper check for the availability of the checksum features
   8fa301abb31a vxlan: do not age static remote mac entries
   00e83abf8e62 virtio_net: fix PAGE_SIZE > 64k
   c64f4194a65b vfio/spapr: fail tce_iommu_attach_group() when iommu_data is null
   d3be5e0471ab drm/amdgpu: check ring being ready before using
   58a766c460b1 net: dsa: Check return value of phy_connect_direct()
   3d2cbbcbde3d amd-xgbe: Check xgbe_init() return code
   dac30e3dbd72 platform/x86: ideapad-laptop: handle ACPI event 1
   666c821b0ae3 scsi: virtio_scsi: Reject commands when virtqueue is broken
   230fe9c7d814 xen-netfront: Fix Rx stall during network stress and OOM
   8df98ff6c394 swiotlb-xen: update dev_addr after swapping pages
   23c7f01691a1 virtio_console: fix a crash in config_work_handler
   6e1116a0b3e2 Btrfs: fix truncate down when no_holes feature is enabled
   961efcd54e5b gianfar: Do not reuse pages from emergency reserve
   477a2359c881 powerpc/eeh: Enable IO path on permanent error
   e1db592de735 net: bgmac: Remove superflous netif_carrier_on()
   e66647f0e1ff net: bgmac: Start transmit queue in bgmac_open
   f01babed64e6 net: bgmac: Fix SOF bit checking
   992048f8ae84 bgmac: Fix reversed test of build_skb() return value.
   ebfa83ab5a53 mtd: bcm47xxpart: don't fail because of bit-flips
   1124701061d8 bgmac: fix a missing check for build_skb
   11e4bb957f1a mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only
   e025a30dd8b0 MIPS: ralink: fix MT7628 wled_an pinmux gpio
   cd1fe5c31e91 MIPS: ralink: fix MT7628 pinmux typos
   c9336bbdd924 MIPS: ralink: Fix invalid assignment of SoC type
   ad310161f513 MIPS: ralink: fix USB frequency scaling
   9a23a35a4fc6 MIPS: ralink: MT7688 pinmux fixes
   e1688f1677e6 net: korina: Fix NAPI versus resources freeing
   ef0cb4c9d496 MIPS: ath79: fix regression in PCI window initialization
   753be27f77eb net: mvneta: Fix for_each_present_cpu usage
   0012ba253767 ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
   50e18570d8ea qla2xxx: Fix erroneous invalid handle message
   8c721e38055a scsi: lpfc: Set elsiocb contexts to NULL after freeing it
   5c982bac211c scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
   b92f9f6a2c09 KVM: x86: fix fixing of hypercalls
   cdbf92675fad mm: numa: avoid waiting on freed migrated pages
   21d7c733251a block: fix module reference leak on put_disk() call for cgroups throttle
   2449a71eb982 sysctl: enable strict writes
   1e0f216195a6 usb: gadget: f_fs: Fix possibe deadlock
   04686ab28a35 drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
   c70e2006d06a ALSA: hda - set input_path bitmap to zero after moving it to new place
   11327be3570e ALSA: hda - Fix endless loop of codec configure
   db60a2ec9acc MIPS: Fix IRQ tracing & lockdep when rescheduling
   93206654a0b2 MIPS: pm-cps: Drop manual cache-line alignment of ready_count
   cb611ead80a2 MIPS: Avoid accidental raw backtrace
   74de12dbfa7c mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()
   a9e5044b6804 drm/ast: Handle configuration without P2A bridge
   542442710021 NFSv4: fix a reference leak caused WARNING messages
   e052be55a598 netfilter: synproxy: fix conntrackd interaction
   234e649840d1 netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
   095a41128cb6 rtnetlink: add IFLA_GROUP to ifla_policy
   640a09c64ec6 ipv6: Do not leak throw route references
   9de17701a3bc sfc: provide dummy definitions of vswitch functions
   1f8bb6053249 net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
   f50f2e0cb1a3 decnet: always not take dst->__refcnt when inserting dst into hash table
   93911697a9f2 net/mlx5: Wait for FW readiness before initializing command interface
   0d1effe95ebe ipv6: fix calling in6_ifa_hold incorrectly for dad work
   4feb6121aa5e igmp: add a missing spin_lock_init()
   ee8d5f9fd17e igmp: acquire pmc lock for ip_mc_clear_src()
   7de53eed6fda net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
   030a77d2f904 Fix an intermittent pr_emerg warning about lo becoming free.
   0fc0fad07722 af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
   e2c3ee003280 net: Zero ifla_vf_info in rtnl_fill_vfinfo()
   dedb088a1d18 decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
   e79948e2d90b net: don't call strlen on non-terminated string in dev_set_alias()
   d68a4e380ff5 ipv6: release dst on error in ip6_dst_lookup_tail
   6ee496d7218a Linux 4.4.75
   cb7be08dee4e nvme: apply DELAY_BEFORE_CHK_RDY quirk at probe time too
   bddc80274a12 nvme/quirk: Add a delay before checking for adapter readiness
   e5f87c733842 net: phy: fix marvell phy status reading
   9b54821d5184 net: phy: Initialize mdio clock at probe function
   889caad4fbe4 usb: gadget: f_fs: avoid out of bounds access on comp_desc
   db7130d63fd8 powerpc/slb: Force a full SLB flush when we insert for a bad EA
   8fcb215c5426 mtd: spi-nor: fix spansion quad enable
   7dfea167fc1d of: Add check to of_scan_flat_dt() before accessing initial_boot_params
   eab38dfd66d7 rxrpc: Fix several cases where a padded len isn't checked in ticket decode
   800d7454e50f USB: usbip: fix nonconforming hub descriptor
   525e496a9722 drm/amdgpu: adjust default display clock
   526527847355 drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
   4f3d0f468552 drm/radeon: add a quirk for Toshiba Satellite L20-183
   f8242fa8119b drm/radeon: add a PX quirk for another K53TK variant
   fe8003da6113 iscsi-target: Reject immediate data underflow larger than SCSI transfer length
   d374be75f4c7 target: Fix kref->refcount underflow in transport_cmd_finish_abort
   1fecf3977def time: Fix clock->read(clock) race around clocksource changes
   255ad85b5ecc Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
   3ee9033e228d powerpc/kprobes: Pause function_graph tracing during jprobes handling
   bc7b3e9984a8 signal: Only reschedule timers on signals timers have sent
   005253ffe4ad HID: Add quirk for Dell PIXART OEM mouse
   63ba840a53d6 CIFS: Improve readdir verbosity
   824b9506e4f2 KVM: PPC: Book3S HV: Preserve userspace HTM state properly
   7b88f761929e lib/cmdline.c: fix get_options() overflow while parsing ranges
   b95aa98e77d7 autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
   1d3d0f8b7cf7 fs/exec.c: account for argv/envp pointers
   22da7ca81a3a Linux 4.4.74
   1f2284fac218 mm: fix new crash in unmapped_area_topdown()
   f41512c6acb7 Allow stack to grow up to address space limit
   4b359430674c mm: larger stack guard gap, between vmas
   26605a06dd92 alarmtimer: Rate limit periodic intervals
   c24159adf222 MIPS: Fix bnezc/jialc return address calculation
   94695386c79c usb: dwc3: exynos fix axius clock error path to do cleanup
   aac7fa215e8f alarmtimer: Prevent overflow of relative timers
   4d4d501cd707 genirq: Release resources in __setup_irq() error path
   6af90091b610 swap: cond_resched in swap_cgroup_prepare()
   bfbd244c5f18 mm/memory-failure.c: use compound_head() flags for huge pages
   f5dc61753d0e USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
   89c15994a06d usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
   5efd37fe7218 drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
   ab29b21a47ae usb: r8a66597-hcd: decrease timeout
   4c7a6dd205cc usb: r8a66597-hcd: select a different endpoint on timeout
   42c8b4b5fdca USB: gadget: dummy_hcd: fix hub-descriptor removable fields
   dc6ecba3f6c1 pvrusb2: reduce stack usage pvr2_eeprom_analyze()
   e33e866d1593 usb: core: fix potential memory leak in error path during hcd creation
   ec443ee0c2aa USB: hub: fix SS max number of ports
   7e2ad8b207f2 iio: proximity: as3935: recalibrate RCO after resume
   0c967139e832 staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
   e59d91144545 mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
   93d022e25642 x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
   c79aab7007d8 serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
   daebcf9871eb mac80211: fix IBSS presp allocation size
   bb8428f4c954 mac80211: fix CSA in IBSS mode
   5f1f39023c2a mac80211/wpa: use constant time memory comparison for MACs
   156f00663af6 mac80211: don't look at the PM bit of BAR frames
   a8686c968fe3 vb2: Fix an off by one error in 'vb2_plane_vaddr'
   fa90f02d511d cpufreq: conservative: Allow down_threshold to take values from 1 to 10
   58ab7a86cdc2 can: gs_usb: fix memory leak in gs_cmd_reset()
   0ad134d81c07 configfs: Fix race between create_link and configfs_rmdir
   1bd30958ec55 Linux 4.4.73
   39e84dcd7876 sparc64: make string buffers large enough
   d80aa84235ff s390/kvm: do not rely on the ILC on kvm host protection fauls
   afb415f72daa xtensa: don't use linux IRQ #0
   8b1aa2679812 tipc: ignore requests when the connection state is not CONNECTED
   77d2b8dc9597 proc: add a schedule point in proc_pid_readdir()
   202776694c2a romfs: use different way to generate fsid for BLOCK or MTD
   50ef0e2e9abe sctp: sctp_addr_id2transport should verify the addr before looking up assoc
   70752628521d r8152: avoid start_xmit to schedule napi when napi is disabled
   5270bf63719c r8152: fix rtl8152_post_reset function
   a4877e5564a5 r8152: re-schedule napi for tx
   10bfb4c76c94 nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
   82ce18b09bf1 ravb: unmap descriptors when freeing rings
   3987a40362b7 drm/ast: Fixed system hanged if disable P2A
   ff20cc9a6086 drm/nouveau: Don't enabling polling twice on runtime resume
   711f4797a339 parisc, parport_gsc: Fixes for printk continuation lines
   9343894a8b3d net: adaptec: starfire: add checks for dma mapping errors
   3926d04ddec2 pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES
   6e3ea31dfb01 gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page
   2b9f84ef46d8 net/mlx4_core: Avoid command timeouts during VF driver device shutdown
   6f0a81edb918 drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
   9c7a11e6f994 drm/nouveau: prevent userspace from deleting client object
   1507ea6df42e ipv6: fix flow labels when the traffic class is non-0
   95a4659ee8d0 FS-Cache: Initialise stores_lock in netfs cookie
   38481d7d43dd fscache: Clear outstanding writes when disabling a cookie
   b421d230dfa1 fscache: Fix dead object requeue
   e6b15f0fc7a6 ethtool: do not vzalloc(0) on registers dump
   980660760aa7 log2: make order_base_2() behave correctly on const input value zero
   55d0f89a1a0c kasan: respect /proc/sys/kernel/traceoff_on_warning
   1948d0afe43e jump label: pass kbuild_cflags when checking for asm goto support
   266e02bc69a2 PM / runtime: Avoid false-positive warnings from might_sleep_if()
   8d228758f90f ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
   ee0cd47799dd i2c: piix4: Fix request_region size
   68cac0741246 sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
   d95ffdd39566 sierra_net: Skip validating irrelevant fields for IDLE LSIs
   716cca0a67ec net: hns: Fix the device being used for dma mapping during TX
   aacf9de1e239 NET: mkiss: Fix panic
   b9e9045d5e6b NET: Fix /proc/net/arp for AX.25
   23287661af3e ipv6: Inhibit IPv4-mapped src address on the wire.
   8faccb2b9442 ipv6: Handle IPv4-mapped src to in6addr_any dst.
   10a762977267 net: xilinx_emaclite: fix receive buffer overflow
   7f71f22a116f net: xilinx_emaclite: fix freezes due to unordered I/O
   2ba464a4b748 Call echo service immediately after socket reconnect
   691fe5610d58 staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
   3fc4d70453ee ARM: dts: imx6dl: Fix the VDD_ARM_CAP voltage for 396MHz operation
   b28c21baf28a partitions/msdos: FreeBSD UFS2 file systems are not recognized
   0fb2a1fe6155 s390/vmem: fix identity mapping
   30c9187fa8ed Linux 4.4.72
   4e528eb9160b arm64: ensure extension of smp_store_release value
   01ce16f40c97 arm64: armv8_deprecated: ensure extension of addr
   51ff10e72fc2 usercopy: Adjust tests to deal with SMAP/PAN
   746d48934f51 RDMA/qib,hfi1: Fix MR reference count leak on write with immediate
   3ccf69562ac2 arm64: entry: improve data abort handling of tagged pointers
   4eaef3651815 arm64: hw_breakpoint: fix watchpoint matching for tagged pointers
   bc5f31d34eab Make __xfs_xattr_put_listen preperly report errors.
   e8a1086ae191 NFSv4: Don't perform cached access checks before we've OPENed the file
   533020828366 NFS: Ensure we revalidate attributes before using execute_ok()
   cb1fb15c8355 mm: consider memblock reservations for deferred memory initialization sizing
   52d8b8ad2b4b net: better skb->sender_cpu and skb->napi_id cohabitation
   3c0fcb52674a serial: sh-sci: Fix panic when serial console and DMA are enabled
   cc04a1433843 tty: Drop krefs for interrupted tty lock
   983c09ebdbc2 drivers: char: mem: Fix wraparound check to allow mappings up to the end
   9a9388953bdc ASoC: Fix use-after-free at card unregistration
   54d12fbf54d4 ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT
   f5bc918760c8 ALSA: timer: Fix race between read and ioctl
   5dffc1be6552 drm/nouveau/tmr: fully separate alarm execution/pending lists
   74276868b455 drm/vmwgfx: Make sure backup_handle is always valid
   619cc02fd85d drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()
   e4c05b3a751a drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
   e582b82c160a perf/core: Drop kernel samples even though :u is specified
   1cfe1e9da629 powerpc/hotplug-mem: Fix missing endian conversion of aa_index
   8c92870bdbf2 powerpc/numa: Fix percpu allocations to be NUMA aware
   fc7fb9430d70 powerpc/eeh: Avoid use after free in eeh_handle_special_event()
   93d03807f395 scsi: qla2xxx: don't disable a not previously enabled PCI device
   f267b064a6e9 KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages
   5c7955c8726c btrfs: fix memory leak in update_space_info failure path
   cc8c67cadc27 btrfs: use correct types for page indices in btrfs_page_exists_in_range
   8fe4345d6a1d cxl: Fix error path on bad ioctl
   f0d2e153147e ufs_getfrag_block(): we only grab ->truncate_mutex on block creation path
   34aa71cbd408 ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments()
   d6bd1e7ec7d8 ufs: set correct ->s_maxsize
   4c516dff07d7 ufs: restore maintaining ->i_blocks
   1df45bb64396 fix ufs_isblockset()
   db9aafaf90b6 ufs: restore proper tail allocation
   044470266a50 fs: add i_blocksize()
   c8acec90d9dd cpuset: consider dying css as offline
   fff08d245263 Input: elantech - add Fujitsu Lifebook E546/E557 to force crc_enabled
   ba9fe2e8072f drm/msm: Expose our reservation object when exporting a dmabuf.
   934d0a9f9c65 target: Re-add check to reject control WRITEs with overflow data
   94d3dafe96f3 cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
   2ff1edbbb29b stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms
   1025503bcee9 random: properly align get_random_int_hash
   baae8c3c2e2a drivers: char: random: add get_random_long()
   ff7739a28719 iio: proximity: as3935: fix AS3935_INT mask
   64276cdbd418 iio: light: ltr501 Fix interchanged als/ps register field
   a365c707d2ee staging/lustre/lov: remove set_fs() call from lov_getstripe()
   bd2e8f0a72c5 usb: chipidea: debug: check before accessing ci_role
   942dcb0ffa9d usb: chipidea: udc: fix NULL pointer dereference if udc_start failed
   6ff96a61bb20 usb: gadget: f_mass_storage: Serialize wake and sleep execution
   daa1357ff346 ext4: fix fdatasync(2) after extent manipulation operations
   7b9694cb7bf2 ext4: keep existing extra fields when inode expands
   08dc390b2745 ext4: fix SEEK_HOLE
   e9560c2df474 xen-netfront: cast grant table reference first to type int
   17a58bdf3d63 xen-netfront: do not cast grant table reference to signed short
   4467b3a14557 xen/privcmd: Support correctly 64KB page granularity when mapping memory
   3340c0e11086 dmaengine: ep93xx: Always start from BASE0
   3ff231a0d399 dmaengine: usb-dmac: Fix DMAOR AE bit definition
   445d08a6be93 KVM: async_pf: avoid async pf injection when in guest mode
   7b69d79732eb arm: KVM: Allow unaligned accesses at HYP
   c7740cbcc2c4 KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation
   a8bbdf1921fd kvm: async_pf: fix rcu_irq_enter() with irqs enabled
   e21ad4a956d4 nfsd: Fix up the "supattr_exclcreat" attributes
   6a9b72248814 nfsd4: fix null dereference on replay
   1f6791d4f208 drm/amdgpu/ci: disable mclk switching for high refresh rates (v2)
   a3a3a1cf538c crypto: gcm - wait for crypto op not signal safe
   8096a6748a92 KEYS: fix freeing uninitialized memory in key_update()
   bc6be3433e69 KEYS: fix dereferencing NULL payload with nonzero length
   c94bea2e4bf5 ptrace: Properly initialize ptracer_cred on fork
   dd6a4b53d026 serial: ifx6x60: fix use-after-free on module unload
   7816928f3435 arch/sparc: support NR_CPUS = 4096
   8554f96c1656 sparc64: delete old wrap code
   c9215ca71390 sparc64: new context wrap
   3e557fd99a22 sparc64: add per-cpu mm of secondary contexts
   7e5551fbb864 sparc64: redefine first version
   e72963317bf1 sparc64: combine activate_mm and switch_mm
   4c0cae481fae sparc64: reset mm cpumask after wrap
   7047c2009be9 sparc: Machine description indices can vary
   54e23c087f36 sparc64: mm: fix copy_tsb to correctly copy huge page TSBs
   0774a35802e9 net: bridge: start hello timer only if device is up
   9cbc6cbd9170 net: ethoc: enable NAPI before poll may be scheduled
   45202cd2199c net: ping: do not abuse udp_poll()
   406752726afc ipv6: Fix leak in ipv6_gso_segment().
   92d88e8a7adc vxlan: fix use-after-free on deletion
   f4c645f67e72 tcp: disallow cwnd undo when switching congestion control
   03994b4b858f cxgb4: avoid enabling napi twice to the same queue
   491809d0f8d8 ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
   d02f4c962d35 bnx2x: Fix Multi-Cos

(From OE-Core rev: ab2721fca72ed28f865b1ee3b7e33d9d09515d87)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Bruce Ashfield
9641c64434 linux-yocto/4.1: update to v4.1.42
Integrating the korg -stable update that comprises the following
commits:

   2ac51e21d8c5 Linux 4.1.42
   dcda279dede7 mm: fix new crash in unmapped_area_topdown()
   8b18c6b2a0dd mm: larger stack guard gap, between vmas
   55e6060ddd5f alarmtimer: Rate limit periodic intervals
   cedbfb3dc38c MIPS: Fix bnezc/jialc return address calculation
   d490b0caf87f usb: dwc3: exynos fix axius clock error path to do cleanup
   61e04a644bd8 genirq: Release resources in __setup_irq() error path
   ec8376b633c9 swap: cond_resched in swap_cgroup_prepare()
   331720703ebb mm/memory-failure.c: use compound_head() flags for huge pages
   e28840566853 USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
   7ed474c302c1 usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
   235efbf2e58c drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
   d5db08763ef2 usb: r8a66597-hcd: decrease timeout
   152c8dcf311c usb: r8a66597-hcd: select a different endpoint on timeout
   08e1f9869489 USB: gadget: dummy_hcd: fix hub-descriptor removable fields
   0758e6a95a00 [media] pvrusb2: reduce stack usage pvr2_eeprom_analyze()
   bdc69cc86e01 usb: core: fix potential memory leak in error path during hcd creation
   11f00c7e1194 USB: hub: fix SS max number of ports
   e507356624f1 iio: proximity: as3935: recalibrate RCO after resume
   fe9474901810 staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
   94bfe4f31f46 mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
   49919278f4ce x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
   daccc774edf2 serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
   394dc0f7c2ae mac80211: don't send SMPS action frame in AP mode when not needed
   8373afb6cb12 mac80211: fix IBSS presp allocation size
   26e7f9d274cf mac80211: fix CSA in IBSS mode
   5125e4a41299 mac80211/wpa: use constant time memory comparison for MACs
   1a8dacfbbbe7 mac80211: don't look at the PM bit of BAR frames
   61df07cce8eb [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'
   6ea9210c046f can: gs_usb: fix memory leak in gs_cmd_reset()
   d30248c41364 configfs: Fix race between create_link and configfs_rmdir
   9307fb9f34e1 sparc64: make string buffers large enough
   b865f707d7c6 xtensa: don't use linux IRQ #0
   ddda59580e10 tipc: ignore requests when the connection state is not CONNECTED
   1b98bab153c7 proc: add a schedule point in proc_pid_readdir()
   a20b7cab8735 romfs: use different way to generate fsid for BLOCK or MTD
   3e335922279b mn10300: fix build error of missing fpu_save()
   86e9b2ee9cc6 sctp: sctp_addr_id2transport should verify the addr before looking up assoc
   5fbc861ad7eb r8152: re-schedule napi for tx
   41e0083c7ddb drm/ast: Fixed system hanged if disable P2A
   9b50bb2bc343 drm/nouveau: Don't enabling polling twice on runtime resume
   c29b8f7d2d1e parisc, parport_gsc: Fixes for printk continuation lines
   8cc579971086 net: adaptec: starfire: add checks for dma mapping errors
   6d43352435ba net/mlx4_core: Avoid command timeouts during VF driver device shutdown
   295a19f594e8 drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
   510c29634e35 fscache: Clear outstanding writes when disabling a cookie
   42c32ac3cec6 ethtool: do not vzalloc(0) on registers dump
   eaabe4b74095 log2: make order_base_2() behave correctly on const input value zero
   8bc30cf03ca1 kasan: respect /proc/sys/kernel/traceoff_on_warning
   acd666657821 jump label: pass kbuild_cflags when checking for asm goto support
   cb2098ab876e PM / runtime: Avoid false-positive warnings from might_sleep_if()
   d3121ad14562 ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in
   4c8eb6278488 ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
   0def8e45d25f sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
   0c2950fa861d sierra_net: Skip validating irrelevant fields for IDLE LSIs
   a9cbb7cd1868 NET: mkiss: Fix panic
   d914dc3b811d NET: Fix /proc/net/arp for AX.25
   68978d69ea6f ipv6: Inhibit IPv4-mapped src address on the wire.
   197082364320 ipv6: Handle IPv4-mapped src to in6addr_any dst.
   dd4d061cf1f6 net: xilinx_emaclite: fix receive buffer overflow
   742e7978eaba net: xilinx_emaclite: fix freezes due to unordered I/O
   afae1d9da32e partitions/msdos: FreeBSD UFS2 file systems are not recognized
   7f6abe4c0560 PCI/PM: Add needs_resume flag to avoid suspend complete optimization
   cd1c4f855f68 usercopy: Adjust tests to deal with SMAP/PAN
   9da808668b58 arm64: entry: improve data abort handling of tagged pointers
   47e49f2d1eda drivers: char: mem: Fix wraparound check to allow mappings up to the end
   bb3556c1d155 ASoC: Fix use-after-free at card unregistration
   88c41586db86 ALSA: timer: Fix missing queue indices reset at SNDRV_TIMER_IOCTL_SELECT
   5d28ba6eecde ALSA: timer: Fix race between read and ioctl
   29837be8e922 drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()
   d6f90404eaa0 perf/core: Drop kernel samples even though :u is specified
   f44556278b79 powerpc/hotplug-mem: Fix missing endian conversion of aa_index
   7ee9689e6b68 powerpc/numa: Fix percpu allocations to be NUMA aware
   eecbbd835e2e scsi: qla2xxx: don't disable a not previously enabled PCI device
   4a213a0fe0b3 KVM: arm/arm64: Handle possible NULL stage2 pud when ageing pages
   951269f95603 btrfs: fix memory leak in update_space_info failure path
   d42014c8d4ce btrfs: use correct types for page indices in btrfs_page_exists_in_range
   cc558c203ce1 cxl: Fix error path on bad ioctl
   c58e11d1da35 ufs: set correct ->s_maxsize
   7ba100d53ebc fix ufs_isblockset()
   7f8053503ed2 cpuset: consider dying css as offline
   51037ec2ee8e iio: proximity: as3935: fix AS3935_INT mask
   60e9d774dc8e staging/lustre/lov: remove set_fs() call from lov_getstripe()
   6f4f7e81b18e usb: chipidea: debug: check before accessing ci_role
   9738b3df00b1 usb: chipidea: udc: fix NULL pointer dereference if udc_start failed
   db87e41d61aa usb: gadget: f_mass_storage: Serialize wake and sleep execution
   926295793364 ext4: keep existing extra fields when inode expands
   4d1adc2ada19 ext4: fix SEEK_HOLE
   8406f302e985 KVM: async_pf: avoid async pf injection when in guest mode
   fdb67b2a3a16 arm: KVM: Allow unaligned accesses at HYP
   1e8dabb6aa14 KVM: cpuid: Fix read/write out-of-bounds vulnerability in cpuid emulation
   702eb8d270f2 kvm: async_pf: fix rcu_irq_enter() with irqs enabled
   4b1bf4b008ca nfsd4: fix null dereference on replay
   026ed759f4f4 crypto: gcm - wait for crypto op not signal safe
   e02ed52dd2d3 KEYS: fix freeing uninitialized memory in key_update()
   a38f69cb4a22 ptrace: Properly initialize ptracer_cred on fork
   94d53c5028a3 arch/sparc: support NR_CPUS = 4096
   252bf31f5d91 sparc64: delete old wrap code
   0837a0481106 sparc64: new context wrap
   169dc5fd241d sparc64: add per-cpu mm of secondary contexts
   ccadb4e680e9 sparc64: redefine first version
   5203c6c92724 sparc64: combine activate_mm and switch_mm
   317a444875fd sparc64: reset mm cpumask after wrap
   a2334e23c296 sparc: Machine description indices can vary
   8ee93884863e sparc64: mm: fix copy_tsb to correctly copy huge page TSBs
   246fa51013e3 net: ethoc: enable NAPI before poll may be scheduled
   169a7e245c7f net: ping: do not abuse udp_poll()
   59dc08f8f5e7 ipv6: Fix leak in ipv6_gso_segment().
   f257e5d318a5 tcp: disallow cwnd undo when switching congestion control
   fa95ca65fb86 cxgb4: avoid enabling napi twice to the same queue
   cd276bb4fe54 ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
   e616f6da095e bnx2x: Fix Multi-Cos
   d600ccd7fd21 xfs: fix unaligned access in xfs_btree_visit_blocks
   20d07bb1567a xfs: bad assertion for delalloc an extent that start at i_size
   45ed7e2f2f82 xfs: fix indlen accounting error on partial delalloc conversion
   1a229fd5ae97 xfs: wait on new inodes during quotaoff dquot release
   b822f03516c9 xfs: update ag iterator to support wait on new inodes
   821afaaed81d xfs: support ability to wait on new inodes
   9b1260c216af xfs: fix up quotacheck buffer list error handling
   022e9b0e554b xfs: prevent multi-fsb dir readahead from reading random blocks
   641967d1f903 xfs: handle array index overrun in xfs_dir2_leaf_readbuf()
   17d031b4add7 xfs: fix over-copying of getbmap parameters from userspace
   74d27999c51e xfs: use dedicated log worker wq to avoid deadlock with cil wq
   ddf2f45b3344 xfs: fix kernel memory exposure problems
   9bf638a08ad2 mm/migrate: fix refcount handling when !hugepage_migration_supported()
   c7dbf874d6b5 drm/radeon/ci: disable mclk switching for high refresh rates (v2)
   9fcaaa87e08c fs/ufs: Set UFS default maximum bytes per file
   b36188f229d6 sparc: Fix -Wstringop-overflow warning
   80f68f7daeb3 sctp: fix ICMP processing if skb is non-linear
   01426eb3503d tcp: avoid fastopen API to be used on AF_UNSPEC
   a10f1d6ad744 virtio-net: enable TSO/checksum offloads for Q-in-Q vlans
   a05aec67cd6b be2net: Fix offload features for Q-in-Q packets
   b7b05a3b40e8 vlan: Fix tcp checksum offloads in Q-in-Q vlans
   d78ddec4e7fb ipv6: fix out of bound writes in __ip6_append_data()
   acf388f77791 qmi_wwan: add another Lenovo EM74xx device ID
   7144c12e891d ipv6: Check ip6_find_1stfragopt() return value properly.
   e7f05ff30b0c ipv6: Prevent overrun when parsing v6 header options
   3e674773cb5e tcp: eliminate negative reordering in tcp_clean_rtx_queue
   e7b4f3d39f46 sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
   61d62ee79cec tcp: avoid fragmenting peculiar skbs in SACK
   93dcd4929d18 net: fix compile error in skb_orphan_partial()
   7a230cfdf208 netem: fix skb_orphan_partial()
   8404b686a33c s390/qeth: avoid null pointer dereference on OSN
   89b9ca1dd7d0 s390/qeth: unbreak OSM and OSN support
   0b651772fed7 s390/qeth: handle sysfs error during initialization
   4e0ecb773276 dccp/tcp: do not inherit mc_list from parent
   4bd4cfc5210e Linux 4.1.41
   c1dd3f51ad77 mm/huge_memory.c: respect FOLL_FORCE/FOLL_COW for thp
   afeb39160249 xc2028: Fix use-after-free bug properly
   5eef36af5974 iio: proximity: as3935: fix as3935_write
   e8701e0f6768 ipx: call ipxitf_put() in ioctl error path
   709dcf11a353 sched/fair: Initialize throttle_count for new task-groups lazily
   0f665ed5581f sched/fair: Do not announce throttled next buddy in dequeue_task_fair()
   953334de0819 iio: dac: ad7303: fix channel description
   60e2e499e37d mwifiex: pcie: fix cmd_buf use-after-free in remove/reset
   036ab4111761 rtlwifi: rtl8821ae: setup 8812ae RFE according to device type
   df8198865a0f ARM: tegra: paz00: Mark panel regulator as enabled on boot
   fda7c899dd76 fs/xattr.c: zero out memory copied to userspace in getxattr
   273225634fef vfio/type1: Remove locked page accounting workqueue
   358fa411ba9a crypto: algif_aead - Require setkey before accept(2)
   e0b7d5eae185 staging: gdm724x: gdm_mux: fix use-after-free on module unload
   47655216cdf4 drm/ttm: fix use-after-free races in vm fault handling
   46527f8d11fa f2fs: sanity check segment count
   2b674f4ecce8 ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
   4aaeda7f5c4f ipv6: initialize route null entry in addrconf_init()
   1d9afaa5c0a8 rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
   226d200531f4 ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
   14e82f4ce5bb tcp: fix wraparound issue in tcp_lp
   38853e5c3775 tcp: do not underestimate skb->truesize in tcp_trim_head()
   918d8536e126 ALSA: hda - Fix deadlock of controller device lock at unbinding
   1c370084c6f3 staging: emxx_udc: remove incorrect __init annotations
   8602853345b7 staging: wlan-ng: add missing byte order conversion
   bd253cf63929 brcmfmac: Make skb header writable before use
   c4efbc9ce69d brcmfmac: Ensure pointer correctly set if skb data location changes
   62494116045e MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix
   48ea252abd40 scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m
   ddfc6a095d10 serial: 8250_omap: Fix probe and remove for PM runtime
   2c7105e86e3d USB: serial: io_edgeport: fix descriptor error handling
   00f244650faf USB: serial: mct_u232: fix modem-status error handling
   0379d54281fc USB: serial: quatech2: fix control-message error handling
   e2eaebce9d20 USB: serial: ftdi_sio: fix latency-timer error handling
   e7ccc604153b USB: serial: ark3116: fix open error handling
   b5b985c3a0bd USB: serial: ti_usb_3410_5052: fix control-message error handling
   dc7697bad3f6 USB: serial: io_edgeport: fix epic-descriptor handling
   4e78688b4cb3 USB: serial: ssu100: fix control-message error handling
   0f5e27457f1a USB: serial: digi_acceleport: fix incomplete rx sanity check
   5d7985765271 USB: serial: keyspan_pda: fix receive sanity checks
   9de980a19940 usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
   08fd577b4b0f usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
   0a9f0af48e3f KVM: nVMX: initialize PML fields in vmcs02
   4736ccc83dfc Revert "KVM: nested VMX: disable perf cpuid reporting"
   7a07dbb8c25c x86/platform/intel-mid: Correct MSI IRQ line for watchdog device
   92e01bd47512 kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed
   19d416eaccbb x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0
   ae0f7bd8e226 mwifiex: Avoid skipping WEP key deletion for AP
   34390bea46f7 mwifiex: remove redundant dma padding in AMSDU
   a5a09b34dab1 mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print
   039747b6ef2d power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()
   f3b0fe6bfcbf power: supply: bq24190_charger: Call set_mode_host() on pm_resume()
   0ba15a289c67 power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING
   ab1b642339b3 powerpc/powernv: Fix opal_exit tracepoint opcode
   5d1767ceff1f cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores
   16968228efa5 9p: fix a potential acl leak
   c41e1ba87961 net: tg3: avoid uninitialized variable warning
   95660aa2822d mtd: avoid stack overflow in MTD CFI code
   b9e4b97eb9a0 drbd: avoid redefinition of BITS_PER_PAGE
   1de253cbd35b ALSA: ppc/awacs: shut up maybe-uninitialized warning
   db14464180fa timerfd: Protect the might cancel mechanism proper
   11d54db42149 ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram
   77ded373242b ipv6: check raw payload size correctly in ioctl
   0c8f1722d1d6 ip6mr: fix notification device destruction
   7f4ab2ced0a7 netpoll: Check for skb->queue_mapping
   74c4460b6482 sctp: listen on the sock only when it's state is listening or closed
   7d1a0fdd41f8 net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given
   6824dcd302fd l2tp: take reference on sessions being dumped
   cc09115fb0b9 net/packet: fix overflow in check for tp_reserve
   fed853407cc2 net/packet: fix overflow in check for tp_frame_nr
   9ba240219c96 l2tp: purge socket queues in the .destruct() callback
   28bad8a652e9 net: phy: handle state correctly in phy_stop_machine
   b39245e33e95 net: neigh: guard against NULL solicit() method
   9ffb20a69946 sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write()
   1acc886c425e sparc64: kern_addr_valid regression
   5023f12103b9 xen/x86: don't lose event interrupts
   b64d082304fe usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize
   e7211d1ff579 RDS: Fix the atomicity for congestion map update
   92bf6b466b99 MIPS: Fix crash registers on non-crashing CPUs
   d0388c0e2556 md:raid1: fix a dead loop when read from a WriteMostly disk
   f364181f7aa2 crypto: testmgr - fix out of bound read in __test_aead()
   9800a9a4b17a [media] xc2028: unlock on error in xc2028_set_config()
   c5ef0e9f70d1 f2fs: do more integrity verification for superblock
   5f1cef9e823a ping: implement proper locking
   9c90c093b98f staging/android/ion : fix a race condition in the ion driver
   073e9973d48b vfio/pci: Fix integer overflows, bitmask check
   e21b00fe6cc7 [media] xc2028: avoid use after free
   c8580e3dcd00 tipc: fix random link resets while adding a second bearer
   5eb668f8442e gfs2: avoid uninitialized variable warning
   6013c31fb7e1 hostap: avoid uninitialized variable use in hfa384x_get_rid
   56c3cd096747 tty: nozomi: avoid a harmless gcc warning
   39a978c3e192 tipc: re-enable compensation for socket receive buffer double counting
   0c28e96f0fec block: fix del_gendisk() vs blkdev_ioctl crash
   0c4670d5a6a4 Drivers: hv: balloon: account for gaps in hot add regions
   2cbbeec3e5a7 Drivers: hv: balloon: keep track of where ha_region starts
   5b9ab933c369 x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs
   749cab856042 Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg()
   38f9c4b9176a Drivers: hv: don't leak memory in vmbus_establish_gpadl()
   9f4a8ebb750b net: ipv6: check route protocol when deleting routes
   5ce729a895b0 tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done
   9d86a569dbd7 catc: Use heap buffer for memory size test
   4d7726afea37 catc: Combine failure cleanup code in catc_probe()
   61bd90b31be7 rtl8150: Use heap buffers for all register access
   7b69bee71416 pegasus: Use heap buffers for all register access
   0dd8a4702cbc virtio-console: avoid DMA from stack
   eb618d2eb22b mm: Tighten x86 /dev/mem with zeroing reads
   187887b3dbae rtc: tegra: Implement clock handling
   ea215d798bc2 platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event
   4473dc376c48 [media] dvb-usb-v2: avoid use-after-free
   68e9c254f662 kvm: fix page struct leak in handle_vmon
   f800bcede54d char: lack of bool string made CONFIG_DEVPORT always on
   d1cdf638cde8 char: Drop bogus dependency of DEVPORT on !M68K
   6d1174d8ff9d net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
   8a8878b16056 net/mlx4_en: Fix bad WQE issue
   037948b4f092 usb: hub: Wait for connection to be reestablished after port reset
   dd07486ceba4 net/packet: fix overflow in check for priv area size
   c9d0eb33ba82 MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK
   cd7de3163c8c MIPS: Only change $28 to thread_info if coming from user mode
   aa7ae7fee5d6 mtd: bcm47xxpart: fix parsing first block after aligned TRX
   1669925abfce usb: dwc3: gadget: delay unmap of bounced requests
   aa612d59c08f mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
   00fc586ea741 mlock: fix mlock count can not decrease in race condition
   001360714b85 mm/memory-failure: introduce get_hwpoison_page() for consistent refcount handling
   da7cbd0c660c mm/memory-failure: split thp earlier in memory error handling
   aeb3435b4987 slub/memcg: cure the brainless abuse of sysfs attributes
   afc6ec14b863 blkcg: use blkg_free() in blkcg_init_queue() failure path
   f9fac98fc753 blkcg: always create the blkcg_gq for the root blkcg
   712b6a6dceb2 iscsi-target: Use shash and ahash
   1bd31de39e62 target/iscsi: Use proper SGL accessors for digest computation
   89ff28d0d690 iscsi-target: Fix initial login PDU asynchronous socket close OOPs
   09cb399b6219 target/iscsi: Fix indentation in iscsi_target_start_negotiation()
   68185cb17f7e iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race
   5df474e63ca5 cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
   7e144ca4d77a drm/msm: Expose our reservation object when exporting a dmabuf.
   7e185e0063bc xfs: Fix missed holes in SEEK_HOLE implementation
   59acce815cd6 xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff()
   b96e5f18eb81 drm/radeon: Unbreak HPD handling for r600+
   81402e4033a7 dmaengine: ep93xx: Don't drain the transfers in terminate_all()
   1a45b842de71 dmaengine: ep93xx: Always start from BASE0
   72a5ed836013 drm/gma500/psb: Actually use VBT mode when it is found
   4f268a106e88 PCI / PM: Avoid resuming more devices during system suspend
   b060ae49eb94 PCI: Add quirk for Intel DH895xCC VF PCI config erratum
   e0bda32c5bc5 ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430
   9dbe42c5ae46 mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read
   0210333e202b i2c: i2c-tiny-usb: fix buffer not being DMA capable
   8852d28b3f06 x86/mce: Don't use percpu workqueues
   94d42e8811f4 osf_wait4(): fix infoleak
   156c18c7d9ed KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation
   e8b80de6d76e watchdog: pcwd_usb: fix NULL-deref at probe
   9ef27e6ccbe0 drivers: char: mem: Check for address space wraparound with mmap()
   682182e924ea serial: core: fix crash in uart_suspend_port
   b614900e0650 tty: Fix GPF in flush_to_ldisc()
   2e279b7d786c tty: fix data race in flush_to_ldisc
   3e984ccc90f8 serial: ifx6x60: fix use-after-free on module unload
   191c13c554e5 serial: ifx6x60: Remove dangerous spi_driver casts
   95a639d15067 Revert "tty_port: register tty ports with serdev bus"
   1520f7e76d45 tty_port: register tty ports with serdev bus
   0095625438b2 usb: musb: tusb6010_omap: Do not reset the other direction's packet size
   d7cc01aa1796 usb: host: xhci-plat: propagate return value of platform_get_irq()
   1458bfaae6c8 USB: xhci: fix lock-inversion problem
   a0334d0ba6ad usb: host: xhci: simplify irq handler return
   8732affeaf37 usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
   2f68fe68ad96 xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
   e17762c03b3e tracing/kprobes: Enforce kprobes teardown after testing
   78de28c67c8f of: fdt: add missing allocation-failure check
   ac38837324c2 USB: serial: qcserial: add more Lenovo EM74xx device IDs
   2a3835ffa5ed USB: hub: fix non-SS hub-descriptor handling
   c5922c99f193 USB: hub: fix SS hub-descriptor handling
   de90980c52da USB: iowarrior: fix info ioctl on big-endian hosts
   46b3a375a926 uwb: fix device quirk on big-endian hosts
   8ace7b038603 USB: core: replace %p with %pK
   083112faaf11 USB: ene_usb6250: fix DMA to the stack
   a3670852d2fb USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs
   d0e929a4e63f char: lp: fix possible integer overflow in lp_setup()
   da6d8dbb5da7 dm bufio: make the parameter "retain_bytes" unsigned long
   b9805634c6de genirq: Introduce struct irq_common_data to host shared irq data
   073bc325fdc4 usb: dwc3: make dwc3_debugfs_init return value be void
   83204fd38a02 kvm arm: Move fake PGD handling to arch specific files
   060e39373d8a ARM: KVM: Remove pointless void pointer cast
   0bef2bd6fa64 dmaengine: usb-dmac: Fix DMAOR AE bit definition
   873bdf5cd492 dm space map disk: fix some book keeping in the disk space map
   a42b975f484e dm thin metadata: call precommit before saving the roots
   2cd394cd1046 USB: serial: io_ti: fix div-by-zero in set_termios
   a1dfb5701675 USB: serial: mct_u232: fix big-endian baud-rate handling
   391f2e944624 USB: serial: ftdi_sio: fix setting latency for unprivileged users
   048a9813c3e5 usb: serial: option: add Telit ME910 support
   092c6f1e1630 ARM: dts: imx6sx-sdb: Remove OPP override
   ba640473d7c9 ARM: dts: imx6sx-sdb: Add 198MHz operational point
   4bb916c171fa cgroup: use bitmask to filter for_each_subsys
   034dd596324d sched, cgroup: reorganize threadgroup locking
   0e521eabd7a3 pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
   57cd95a5dcbc net: irda: irda-usb: fix firmware name on big-endian hosts
   38f915577c6e s390/cputime: fix incorrect system time
   98442999b967 dccp: fix freeing skb too early for IPV6_RECVPKTINFO
   56d847e3ef94 Linux 4.1.40
   5c564705d3f0 udp: properly support MSG_PEEK with truncated buffers
   f97e5ec81364 nfsd: encoders mustn't use unitialized values in error cases
   a7b4cdeb22f5 arm64: uaccess: ensure extension of access_ok() addr
   ed3ffd7c7fb9 arm64: documentation: document tagged pointer stack constraints
   f8a4b26e261d target/fileio: Fix zero-length READ and WRITE handling
   9d68722df885 CIFS: add misssing SFM mapping for doublequote
   14f24a466cd1 iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement
   3aa99b61c099 target: Fix compare_and_write_callback handling for non GOOD status
   0c5623052d48 of: fix sparse warning in of_pci_range_parser_one
   3e9e9c708f10 ceph: fix memory leak in __ceph_setxattr()
   009a83913e29 SMB3: Work around mount failure when using SMB3 dialect to Macs
   ffd28faab493 CIFS: fix mapping of SFM_SPACE and SFM_PERIOD
   ae5175c8dba4 fs/block_dev: always invalidate cleancache in invalidate_bdev()
   e895a1054e25 um: Fix PTRACE_POKEUSER on x86_64
   327d78550aea metag/uaccess: Check access_ok in strncpy_from_user
   31390049dfd2 Set unicode flag on cifs echo request to avoid Mac error
   3ea80afb2dce metag/uaccess: Fix access_ok()
   17535d260b75 target: Fix VERIFY and WRITE VERIFY command parsing
   edd3ad16ead4 dm bufio: check new buffer allocation watermark every 30 seconds
   bbe86592f9c3 dm bufio: avoid a possible ABBA deadlock
   9575253a91e6 Bluetooth: Fix user channel for 32bit userspace on 64bit kernel
   ca38d087f1b0 ext4: evict inline data when writing to memory map
   3a9700b0709e proc: Fix unbalanced hard link numbers
   2279c8b917f7 dm ioctl: prevent stack leak in dm ioctl call
   5afff19d82af nfsd: stricter decoding of write-like NFSv2/v3 ops
   24c3569dd195 nfsd4: minor NFSv2/v3 write decoding cleanup
   c9bb9f02b048 nfsd: check for oversized NFSv2/v3 arguments
   6a5e61496c48 usb: Make sure usb/phy/of gets built-in
   372323131cd0 ASoC: intel: Fix PM and non-atomic crash in bytcr drivers
   b583cc935477 Input: i8042 - add Clevo P650RS to the i8042 reset list
   56e191701252 dm era: save spacemap metadata root after the pre-commit
   6a887571cad2 dm btree: fix for dm_btree_find_lowest_key()
   2ad7696baa06 powerpc/pseries: Fix of_node_put() underflow during DLPAR remove
   e756dc9e7bfb IB/mlx4: Fix ib device initialization error flow
   50f63ac752b8 x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
   51cad4572c02 ring-buffer: Have ring_buffer_iter_empty() return true when empty
   2933c0ba9193 ACPI / power: Avoid maybe-uninitialized warning
   f7f44f588722 tracing: Allocate the snapshot buffer before enabling probe
   73270592d94b usb: host: xhci: print correct command ring address
   5ba52c08d1d1 [media] ttusb2: limit messages to buffer size
   e1dfe98dda6a USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
   00461b9f4817 PCI: Freeze PME scan before suspending devices
   57b8e3a6524b regulator: tps65023: Fix inverted core enable logic.
   1ff629068e6e [media] zr364xx: enforce minimum size when reading header
   a0f82864854a KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings
   86d961e25888 KEYS: Change the name of the dead type to ".dead" to prevent user access
   4ef48e49b1c5 KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings
   369cd3933506 powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction
   199ea04d7d01 cifs: Do not send echoes before Negotiate is complete
   b291f2ed870a p9_client_readdir() fix
   98ae917fd128 ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
   429957317eac ARM: dts: at91: sama5d3_xplained: fix ADC vref
   c7f3669caa0b zram: do not use copy_page with non-page aligned address
   ac87ea2ff7d7 zram: fix operator precedence to get offset
   7bee1c58a629 ALSA: seq: Don't break snd_use_lock_sync() loop by timeout
   93dfafeefbb6 MIPS: KGDB: Use kernel context for sleeping threads
   22afb4fc42e4 PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
   1ecc90c7e6b4 MIPS: Avoid BUG warning in arch_check_elf
   396f0fe4cc1b s390/mm: fix CMMA vs KSM vs others
   fab0b034bd91 serial: omap: suspend device on probe errors
   0ea0b8f3adbe serial: omap: fix runtime-pm handling on unbind
   113cc52cf9fe CIFS: store results of cifs_reopen_file to avoid infinite wait
   5c6d0e841556 CIFS: remove bad_network_name flag
   417dc40ebaf2 Input: xpad - add support for Razer Wildcat gamepad
   3a5df486f2e1 x86/vdso: Plug race between mapping and ELF header setup
   7ec71e0bb16d md: update slab_cache before releasing new stripes when stripes resizing
   2da764d4c67b padata: free correct variable
   ce0e21e44f97 crypto: ahash - Fix EINPROGRESS notification callback
   4ee5f3baad19 [media] cx231xx-audio: fix NULL-deref at probe
   8b6c66045c33 [media] cx231xx-audio: fix init error path
   5a4e9221b31b [media] cx231xx-cards: fix NULL-deref at probe
   a44bcf6b4c54 [media] usbvision: fix NULL-deref at probe
   c7bcf82e59ea [media] dib0700: fix NULL-deref at probe
   27a0c2317453 serial: samsung: Use right device for DMA-mapping calls
   5eb0c97fc835 sysfs: be careful of error returns from ops->show()
   dad2a28d46e7 staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
   4ac302f8832f usb: misc: add missing continue in switch
   34a2eb59fc13 ptrace: fix PTRACE_LISTEN race corrupting task->state
   8624aeaec37d scsi: sd: Fix capacity calculation with 32-bit sector_t
   9535300dd7e2 scsi: sr: Sanity check returned mode data
   21ebc869930a ipmi: Fix kernel panic at ipmi_ssif_thread()
   82bfc1d9bc5d xen, fbfront: fix connecting to backend
   8dd5c1281e98 Reset TreeId to zero on SMB2 TREE_CONNECT
   3707e32c8fcc [media] s5p-mfc: Fix unbalanced call to clock management
   01ea8f2396af [media] gspca: konica: add missing endpoint sanity check
   206374212c28 IB/IPoIB: ibX: failed to create mcg debug file
   f585e26312b5 metag/usercopy: Add missing fixups
   c31ac9be1dc2 metag/usercopy: Fix src fixup in from user rapf loops
   09e3cca03b29 metag/usercopy: Set flags before ADDZ
   7c3a804c24cc metag/usercopy: Zero rest of buffer from copy_from_user
   f58b27f0ce36 metag/usercopy: Add early abort to copy_to_user
   fde1ed807fc6 metag/usercopy: Fix alignment error checking
   59465f2b425d metag/usercopy: Drop unused macros
   8da28861bfab ring-buffer: Fix return value check in test_ringbuffer()
   4cc0a6f14611 crypto: caam - fix RNG deinstantiation error checking
   c94b3a0d7a27 powerpc/mm: Add missing global TLB invalidate if cxl is active
   ca4f5edccb94 ath9k_htc: fix NULL-deref at probe
   783494a2cf45 powerpc: Don't try to fix up misaligned load-with-reservation instructions
   ea42f85ce0a6 kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd
   407526d5f5cc tpm: add sleep only for retry in i2c_nuvoton_write_status()
   779a96681b4b tpm_crb: check for bad response size
   331f718a9746 tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver
   e43c2447f8ed iscsi-target: Drop work-around for legacy GlobalSAN initiator
   d2762e9848bb cdc-acm: fix possible invalid access when processing notification
   4d8a7de65c82 mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd()
   5c9eddc3db73 ALSA: hda - fix a problem for lineout on a Dell AIO machine
   d91a91d8f6ba drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()
   6431059d9e0f drm/vmwgfx: Remove getparam error message
   b31c507e2c3b drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl()
   13b52a46a677 drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl()
   55f1d24ac1ab drm/vmwgfx: Type-check lookups of fence objects
   18bcea4e8d2e iscsi-target: Fix TMR reference leak during session shutdown
   bfa5d70414f2 ubi/upd: Always flush after prepared for an update
   c127ce428b73 s390/uaccess: get_user() should zero on failure (again)
   0d2f98e74d4f USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously
   6842ff6056ea ACPI: Fix incompatibility with mcount-based function graph tracing
   e5dcf4e37e91 ACPI: Do not create a platform_device for IOAPIC/IOxAPIC
   e2b3e7de14ba virtio_balloon: init 1st buffer in stats vq
   a205b2e5a2a0 powerpc: Disable HFSCR[TM] if TM is not supported
   f8889a244545 drm/radeon: Override fpfn for all VRAM placements in radeon_evict_flags
   848f94592710 USB: fix linked-list corruption in rh_call_control()
   3492352e1f34 ALSA: seq: Fix race during FIFO resize
   55e9d9474816 [media] mceusb: fix NULL-deref at probe
   91848cdb7ae7 xen/acpi: upload PM state from init-domain to Xen
   970a7a72b32d pinctrl: qcom: Don't clear status bit on irq_unmask
   fbb9dd5123de mmc: sdhci: Do not disable interrupts while waiting for clock
   a2f7beb42427 usb: hub: Do not attempt to autosuspend disconnected devices
   041fad219db7 usb: gadget: f_uvc: Fix SuperSpeed companion descriptor's wBytesPerInterval
   d4cbbe1460c4 s390/decompressor: fix initrd corruption caused by bss clear
   f1c9472e3dce ALSA: seq: Fix racy cell insertions during snd_seq_pool_done()
   d57b1afab5a8 scsi: libsas: fix ata xfer length
   972d4b4f2c7b arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region
   474d78d49b8b arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm
   d59cf3fa94db USB: serial: qcserial: add Dell DW5811e
   6338e370099a x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm
   1b9537d72610 tty: pty: Fix ldisc flush after userspace become aware of the data already
   44705deddafe usb: hub: Fix crash after failure to read BOS descriptor
   09b3048b2880 ACM gadget: fix endianness in notifications
   861b5c18bb14 scsi: sg: check length passed to SG_NEXT_CMD_LEN
   7268eabd5b5f Input: sur40 - validate number of endpoints before using them
   84a91ce02105 Input: kbtab - validate number of endpoints before using them
   f1ba9cf02776 Input: hanwang - validate number of endpoints before using them
   36d425fcc164 Input: yealink - validate number of endpoints before using them
   79cae616c940 Input: ims-pcu - validate number of endpoints before using them
   6585effe7d22 Input: cm109 - validate number of endpoints before using them
   76d981017361 Input: iforce - validate number of endpoints before using them
   edf3bd9562a9 mmc: ushc: fix NULL-deref at probe
   93d21fdc17e5 drm/radeon: reinstate oland workaround for sclk
   71a1c9d004ed perf/core: Fix event inheritance on fork()
   4da3251aac57 cpufreq: Fix and clean up show_cpuinfo_cur_freq()
   85fa60732c80 drm/radeon/si: add dpm quirk for Oland
   772653bea403 ext4: mark inode dirty after converting inline directory
   e8959ed1fd07 futex: Add missing error handling to FUTEX_REQUEUE_PI
   33fcd6ecaf0f futex: Fix potential use-after-free in FUTEX_REQUEUE_PI
   56d75a164c87 ARM: at91: pm: cpu_idle: switch DDR to power-down mode
   ce6df3d36d07 usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer
   ed4b286d254b usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk
   599dc7743f74 uwb: i1480-dfu: fix NULL-deref at probe
   50c372bd694d uwb: hwa-rc: fix NULL-deref at probe
   7896de4f8b00 USB: wusbcore: fix NULL-deref at probe
   0b3718017641 USB: uss720: fix NULL-deref at probe
   aee563c5ffb5 USB: lvtest: fix NULL-deref at probe
   a2574cf7887d USB: idmouse: fix NULL-deref at probe
   13cd0c011e73 isdn/gigaset: fix NULL-deref at probe
   027a48c195e1 fat: fix using uninitialized fields of fat_inode/fsinfo_inode
   c4743e805d43 md/raid1/10: fix potential deadlock
   6eea126f9d6d usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
   92b280212adf USB: iowarrior: fix NULL-deref in write
   c4b516612312 USB: iowarrior: fix NULL-deref at probe
   4db7a852b417 ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
   394e5f4a60c1 USB: serial: safe_serial: fix information leak in completion handler
   e0f57e1a406c USB: serial: io_ti: fix information leak in completion handler
   5dfb04937689 USB: serial: omninet: fix reference leaks at open
   6aed13b2c40e USB: serial: io_ti: fix NULL-deref in interrupt callback
   92fbcbfe994f MIPS: ralink: Fix typos in rt3883 pinctrl
   7ba49ba6dd09 MIPS: End spinlocks with .insn
   d7f84ae03ff3 MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels
   248e94265dd0 target: Fix VERIFY_16 handling in sbc_parse_cdb
   452c3c927325 target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export
   076df4623c10 scsi: lpfc: Add shutdown method for kexec
   e04d8b65f412 powerpc/boot: Fix zImage TOC alignment
   5c8f767c657b serial: samsung: Continue to work if DMA request fails
   46df5258a521 Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000
   9d3698c9b85c ima: accept previously set IMA_NEW_FILE
   86525f9f4474 percpu: acquire pcpu_lock when updating pcpu_nr_empty_pop_pages
   42ece5f50098 usb: gadget: dummy_hcd: clear usb_gadget region before registration
   7ccd5568eab8 USB: serial: digi_acceleport: fix OOB-event processing
   6842c8457292 staging: comedi: jr3_pci: cope with jiffies wraparound
   29e34e47fadf staging: comedi: jr3_pci: fix possible null pointer dereference
   c48408dff998 usb: gadget: function: f_fs: pass companion descriptor along
   757895c336d6 usb: dwc3: gadget: make Set Endpoint Configuration macros safe
   2e9d3a921000 tracing: Add #undef to fix compile error
   bd38086c6b2a can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer
   99d3d49197e1 powerpc: Emulation support for load/store instructions on LE
   381785176cc1 KVM: s390: Fix guest migration for huge guests resulting in panic
   7caf29dc038c xtensa: move parse_tag_fdt out of #ifdef CONFIG_BLK_DEV_INITRD
   14abcbaa3f0d scsi: libiscsi: add lock around task lists to fix list corruption regression
   28d5d8b2db22 ALSA: seq: Fix link corruption by event error handling
   b78e49c3057a ALSA: hda - Add subwoofer support for Dell Inspiron 17 7000 Gaming
   d19f6529f1c1 ALSA: timer: Reject user params with too small ticks
   3d35f4422582 drm/ast: Call open_key before enable_mmio in POST code
   2188c2b367c6 drm/ast: Fix test for VGA enabled
   e8b120e25fbc drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS
   c9cf983337a0 ipc/shm: Fix shmat mmap nil-page protection
   1827f7e6062b mac80211: flush delayed work when entering suspend
   0dad072cfc1d ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine
   e5ee49ad28a0 mm: do not access page->mapping directly on page_endio
   21a6489deda1 mm: vmpressure: fix sending wrong events on underflow
   091e3373d97f mm/page_alloc: fix nodes for reclaim in fast path
   7ec8bd575e7b s390: TASK_SIZE for kernel threads
   01592a4b8ba8 NFSv4: fix getacl ERANGE for some ACL buffer sizes
   bb9e115a5e85 NFSv4: fix getacl head length estimation
   05365e1fdea9 scsi: aacraid: Reorder Adapter status check
   f90e6f9a26ba rdma_cm: fail iwarp accepts w/o connection params
   a60c9ff335a1 IB/srp: Avoid that duplicate responses trigger a kernel bug
   3cac36b0423b MIPS: BCM47XX: Fix button inversion for Asus WL-500W
   512cbc94607b MIPS: OCTEON: Fix copy_from_user fault handling for large buffers
   9b4ed3674858 MIPS: Fix special case in 64 bit IP checksumming.
   85050844c0b9 dm cache: fix corruption seen when using cache > 2TB
   c0601ca14e10 Bluetooth: Add another AR3012 04ca:3018 device
   da1324e7080d regulator: Fix regulator_summary for deviceless consumers
   01f9734353be ALSA: hda - fix Lewisburg audio issue
   b57d6c457569 goldfish: Sanitize the broken interrupt handler
   c1dbd97d8a2a x86/platform/goldfish: Prevent unconditional loading
   58cec2bdba91 ath9k: use correct OTP register offsets for the AR9340 and AR9550
   9aabd8dbacd8 powerpc/xmon: Fix data-breakpoint
   c2fd678ea234 nlm: Ensure callback code also checks that the files match
   e53554da9daf drivers: hv: Turn off write permission on the hypercall page
   5fdf59513019 USB: serial: mos7840: fix another NULL-deref at open
   61f3d2296678 NFSv4: Fix memory and state leak in _nfs4_open_and_get_state
   95f495896ad8 drm/atomic: fix an error code in mode_fixup()
   04df6689f870 ktest: Fix child exit code processing
   a52f3859b78c ath9k: fix race condition in enabling/disabling IRQs
   db5051f86016 rtlwifi: rtl8192c-common: Fix "BUG: KASAN:
   f59f883503b7 USB: serial: ftdi_sio: fix line-status over-reporting
   4a34581ed021 KVM: s390: Disable dirty log retrieval for UCONTROL guests
   6631e70a42ff USB: serial: cp210x: add new IDs for GE Bx50v3 boards
   31ac2f17fd85 serial: 8250_pci: Add MKS Tenta SCOM-0800 and SCOM-0801 cards
   4c47ad359cc8 jbd2: don't leak modified metadata buffers on an aborted journal
   2b24a8367068 s390/qdio: clear DSCI prior to scanning multiple input queues
   36e4f568b8f1 s390/dcssblk: fix device size calculation in dcssblk_direct_access()
   5e6ef5ef6eaf mnt: Tuck mounts under others instead of creating shadow/side mounts.
   54195f1a32ee rtc: sun6i: Switch to the external oscillator
   cdb2a7f22913 rtc: sun6i: Add some locking
   af1af02352ee USB: serial: digi_acceleport: fix OOB data sanity check
   adb1da2a98a2 [media] media: fix dm1105.c build error
   c845c73b8396 bcma: use (get|put)_device when probing/removing device driver
   e1d467993c45 [media] am437x-vpfe: always assign bpp variable
   c53e17083e91 arm/arm64: KVM: Enforce unconditional flush to PoC when mapping to stage-2
   75f37dab088e ext4: trim allocation requests to group size
   07b79ed1e82c drm/radeon: handle vfct with multiple vbios images
   1efa8e2ac68b drm/ttm: Make sure BOs being swapped out are cacheable
   a99df0713f43 usb: gadget: udc: fsl: Add missing complete function.
   8c06df5655c7 USB: serial: ftdi_sio: fix extreme low-latency setting
   de143f74af3e w1: don't leak refcount on slave attach failure in w1_attach_slave_device()
   271ce5038fbc w1: ds2490: USB transfer buffers need to be DMAable
   57389faf841f ARM: dts: at91: Enable DMA on sama5d4_xplained console
   61b067fb433a staging: rtl: fix possible NULL pointer dereference
   434c09afa6c9 USB: serial: opticon: fix CTS retrieval at open
   700b2315c254 USB: serial: spcp8x5: fix modem-status handling
   da3a3becb7a8 USB: serial: ftdi_sio: fix modem-status error handling
   270ffbd14d81 USB: serial: ark3116: fix register-accessor error handling
   131d81690f18 IB/ipoib: Fix deadlock between rmmod and set_mode
   24104f6ae3b4 RDMA/core: Fix incorrect structure packing for booleans
   fc47912f44a7 ath5k: drop bogus warning on drv_set_key with unsupported cipher
   c2e65cde1bd7 tty: serial: msm: Fix module autoload
   ccb2e5cdaffa hv: init percpu_list in hv_synic_alloc()
   fbb6950ea08a samples/seccomp: fix 64-bit comparison macros
   33b9ac915dba scsi: storvsc: properly handle SRB_ERROR when sense message is present
   f0cd3119dcd0 scsi: storvsc: use tagged SRB requests if supported by the device
   88e4685b51d3 MIPS: Handle microMIPS jumps in the same way as MIPS32/MIPS64 jumps
   a6c4b18bdb3a MIPS: Calculate microMIPS ra properly when unwinding the stack
   339da589697a MIPS: Fix is_jump_ins() handling of 16b microMIPS instructions
   4556bdd21af3 MIPS: Fix get_frame_info() handling of microMIPS function size
   7c6a61c004ad MIPS: Prevent unaligned accesses during stack unwinding
   39fffbc9b371 MIPS: Clear ISA bit correctly in get_frame_info()
   e9ef2a32a2ec drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating

(From OE-Core rev: 976c260bfd61e1346c1ef842567eee80a7b7ffca)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Bruce Ashfield
a169f41c00 kernel-yocto/meta: smp configuration changes
Integrating the following kernel configuration changes to
clean up the SMP configuration fragments and fix a configuration
audit warning.

  d0e5ea0e199b smp: Separate smp into 32 and 64 bit versions to avoid kernel warnings
  f1369c1d817e bsp/mohonpeak: smp gets added by default, remove unnecessary include
  6fc22aa1200b bsp/rangeley: smp gets added by default, remove unnecessary include

[YOCTO #11743]

(From OE-Core rev: 6bd4f855cfc95c82d6bf5b00531f1aad752002ee)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Bruce Ashfield
aa7fc34dc4 kernel-yocto: propagate configuration errors to bbclass
As pointed out by klapperichpaul@johndeere.com, missing configuration
fragments were being picked up twice, once by the tools and once by the
bbclass. Unfortunately, the tools error message was being detected as
configs, and hence no error was reported at all.

Rather than catching the output of the tools, we can instead check the
return code and propagate the error message from the tools directly to
the user.

[YOCTO #11649]

(From OE-Core rev: 960652416e2390337df6d9734375d6829ceb6420)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Ross Burton
f22dfe95cc mesa: fix build race on src/intel/vulkan
It's possible that src/intel/vulkcan can be written into by sed before it has
been created, so add the required mkdir calls.

(From OE-Core rev: 19e793f65d214294baa9eeaf982f4ced351c7748)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Jussi Kukkonen
a46a9dd6bd mesa-gl: Clean recipe
Don't EXCLUDE_FROM_WORLD, mesa.inc already does this.
Don't add a non-existing path to FILESEXTRAPATHS.

(From OE-Core rev: fa3e2b4c07dffd14b02741470ce274619e9a9bd6)

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>
2017-07-17 14:01:38 +01:00
Jussi Kukkonen
ca666db8ed mesa: Avoid installing khrplatfrom.h when not needed
Fix the conflict between mesa and userland (when former is used to
provide GL and letter used to provide EGL+GLES) by not installing
khrplatform.h header when its not needed.

(From OE-Core rev: 6a079bf5a446c2e98e7444e04dfadaff96342b4f)

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>
2017-07-17 14:01:38 +01:00
Robert Yang
df4d8e3cd3 git: 2.11.1 -> 2.13.2
* Remove git-relink from PERLTOOLS:
  git-2.13.2/Documentation/RelNotes/2.12.0.txt:
  * An ancient script "git relink" has been removed.

(From OE-Core rev: f759420ad2a60d0be4ca15f4c9294086ecc86e59)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Robert Yang
f7d3f03588 debianutils: 4.8.1 -> 4.8.1.1
(From OE-Core rev: 2a8a10aead8da0c21e6461c03f038efcfc59e31a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Robert Yang
dbe04cb110 automake: 1.15 -> 1.15.1
* Remove backported patch:
  - 0001-automake-port-to-Perl-5.22-and-later.patch

(From OE-Core rev: 6455aa2289a401ab4959b399acada02907be99be)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
California Sullivan
157e7a244a gnu-efi: Upgrade package to 3.0.6 and refresh patches
Version 3.0.6 fixes a failure when using the pxe headers and allows us
to drop the explicit fall through patch as it was fixed upstream.

Other patches were rebased on top of the new version.

(From OE-Core rev: 20c1209f6fe0d56aa3698583a1b6d2774fbf4401)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Stanley Cheong Kwan, Phoong
0df60c7de2 recipetool: git reformat URI mangling & parameter stripped
recipetool seems to be mangling and stripping out the parameters for git
URI. This will fix this issue as well as resolve the conflict of
protocol parameter added by user. If a user adds their own protocol as
an argument, it'll be honored.

[YOCTO #11390]
[YOCTO #11391]

(From OE-Core rev: 0cd2fc8ca278ebaa76de95545eef26a07b350c8e)

Signed-off-by: Stanley Cheong Kwan, Phoong <stanley.cheong.kwan.phoong@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Denys Dmytriyenko
3ece2ff4df wayland-protocols: upgrade to 1.9
(From OE-Core rev: db5cac904a922e84099e726d05acc6d95eaa32aa)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Otavio Salvador
2db1f8e788 libarchive: Upgrade to 3.3.2 release
(From OE-Core rev: 00cd51e4f9e4344faf0d2e6c1a7fa109901b48b2)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Ross Burton
27e5534f13 valgrind: fix ptest compilation for PowerPC
(From OE-Core rev: cd1a123bd07016abcff218d4274161cd794a190b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Soren Brinkmann
6b490be5d1 valgrind: Update 3.12.0 -> 3.13.0
(From OE-Core rev: 99e00dc094afbff7785263b760e26e03ac09425f)

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Ross Burton
cc0d3d0936 valgrind: fix link failure with gold
(From OE-Core rev: 4c38908169a11635138d357fa4be39a80d6285e8)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Khem Raj
87f2328fb2 gcc-7.1: Update the libsanitize stack_t patch to upstreamed version
(From OE-Core rev: 979888c39684097086353dfd39eac60c4a66f776)

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-07-17 14:01:38 +01:00
Khem Raj
1131e79540 gcc-cross: Fix linker and fortran symlinks
If we used -fuse-ld gcc option, then it does not work
ending in

collect2: fatal error: cannot find 'ld'                                                                                                                                                                                                       compilation terminated.

This is because we are not creating proper symlinks for BFD
and Gold linker in gcc installation

Secondly, we end up with dangling fortran compiler symlinks
if fortran is not enabled when confguring gcc, therefore
create these symlinks only when fortran support is enabled
in gcc

(From OE-Core rev: f84614c082406287e608860741a82edd2f3c9bca)

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-07-17 14:01:38 +01:00
Maxin B. John
8e7d868f03 libxt: fix build failure
libxt build fails with this error:

/home/maxin/poky/build/tmp/work/i586-poky-linux/libxt/1_1.1.5-r0/recipe-sysroot/usr/include/bits/long-double.h:57:33:
fatal error: bits/long-double-64.h: No such file or directory
| compilation terminated.
| Makefile:408: recipe for target 'makestrs.o' failed

Fix the makestrs build.

(From OE-Core rev: 844d477982bb104fa1674324d2699b8995a51a58)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:38 +01:00
Maxin B. John
6e002d9ffc libx11: fix build error
libx11 build fails with this error:

fatal error: bits/long-double-64.h: No such file or directory
| compilation terminated.

This is due to the fact that "makekeys" should be compiled for the host
since it is executed at build time to generate ks_tables.h. Since we have
the X11 include files in the standard path of oe-core, we can remove the
X11_CFLAGS from Makefile.

(From OE-Core rev: c2bc26a163be231f489ea13e6f7226715765732e)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Jussi Kukkonen
c27eb6e6c6 selftest: Add vulkan-demos to checkpkg exceptions
vulkan-demos has not had any releases.

(From OE-Core rev: 910c16ef8e36286ce3e83e3c259ff7ec027b39b1)

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>
2017-07-17 14:01:37 +01:00
Jussi Kukkonen
2d339f752a vulkan-demos: Add recipe
Sascha Willems collection of Vulkan demos is useful as a smoke testing
tool.

* Add patch to install binaries and data.
* Add patch to fix build on X86
* Use a combination of patch and do_install_append to avoid some 3D
models with unclear licensing.

(From OE-Core rev: 88a6fa37e7ec2e68cdb2374f2a5371a6f44b3d67)

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>
2017-07-17 14:01:37 +01:00
Jussi Kukkonen
75b147e8a5 acpitests: Remove as unmaintained
This recipe was last upgraded about ~30 releases or three years ago,
it seems to only be touched when something breaks. It also has an
'interesting' license that maybe is open source...

(From OE-Core rev: 42a0fcec9c956834cc0f05bdf66701424472b1b4)

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>
2017-07-17 14:01:37 +01:00
Lans Zhang
30ba8b6894 sign_rpm: support signing files in RPM payload
Currently, RPM4 supports to sign the files in RPM payload with plugin
mechanism. We introduce more definitions to make the file signing
available for the users:

- RPM_FILE_CHECKSUM_DIGEST
  Global switch to enable file signing.
- RPM_FSK_PATH
  The file signing key.
- RPM_FSK_PASSWORD
  The password of file signing key.
- RPM_FILE_CHECKSUM_DIGEST
  The file checksum digest.

(From OE-Core rev: 95b9ee33d5595078e90c633f6155ec9ba3d184f0)

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Lans Zhang
946a3dae15 gpg_sign.py: fix overwriting the RPM macro __gpg in a wrong way
The RPM macro used in --define option should not be prefixed by %%.

(From OE-Core rev: 2fda41cef26b600d599dfb7f2e61c5829e2b309c)

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
b15df41d7d image_types: fix squashfs-lzo and squashfs-xz builds
Dependencies required for squashfs-lzo and squashfs-xz image builds were
assigned to do_image_squashfs-lzo and do_image_squashfs-xz. As these
tasks don't exist the dependencies were not installed and builds
were failing.

Correct task names for these image types are: do_image_squashfs_lzo and
do_image_squashfs_xz because '-' and '.' are replaced by '_' in all
do_image* task names.

[YOCTO #11760]

(From OE-Core rev: 1f8fc803262cdcc26dabc28af70bf0fdaf2e5847)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
eeef9c2202 imagefeatures: add test_image_fstypes test case
Tested if core-image-minimal can be built for existing fstypes by
building an image and checking if result file <image>.<fstype> exists
in the image deploy directory.

(From OE-Core rev: 9db3dbde66e3590aea71400891eaea0ae2caf371)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
5a514183e1 selftest: fixed 5 wic test cases
Added core-image-minimal -> syslinux dependency to ensure
syslinux artifacts are available from core-image-minimal
build. This should fix test_iso_image, test_bootloader_config and
test_default_output_dir test cases.

Used --native-sysroot in test_image_vars_dir_long and
test_image_vars_dir_short test cases to point out to wic-tools
native sysrtoot.

(From OE-Core rev: b7bcc4ba756aa3941c89999e9d6761738ea5bb05)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
c23be1034b wic: isoimage-isohybrid: use grub-efi from deploy dir
isoimage-isohybrid plugin tries to build grub-efi in its working
directory if it can't find efi binary. Wic should avoid doing anything
in working directories of other recipes. It should use artifacts from
the image deployment directory instead.

(From OE-Core rev: 9a1709278de877085a8d92f6361624e279a603bf)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
393e55c1ff image_types_wic: set default WKS_FILE_DEPENDS
The default set of dependencies used via wic-tools is not used
anymore as wic images don't depend on wic-tools.

Set of packages required to produce wic image depends on the content
of the .wks file, so WKS_FILE_DEPENDS variable should be used to
provide correct list of dependencies when WKS_FILE variable is set.

As WKS_FILE_DEPENDS is not used in many existing recipes yet we need
to provide default value for it to ensure that removal of wic-tool
dependency doesn't cause image build failures.

Initialized WKS_FILE_DEPENDS with the set of dependencies previously
brought by wic-tool. This is done to provide compatibility and to
avoid breakages of existing image recipes that rely on current set
of dependencies.

Note: This is a temporary solution for transition period.
After some time the list will be either reduced or removed.
Recommended solution is to use WKS_FILE_DEPENDS in image recipes
together with WKS_FILE to specify dependencies.

(From OE-Core rev: 01fc31854f7da6b3a4546121f809875c35bbf0e0)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
a57a9614e6 wic-tools: don't create wic-tools.env
wic-tools.env was uses only when wic is run from bitbake.
As wic doesn't use wic-tools anymore in this mode there is
no need for this file.

(From OE-Core rev: 47b569553f1211e04ee21ebdece2ee3a509a83be)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
f58ea8c814 wic: isoimage-isohybrid: check result of glob()
isoimage-isohybrid plugin uses result of glob call to
get path to initrd image. When glob returns empty list
the plugin crashes with IndexError.

Checking if result of glob call is not empty should fix
the breakage.

(From OE-Core rev: ad02f253f08a3da3fa5c86ae4f6ba7f94b070578)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
116e14fc45 wic: build wic-tools only if wic is run manually
When wic can't find native sysroot it tries to build wic-tools
However, it's not possible when wic is run from bitbake.
Moreover, it's not even feasible anymore as wic-tools should be
used only when wic is run manually.

Checked if wic is run manually before building wic-tools.

(From OE-Core rev: 522ac21831944b06fbcc372ac61762576d792c22)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
57a334c10a wic: isoimage: do not remove temp directory
Removed isodir subrdirectory instead of removing temporary
working directory as working directory can contain copy of
rootfs partition and shouldn't be removed by any plugin.

(From OE-Core rev: fc12ce9d1b92cc0104cf456af1e3d5f146b9219d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
b6dd87f2a8 wic: get rid of using wic-tools
At the moment, when building images with IMAGE_FSTYPES=wic one ends up
depending on wic-tools and thus syslinux and grub-efi even when not
using those at all. Ideally, building an image with wic should only
build the tools and components really needed.

The problem is that "wic-tools" is needed also for the manual
invocations of wic, in which case everything that might be needed has to
be built in advance.

Replaced dependency on wic-tools with dependency to a much shorter set
of tools that wic uses almost for any image: 'parted', 'gptfdisk',
'dosfstools' and 'mtools'.

[YOCTO #11552]

(From OE-Core rev: 33ca15b94dbe7204c556c4b5526edd529f6d85f4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ed Bartosh
223d3b44c0 live-vm-common: add MKDOSFS_EXTRAOPTS variable
Sometimes it's needed to create FAT filesystem with specific
sector or cluster size, FAT size or to use one of other useful
mkdosfs options.

Introduced MKDOSFS_EXTRAOPTS variable to set options for mkdosfs.

[YOCTO #11709]

(From OE-Core rev: 18b52577484d3b86bc31980a50da04141afda5f9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Shen Joon Tan
e7a25d3105 distro_alias.inc: update unmap packages to other distro
Added packages with different names or based on sources that
generates multiple binaries eg: python-pycurl source generates
python3-pycurl as well. Currently, some of these packages are not
displayed as part of other distro due to naming differences on
the source rather than the binaries as a single source could
produce multiple binaries with different names.

(From OE-Core rev: aed3cebdfbd4f483644a8c200f27d52b981728a3)

Signed-off-by: Shen Joon Tan <shen.joon.tan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Joshua Lock
ca98a339c5 image_types: remove Hob convenience variable
IMAGE_EXTENSION_live is no longer used. It was used by Hob to map the
live image type, but Hob is no longer part of the Bitbake codebase.

(From OE-Core rev: 2b30dcdc903c1b0c18e14e39b954177628d058bd)

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>
2017-07-17 14:01:37 +01:00
Ross Burton
6e46b4c1b2 classes/sanity: check for case-sensitive file systems
Case-insensitive file systems fail during builds in very mysterious ways, such
as mpfr:

  ERROR: patch_do_patch: Not a directory

The problem here being that mpfr has a PATCHES file, so when we try to copy the
patches into ${S}/patches/ it fails.

We can't and won't support case-insensitive file systems so add a sanity check
to abort the build if one is found.

(From OE-Core rev: 20ce04fb64f559e64490d53678fa00644a92894a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ross Burton
173760abc6 lib/oe/sstatesig: exclude ccache-native from signature hashes
Enabling ccache should not cause a complete rebuild, so filter out ccache-native
from the dependencies the same way we do for quilt-native (so the world doesn't
repatch if quilt changes).

This doesn't effect the actual dependencies, just the dependencies that impact
the hash.

[ YOCTO #11417 ]

(From OE-Core rev: ffeca7dcc1abe82cad8374a31bf72b36a472fa1b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:37 +01:00
Ross Burton
11f6f7c617 ccache: let ccache create CCACHE_DIR, reducing hash changes
(From OE-Core rev: 408c5c0f942fa4a7b4df6aacf336d685037ca76c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:36 +01:00
Ross Burton
a5c870ec76 bitbake.conf: add CCACHE_NOHASHDIR to hash whitelist
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:36 +01:00
Ross Burton
c895ddb56b ccache: don't export CCACHE_DISABLE globally
CCACHE_DISABLE was added to bitbake.conf in oe-core dd2bab (June 2012) because
autogen-native exports HOME=/dev/null during the build, which is then used by a
host ccache to construct the path to it's cache (/dev/null/.ccache) and this
fails.

However we now always export CCACHE_DIR to solve the same problem in a more
efficient way so CCACHE_DISABLE can be deleted.

(From OE-Core rev: ef33a3138384667f819688141086102e6e83ec44)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:36 +01:00
Patrick Ohly
8839ed1620 distrooverrides.bbclass: fix default configuration
When using distrooverrides.bbclass without setting
DISTRO_FEATURES_OVERRIDES, the code failed because of a spelling error
in the default.

[YOCTO #11759]

(From OE-Core rev: 174277176fcdc13b4a29e291dafc2f508ff9da66)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:36 +01:00
Joshua Lock
ec251ee98f x86-base: build only hddimg, rather than iso and hddimg, for x86 machines
(From OE-Core rev: 1e05d488f9f09230d2f7cd3f43a385ad206066f8)

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>
2017-07-17 14:01:36 +01:00
Ed Bartosh
1b11a653d0 runqemu: check exit code of 'ls -t'
Used check_output instead of Popen as it raises CalledProcessError
exception when command exits with non-zero exit code.

Catched the exception to produce user-friendly output.

[YOCTO #11719]

(From OE-Core rev: dac68d2323b0b630c019ce4d5256ed567eaf00da)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:36 +01:00
Ed Bartosh
96a87592d4 runqemu: reworked exception handling
Introduced custom RunQemuException that script raises on known
errors. This exception is handled in one place and prints
error output without printing Python traceback. This shoud make
error output less scary for the end user.

Handling of unknown errors has not been changed - both error and
traceback will be printed.

Reimplemented OEPathError exception code to handle it similarly
to RunQemuException.

Moved exception handling code into main() to keep it in one place.

[YOCTO #11719]

(From OE-Core rev: a779a382b66e7b43ac53286758b4370dc14b193b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17 14:01:36 +01:00
Kristi Rifenbark
81498aac95 yocto-project-qs: Updated Next Steps list
Updated manual descriptions to fit current
manual structures.

(From yocto-docs rev: 81d8add49fd09deef432d9a0cc08c9f380c671ed)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:16 +01:00
Kristi Rifenbark
088f55a535 dev-manual: Fixed Flash the Device example
Fixes [YOCTO #11774]

Updated bmaptool instructions in Flashing
Images Using bmaptool section by changing
the sudo command.

Fixed the oe-run-native line.

(From yocto-docs rev: c3a1e2882abbb7b682ce101a8b038f89c4e2261c)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:16 +01:00
Kristi Rifenbark
34fc5d0295 yocto-project-qs: Updated Welcome and example board
Fixes [YOCTO #11715]

Replaced all instances of MinnowBoard MAX with
MinnowBoard Turbot.

Updated Welcome section to include links to key
sections of quick start.

(From yocto-docs rev: ed55dcd80ef5edddacb2d288e0a6cbe85dccf964)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:16 +01:00
Scott Rifenbark
f49fa46e19 dev-manual: Updated the section on initramfs
I did a rewrite of the section to get it into a procedural form.
Missing some technical information and needs a review but it is
the best that can be done at this time.  The code for initrd is
not settled.

(From yocto-docs rev: 0fdef8c5fed6ac510d1604a677e6546494b4c96b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
aa1162685f ref-manual: Cleaned up the description of INITRAMFS_IMAGE variable.
(From yocto-docs rev: a85647193c202fcd36c70122240b54aa5672c895)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
6a7d93155b ref-manual: Updated INITRAMFS_IMAGE variable description.
The description suggested the reader see the
meta/poky/conf/local.conf.sample.extended file for more understanding
on INITRAMFS_IMAGE.  The actual file is
meta-poky/conf/local.conf.sample.extended.

(From yocto-docs rev: 80b474d3417e88a47d1317b2af6552698e907b80)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
e4f288d519 dev-manual: Updated "Performing a Simple Build" section.
I added a figure for this simple build workflow that uses
BitBake from a Linux host.  Also did a bit of re-writing.

A new figure was introduced so the Makefile had to be adjusted
to include that figure.  The figure resides in the figures
directory of both the dev-manual and the mega-manual.

(From yocto-docs rev: c3b0b1d53f551c02202cef80a8a48dd24576b975)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
3f65f662ba ref-manual: Added "Toaster" to the list of terms.
(From yocto-docs rev: d6325a02c252c241e544f55f1d436dcf784de4db)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
6031f8cfb1 dev-manual: Updated cover information to remove Intel
The author of the book was still Intel Corporation.  This
needs removed.  I replaced it with "Scotty's Documentation
Services, Inc.".

(From yocto-docs rev: 14f1df18210a3dcb4b7174ddcad551aa9141696d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Kristi Rifenbark
10a5ff6e0e yocto-project-qs: Updated exit QEMU instructions.
Removed "poweroff" command to exit and replaced
with "Ctrl-C".

(From yocto-docs rev: f08bc3b8c7009039da1bf90629a628ff6bbdac64)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
609f23d81b kernel-dev: Added the "writernotes" style.
(From yocto-docs rev: 5ba749bf7a169ba1eb5440f93a00a093a07641a9)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
293b53674c documentation: Moved devtool workflow to sdk manual
Fixes [YOCTO #11630]

The section on the devtool workflow in the dev-manual was 99%
identical to what was in the sdk-manual.  I have moved the
workflow procedure from the old "Model" chapter of the dev-manual
to be merged with what was in the sdk-manual.  In truth, the
only things added were a note about devtool not being exclusive
to SDK development.

The result of moving (deleting) this section was that the "model"
chapter of the dev-manual went away.  The devtool stuff, Quilt,
devshell, and python shell are all out now and there is no
chapter left.  So, mega-manual had to be adjusted to not pull that
chapter in when building the dev-manual.  I had to delete three
figures that were used in the flow.  The figures were already
replicated in the sdk-manual.  The figures were deleted from the
figures folder of both the dev-manual and the mega-manual.

I had to make sure all references to the old devtool stuf in the
YP doc set were adjusted.

(From yocto-docs rev: 5dbd643d31ab502df53a22229e457a03da7772b7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
b15a65b8ea dev-manual: Moved devshell and python shell workflow sections.
Fixes [YOCTO #11630]

These two sections can stand alone as tasks.  I moved them to the
"Common Tasks" chapter.

(From yocto-docs rev: 60c810a9682f8a110fe7c7e4d0d40583a7d72735)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
81add6e460 dev-manual: Moved "Using Quilt in Your Workflow" to tasks
Fixes [YOCTO #11630]

The section on useing Quilt can be a stand-alone task.  I moved
it to the "Common Tasks" chapter.

(From yocto-docs rev: bb84b88fc8fc7f82e7bbe580d408ae7880f38d8b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
b171aea836 dev-manual: Moved "Finding Temporary Source Code"
Fixes [YOCTO #11630]

This section can stand as a separate task.  I have moved it to the
Common Tasks chapter.

(From yocto-docs rev: e4fb1ce8b160528aae0f192add614a595b2560a3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
925f2b2fc2 kernel-dev: Formatting and cleanup for "Other Resources"
Some general cleanup and formatting.

(From yocto-docs rev: 8d4458f8fbe02cb8bfa78cbf18726cdd8126850a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
431ceaea6c kernel-dev, dev-manual: Moved Kernel workflow section to kernel-dev
Fixes [YOCTO #11630]

The overview section of modifying the kernel needed to be in the
kernel-dev manual and not in the dev-manual.  I moved it and took
care of all the links and external references throughout the YP
doc set.  One figure was involved that had to be moved to the figures
folder in kernel-dev from dev-manual.  That is why the Makefile had
to be edited.

(From yocto-docs rev: 3a704b64544678785b883f82d6e82aedac6790c5)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Kristi Rifenbark
1d60050201 yocto-project-qs: Updated poky and meta-intel examples.
Fixes [YOCTO #11731]

Updated examples to so they checkout by tag rather
than by branch name.

(From yocto-docs rev: 9dca9fdc315998612f4cd5c9c69e2b3e045562ad)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Kristi Rifenbark
cb91fec7af poky.ent: Added three new variables
New variable: METAINTELVERSION and META_INTEL_REL_TAG
and DISTRO_REL_TAG

(From yocto-docs rev: f8be6ea137df9b5964e2cc3fed43cda39a3d27ec)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
b643938bde dev-manual, kernel-dev: Moved the kernel build hierarchy section
Fixes [YOCTO #11630]

The section that presented the Yocto Linux kernel file structure
resulting from a build using BitBake needed to be in the kernel-dev
manual.  I moved it over.  This required transferring over a
figure as well.

(From yocto-docs rev: 0abc6c7d87a6aa10dac28fefbb280eb51fea61a7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:15 +01:00
Scott Rifenbark
0e92314239 kernel-dev: Re-write of Yocto Linux Architecture and Branch Strategies
This section in Appepndix A was full of redundancies used to
explain how the Yocto Project kernel development team has set
up branching and kernel architecture.  I consolidated a couple
sub-sections into just the necessary single section.

(From yocto-docs rev: e42efe28aec6bad3779c4b9ea58941272fb01651)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
39e61c9ad9 kernel-dev: Inserted section on Git as a relavent note
Appendix A of the kernel-dev had a subsection dedicated to just
saying Git was the SCM used by the YP team for development.  Having
this information in a dedicated section was overkill.  The information
is better as an "aside".  I put the stuff in a note.

(From yocto-docs rev: 7e28686f946188daaf0480d4cd68e0e8ff854d37)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
64f0f60b3f dev-manual, kernel-dev: Moved kernel branch concepts to kernel-dev
Fixes [YOCTO #11630]

The information in the dev-manual kernel overview area really neeeds
to be in the Appendix on kernel structure in the kernel-dev manual.
I moved that informtaion to the appendix.  Removal of one redundant
image was necessary from the dev-manual.  The figure was literally
repeated in the kernel manual already under a different file name.

(From yocto-docs rev: 00ca68e760e41448c225fb1ca4a77f5201434b93)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
bdeb6db2fb kernel-dev, dev-manual: Moved Yocto Linux kernel overview
Fixes [YOCTO #11630]

I took the Yocto Linux kernel overview list of kernels out of the
dev-manual and moved them to the "Yocto Project Kernel Development
and Maintenance" section in Appendix A of the kernel-dev manual.
This is a much more logical area to introduce this type of Yocto
Linux kernel information.

(From yocto-docs rev: 0a5154cb4c23697f2b8e2341c8e1dc07362443d2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
7d2d54683c dev-manual: Removed Toaster development flow
Fixes [YOCTO #11630]

Took the small reference section out for developing an image
using toaster.  This was just a pointer to the toaster manual.

(From yocto-docs rev: 8dcce4411aaa5d1d8fe2c809166a947d0e38a97b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
fbdb36a568 dev-manual: Removed SDK workflow section
Fixes [YOCTO #11630]

This section simply pointed to the SDK manual.  Does not
need to be in the new "how-to" form of the dev-manual.

(From yocto-docs rev: 1cd842a323ba09ef69e14f56dca1c2a5576252ee)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
b9430113c6 dev-manual: Clarifications for files in checkout out by tag
I put in some edits to be very clear on the state of the files
for the user when they check out by tag.

(From yocto-docs rev: 622d324e7f167f55a5de86ec7af65d7554f2aec8)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
1b2d89737f dev-manual: Added branch clarification to checking out poky
Re-wordings to be clear about what the user is getting when
they check out a development branch of an upstream repository.

(From yocto-docs rev: deb6ecfd35a76760bc2270bbbc69aa232b0c8cc7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
95547dab77 dev-manual: Wording updates "Cloning the poky Repository"
Clarified wording so reader understands they are checking
out the master branch by default.

(From yocto-docs rev: d1e77fff752d9960120340601bc2520c51c4f073)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
f384aa0c70 dev-manual: Lead-ins for "Using the Downloads Page" procedure
Manual style dictates use of bold lead-ins for a numbered list.

(From yocto-docs rev: 32469dc0d61d755d0119a0374070221b0bd4bdfb)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
057adefbf0 dev-manual: Bold lead-ins for "Accessing Index of Releases"
Manual list style requires steps to have bold lead-ins.

(From yocto-docs rev: 2d226cf6710853f7be8f0c3bd8b1eea72cb4eb7f)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
e3fd3ca235 dev-manual: Added bold lead-ins for "Accessing Source Repositories"
Formatting style need bold lead-ins for steps.

(From yocto-docs rev: b75337188e2346dd40004e22b45a2975f1d4cff3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
56b3c79a3e bsp-guide: Minor introduction rewrite and formatting BSP workflow.
(From yocto-docs rev: 697d8ce39a122a33faebf1ab66b6bb16bfab5986)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
a8c8680f84 dev-manual, bsp-guide: Moved BSP development workflow section
Fixes [YOCTO #11630]

Moved the section on BSP Development workflow from the dev-manual
into the bsp-guide.  This procedure needs to live in the BSP
guide.

Many links had to be fixed.

(From yocto-docs rev: fbf06240f83221929aea237660146e0076207f6a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
d552379be3 dev-manual: Moved the "Flashing Images using bmaptool" section.
Fixes [YOCTO #11630]

Moved this section from the "Getting Started with the Yocto
Project" section.  The topic is not really a getting started
topic.  It is better suited in the "Common Tasks" chapter.

(From yocto-docs rev: d6cdade9066bdbce0596672978c178d2ec82c9a4)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
15a41d25e9 dev-manual: Updated "Building Images" section
Fixes [YOCTO #11630]

I re-wrote the "Building Images" section into a "Performing
a Simple Build" section.  A single link in the common tasks
chapter was affected by the section name change.

(From yocto-docs rev: de5a4cfa4f63538fe0a5ec0c2aacfb9222b70c4b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
b7356ec7f9 dev-manual: Fixed poor cross-reference
Was referencing the "Building Images" section when should have
been referencing the "Images" section in the ref-manual.

(From yocto-docs rev: 7340b358d57c110240e75c1164226144065120b7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:14 +01:00
Scott Rifenbark
ba6887404a documentation: Re-write of dev-manual setup chapter
Fixes [YOCTO #11630]

The chapter on setting up YP has been completely re-written to
move towards a "how-to" manual.  This involved touching every
aspect of the chapter.  All subsections now have procedures
surrounding set up stuff.  There are some development sections that
still need fleshed out.

Many, many links and references in other chapters were affected.
These have been fixed.

A couple style-sheet (*.css) files were also updated to support the
"writernotes" style, which renders paragraph text in red.

(From yocto-docs rev: c4c2a6cf575ce5c783b1cc84d9f7e961aebef49c)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
ed25d7df9c dev-manual, ref-manual: Added procedure for Downloads page
Fixes [YOCTO #11630]

Added a new procedure section for using the Downloads page from
the YP website.

(From yocto-docs rev: 7efb29dfa7a0960710ca7cf3983048f166c6a13f)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
534a614312 ref-manual: Added style "writernotes" to *.css stylesheet.
This addition allows an author to use the following form to
highlight a paragraph in red.

   <para role="writernotes">
   Blah Blah Blah
   </para>

(From yocto-docs rev: 40d646229e5ec9fa905a372be795120449f9f9dd)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
576af718e6 dev-manual, ref-manual: Added section on index of releases procedure
Fixes [YOCTO #11630]

I have added a new procedure on using the Index of Releases area
to get snapshots of various tarballs.  I recommend that is not
the way you usually want to get files as using Git is recommended.
The section exists for completeness.

In the ref-manual, I cross-reference the procedures from the
associated conceptual areas.

(From yocto-docs rev: 812f344966966591d883fbebb4ae1f72c11dd483)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
5cbd459c64 ref-manual: Fixed spelling error.
(From yocto-docs rev: 8dc9623efec7624b137055d21762aeb0c1b36562)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
8ee16983cb dev-manual, ref-manual: New section on viewing GUI YP repositories
Fixes [YOCTO #11630]

I created a new procedure for locating and viewing YP source
repositories using the GUI-based method.  Created an anchor in the
ref-manual so I could reference the 'git clone' command.

(From yocto-docs rev: 2ae28682407039420f4fcca71a298e1dd34c81f0)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
d3a0e0abc1 dev-manual, ref-manual: Established section on YP source files
Fixes [YOCTO #11630]

To move toward a "how-to" dev-manual, I am consolidating procedures
for locating and establishing local copies of YP source files into
a single heading.  I set up a "Working With Yocto Project Source
Files" section.  This will contain sub-sections to find the various
areas of YP files and how to clone and check out stuff.

(From yocto-docs rev: 87ff4ee41a50e8aed6b9c5402c51bb47f5a252a3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Scott Rifenbark
0f00914578 documentation: Reorganized YP introduction material.
This material was being replicated across the Quick Start,
dev-manual, and ref-manual.  I have created a single point in the
ref-manual that collects the disparate information that existed.

I deleted the entire section in the dev-manual since that book
is converting to a procedure manual and the very front of the manual
adequately mentions YP and provides pointers to where the user can
get more information.

The QS provides a more complete introduction of YP since it is a
QS.

(From yocto-docs rev: bd8093417af2d93556410d5482dad32c11a0a964)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Kristi Rifenbark
d6c3c579d0 dev-manual: Updated Using RPM example
Fixes [YOCTO #11699]

Configuration example didn't work with "" around
baseurl. Removed "".

(From yocto-docs rev: c40d818fb92904b74e677749ee16c52716dd02a9)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-12 00:28:13 +01:00
Robert Yang
1501ab0c6e libiconv: remove 0001-Fix-link-error-when-compiling-with-gcc-O0.patch
The recipe and patches (including this patch) had been moved into meta-mingw,
this dangling patch is useless here, so should be removed.

(From OE-Core rev: b1c4661742d12cfd444043e597d01bd627ee4ca4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-11 15:57:08 +01:00
Jussi Kukkonen
6fd50a6392 mesa: Split --with-platforms from egl PACKAGECONFIG
Mesa platforms no longer depend directly on egl. Current
implementation breaks without egl with x11 (which can happen with
mesa-gl).

Separate the platform selection. Make drm platform depend on gbm
PACKAGECONFIG by default.

(From OE-Core rev: 622d683273bab66f0b4dd385d083bff9fb7bb1de)

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>
2017-07-11 15:57:08 +01:00
Khem Raj
0a672a7408 mpeg2dec: Fix textrels QA errors on arm
Fixes
WARNING: mpeg2dec-0.5.1-r0 do_package_qa: QA Issue: ELF binary '/mnt/a/oe/build/tmp/work/armv5te-bec-linux-musleabi/mpeg2dec/0.5.1-r0/packages-split/libmpeg2/usr/lib/libmpeg2.so.0.1.0' has relocations in .text [textrel]

(From OE-Core rev: bbcc5322d3d0eb9e87e78ec47e71e29860af39d7)

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-07-11 15:57:08 +01:00
Khem Raj
23df57b150 valgrind: tests build fixes for musl
x86/aarch64 needed minor changes to make few testcases portable

(From OE-Core rev: 459907cd548b97e50b26036e6898d32685cee01e)

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-07-11 15:57:08 +01:00
Khem Raj
155cff6c9e world-broken.inc: Remove packages which are now buildable on musl
Delete the pinnings which are no longer required during world builds
becasue they have been fixed to build on musl

(From OE-Core rev: b82bc7f003d2133e818be5bd473e9c640d4b10bf)

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-07-11 15:57:08 +01:00
Khem Raj
c08247e3c7 gcc: Fix libssh_nonshared linker specs for ppc/musl
The change to link libssp_nonshared.a only for musl was to move
spec file changes to config/linux.h under a conditional when
DEFAULT_LIBC == LIBC_MUSL which worked fine for all but ppc
since gcc for ppc provided its own linux.h overrides which are
used. This patch duplicates the change in those headers too

(From OE-Core rev: 9d39168a6acfa1f289a4448271c0bf9caaea10ec)

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-07-11 15:57:08 +01:00
Khem Raj
2a44efbe83 musl: Update to latest on master
Bring in following changes

* fix missing volatile qualifier on lock in __get_locale
* remove ineffective compiler assist from printf
* fix undefined behavior in ptrace
* unify the use of FUTEX_PRIVATE
* fix undefined behavior in free
* reapply va_arg hacks removal to wprintf
* remove useless declarations in string.h
* allow specifying argv[0] when invoking a program via ldso command
* fix regression in dlopen promotion from RTLD_LOCAL to RTLD_GLOBAL
* ldso: avoid spurious & possible erroneous work for libs with no deps
* powerpc64: add single-instruction math functions
* fix clang CFLAGS checks and silence unused argument warnings
* s390x: add single-instruction math functions
* fix arm run-time abi string functions
* fix regression in getspnam[_r] error code for insufficient buffer size
* fix omission of microblaze user.h definitions
* fix iconv conversions for iso88592-iso885916
* handle errors from localtime_r in ctime_r
* set errno when getpw*_r, getgr*_r, and getspnam_r fail
* handle localtime errors in ctime
* handle mremap failure in realloc of mmap-serviced allocations
* getdate: correctly specify error number
* catopen: set errno to EOPNOTSUPP
* fix glob failure to match plain "/" to root directory
* use hard-coded sh4a atomic opcodes to avoid linker errors on sh

(From OE-Core rev: 1e109651acd53b8bad5bc2ccdf152d747a91f1ac)

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-07-11 15:57:08 +01:00
Khem Raj
fee85d51a8 gcc: Use ucontext_t instead of ucontext
glibc 2.26 does not expose struct ucontext anymore

(From OE-Core rev: d70b9705b7997786bc95cf6e70c172470db3413c)

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-07-11 15:57:08 +01:00
Khem Raj
8cf9059862 gcc-sanitizer: Fix build with glibc 2.26
sigaltstack is no more exposed by glibc see (bug 21517)
therefore adjust to use stack_t instead

Use res_state typedef instead of referring to __res_state struct

(From OE-Core rev: c5cb3a582531dd1b9c40df5bcaa6f8bf5b451a54)

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-07-11 15:57:08 +01:00
Khem Raj
16cb2a0764 glibc: Enable obsoleted nsl
libnsl has been obsoleted in 2.26 and will be removed in future
until them we enable it

(From OE-Core rev: e8047c772f49fe5a4a18d54289d98fb2f98a8176)

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-07-11 15:57:08 +01:00
Khem Raj
8281a70d9b glibc: Drop obsoleted bits/string.h from multilibbing
glibc 2.26 has dropped bits/string.h

(From OE-Core rev: 81da4f6f12744fd051510a4df4eaeac73c232469)

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-07-11 15:57:08 +01:00
Khem Raj
1f4f343ff2 glibc: Upgrade to 2.25.90
Eventually it will be released as 2.26 final

(From OE-Core rev: 5a58883258206893d15990953c8691b05473eecb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-11 15:57:08 +01:00
Jussi Kukkonen
715b05e9e1 piglit: Update to current git master
Update, remove backported patches.

(From OE-Core rev: 6733936c432a4e73c8dc63099c6abf7e393a1f93)

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>
2017-07-11 15:57:08 +01:00
Richard Purdie
854c8c2e4c oeqa/tinfoil: Improve test_wait_event for race issues
The test could break in a variety of ways:

a) If BB_HEARTBEAT_EVENT was less than ~0.25 it would hang indefinitely
b) The mask is set after draining the event queue meaning a heartbeat event
   could have happened
c) The test exits once it sees the events it wants, it doesn't check for
   spurious events such as heartbeats which shouldn't have occured.
d) The hardcoded delay of 0.25 is nasty and shouldn't be needed.

I found a bitbake bug and fixed that meaning we don't need the delay any
more which fixes d). That means a) is no longer an issue either.

We now set the mask, then drain the queue meaning no spurious events should
be able to sneak in. The test is also tweaked to wait for 5s in total to
ensure spurious events don't occur such as heartbeat events we shouldn't see.

[YOCTO #11045]

(From OE-Core rev: 7dd5dfc4d56f1201110d947ce1ca3c6d64fbc7da)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Richard Purdie
af950e2c09 staging: Ensure a clean recipe sysroot removes addto_recipe_sysroot stamps
The commands:

bitbake nodejs-native;
bitbake nodejs-native -c clean;
bitbake nodejs-native;
bitbake -c addto_recipe_sysroot nodejs-native;
bitbake -c devshell nodejs-native;
bitbake -c addto_recipe_sysroot nodejs-native;
bitbake -c devshell nodejs-native;

never result in npm in the sysroot within devshell. The reason is the
addto_recipe_sysroot stamp isn't removed when do_fetch is run but the sysroot
is cleaned.

With this patch, the second devshell will contain npm, which I think is probably
the best outcome we can hope for here.

[YOCTO #11461]

(From OE-Core rev: c440298674ab3b960c83a127eedb9e1b66bddf78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Jose Perez Carranza
aac343acc0 oeqa/sdk: Replace buildiptables for buildlzip tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

[YOCTO #11713]

(From OE-Core rev: b798284f62b3cb171373716b1ee84403439314aa)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Khem Raj
3df1c95ba7 testimage: Use the renamed buildlzip
buildiptables has been replaced with buildlzip

(From OE-Core rev: 57cd682e05f82b63090b0cbb4a1d8feb3bfbff23)

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-07-08 13:34:46 +01:00
Jose Perez Carranza
37e0cd0e91 oeqa/runtime: Replace buildiptables for buildlzip on runtime tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

This patch is applicable for testimage tests

[YOCTO # 11713]

(From OE-Core rev: 41683e0ab316049e28b1f4ceaf39f0fe17722d92)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Andre McCurdy
72bdc49547 mirrors.bbclass: remove stale lsof ftp mirrors
Replace with an mapping for http://www.mirrorservice.org to align
with recent changes to SRC_URI in the lsof recipe and allow
non-current lsof tar files to be found in the /OLD subdirectory.

(From OE-Core rev: 2ea075ffd6a4d68be546f0c10fc94f7a27e8f761)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Andre McCurdy
3b9b16bd53 lsof: update SRC_URI
Upstream lsof releases are hosted on an ftp server which times out
download attempts from hosts for which it can not perform a DNS
reverse-lookup. See:

  https://people.freebsd.org/~abe/

http://www.mirrorservice.org seems to be the most commonly used
alternative (and using it for SRC_URI allows the custom
UPSTREAM_CHECK_URI to be removed).

(From OE-Core rev: 4e718242c1554021689a7946add055b22b81ec42)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Andre McCurdy
056923b2d9 lsof: minor recipe cleanup
- Add HOMEPAGE
  - Remove ${S} from LIC_FILES_CHKSUM path
  - Use tabs consistently to indent do_configure()
  - Re-order LIC_FILES_CHKSUM definition to follow OE style guide

(From OE-Core rev: 78701c5b873605240226c502de3b940097433596)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Leonardo Sandoval
9bf53388ad image_types: fix kernel target on elf's image dependencies
Kernel recipes provides 'virtual/kernel' so remove the native part.

(From OE-Core rev: 50e6f23ef1e304c335d44e3e8e7a6cfa5a93fa86)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Ming Liu
59ec03c5bc linuxloader.bbclass: add musl libc support
Current linuxloader.bbclass does not support musl libc ldso, so add it
in.

After changing, now the linuxloader function will call a subfunction
according to which virtual/libc is being used, glibc or musl, the
linuxloader_musl function is made on top of the LDSO macro defined
in musl source, by mapping related OE variables to it.

Change tested on following machines:
"genericx86"
"genericx86-64"
"beaglebone"
"qemumips64"
"qemuarm64"
"mpc8315e-rdb"
"edgerouter"
"qemumips"
"kc705-microblazeel" - meta-xilinx
"qemuppc"

(From OE-Core rev: 5d4acaed81a811912e60d85c507bee819623369e)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Jussi Kukkonen
85a891e8e7 vulkan: RRECOMMEND mesa drivers
One less thing to remember when trying to build an image
with working vulkan.

(From OE-Core rev: 0fc904749f45bd7d679233cced9d5a155afac421)

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>
2017-07-08 13:34:46 +01:00
Jussi Kukkonen
5da100c4eb mesa, gstreamer: Add "vulkan" DISTRO_FEATURE
It doesn't do much but does make enabling vulkan a little less fiddly.

(From OE-Core rev: a5ed54e5253006ce3a5a74c1243c949a42642ff7)

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>
2017-07-08 13:34:46 +01:00
Jussi Kukkonen
4a51d254cf gstreamer1.0-plugins-bad: Add vulkan PACKAGECONFIG
This adds a Vulkan video sink (using xcb and/or wayland).

Add a few patches to fix the build.

(From OE-Core rev: a80a0b3981d129a945ddd775690963cefa15376a)

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>
2017-07-08 13:34:46 +01:00
Jussi Kukkonen
5e4845d15e assimp: Add as dependency of vulkan-demos
Asset import library used by Sascha Willems Vulkan demos.

(From OE-Core rev: d3f7a18c8119c22b5120fc618396548259a012e7)

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>
2017-07-08 13:34:46 +01:00
Jussi Kukkonen
d18c434487 vulkan: Upgrade 1.0.39.1 -> 1.0.51.0
Remove a patch that's no longer needed

(From OE-Core rev: da21b51ec84080b5e544b197e7fb49cb91642a31)

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>
2017-07-08 13:34:46 +01:00
sweeaun
0224083dae perl: Support musl-x32 build
Existing musl fixups in perl recipe doesn't cover linux-muslx32.
This is fixed to support musl-x32 build.

(From OE-Core rev: 4a50250edb48510fa6382b2700a39a74847d287b)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
sweeaun
4e0b857484 grub-efi: Support musl-x32
To build 64-bit binaries for musl-x32.

(From OE-Core rev: 28cd7c5a5cd0567439146eaa30c45301e76b71b6)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
sweeaun
58b64cbc7c gnu-efi: Support musl-x32 build
To build 64-bit binaries for musl-x32.

(From OE-Core rev: a9301cbc90a61b54f99f321934f421d432ec8826)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
sweeaun
0d5488b0bf siteinfo.bbclass: Support musl-x32
Modified targetinfo and osinfo to support musl-x32.

(From OE-Core rev: 94ed793a704dadf55481305b6ed49ae3f3e1fc66)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
sweeaun
f33627f30b insane.bbclass: Support musl-x32
Added musl-x32 elf header into dictionary.

(From OE-Core rev: 305e2b3b3de1af0001d534e5c9ec126481dfd9dd)

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Otavio Salvador
4f93b8528b mesa: etnaviv: fix shader miscompilation with more than 16 labels
The labels array may change its virtual address on a reallocation, so
it is invalid to cache pointers into the array. Rather than using the
pointer directly, remember the array index.

Fixes miscompilation of shaders in glmark2 ideas, leading to GPU hangs.

This is a backport from 17.1.5.

(From OE-Core rev: 7a0ababb9f5c7f09bf072412e0744dcf69534129)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
103c122214 ovmf: Fix build with toolchain defaulting to PIE
GCC44_IA32_X64_DLINK_COMMON and GCC49_IA32_X64_DLINK_COMMON
variables add to final linker flags that ovmf build forms
on its own, so trying to inject it from environment will not
work.

Here we add option to disable pie during linking, which should
have been accompanied with correcponding gcc/cflags.

Fixes

|   /mnt/a/oe/build/tmp/work/i586-bec-linux/ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Facs.dll: Bad definition for symbol '<unknown>'@0 or unsupported symbol type.  For example, absolute and undefined symbols are not supported.

(From OE-Core rev: 85476cdb19d5c383966ba753a71eaeb3622bd6b4)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
fd4ed9a464 security_flags.inc: Do not build gcc for powerpc with PIE defaults
Since we have disabled FPIE from SECURITY_CFLAGS already, we have
to ensure the same with gcc, otherwise gcc (on-device) will be built
defaulting to PIE, and such binaries will fail to execute

(From OE-Core rev: 4f3a9ccdb1d45804f4c094589e69e0bc87dc9c62)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
f2eb3d8068 gstreamer1.0-plugins-bad: Fix missing library with bcm egl
userland graphics driver provided libegl for rpi depends upon
symbols from vchostif library, therefore add it to linker cmdline

helps with loadng gst-gl plugins on rpi

(From OE-Core rev: c32dbe73f2089177a071ba81a9de82dac7741e44)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
1504f8f09b libunwind: We set -fPIE in security flags now if gcc is not configured for default PIE
(From OE-Core rev: 24755afceb38530215a59d53f37df31ca77b0b6e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
25018c4807 sysklogd: Improve build and fix runtime crash
Patch the makefile so it can respect flags from environment
add a patch to fix a run time crash

(From OE-Core rev: 39c00c7c42fe7e555eb65ea7c01bfc9cb8a34514)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
dc3b3a8df3 gcc: Link libssp_nonshared.a only on musl targets
glibc already provides the content for libssp_nonshared
in libc_nonshared.a therefore we dont need to make it
universal.

This also fixed build issues on glibc when linking statically
and using -fstack-protector

Fixed errors like
/mnt/a/oe/build/tmp/work/i586-bec-linux/aufs-util/3.14+gitAUTOINC+bdfcc0dcfc-r0/recipe-sysroot/usr/lib/../lib/libc.a(stack_chk_fail.o): In function `__stack_chk_fail':                                                                       /usr/src/debug/glibc/2.26-r0/git/debug/stack_chk_fail.c:27: multiple definition of `__stack_chk_fail_local'                                                                                                                                   /mnt/a/oe/build/tmp/work/i586-bec-linux/aufs-util/3.14+gitAUTOINC+bdfcc0dcfc-r0/recipe-sysroot/usr/lib/../lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):/usr/src/debug/gcc-runtime/7.1.0-r0/gcc-7.1.0/build.i586-bec-linux.i586-bec-linux/i586-bec-linux/libssp/../../../../../../../../work-shared/gcc-7.1.0-r0/gcc-7.1.0/libssp/ssp-local.c:47: first defined here                                                                                                              collect2: error: ld returned 1 exit status

(From OE-Core rev: d71eba26850838b2878efea3f8c392a2eb2ebbfb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
fb3be142ce gcc7: Enable static PIE
(From OE-Core rev: 85557ab7bac7db80174205b7969965b7a6bece24)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
9deacd7f9e distutils,setuptools: Delete use of SECURITY_NO_PIE_CFLAGS
gcc can handle PIE in gcc driver

(From OE-Core rev: fcfe6d4ab4460f8358e13023022a5e909941ca93)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
6733a7873c security_flags.inc: Delete pinnings for SECURITY_NO_PIE_CFLAGS
GCC is configured correctly to pass PIE cflags/ldflags

(From OE-Core rev: e93765ffb5718b0fce84f0b8123963176dea95e4)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Khem Raj
c91314ec16 gcc: Introduce a knob to configure gcc to default to PIE
GCCPIE flag which is empty by default adds "--enable-default-pie"
configure option for harderned distros

We do not require to add -fpie -pie flag externally anymore

(From OE-Core rev: 1c7e195c94764d680a12a49b870f04cd58860f81)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Richard Purdie
a12d9164ea base: Add MultiConfigParsed handler to deal with unstable build signatures
This uses the newly added MultiConfigParsed event to handle problems where
checksums in multiconfig build were not fuctioning as expected.

The issue arises around SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS which contains
entries like:

* gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc
* gcc-cross-${TARGET_ARCH}->linux-libc-headers

These need to be expanded in the multiconfig data store but then placed
into the shared main datastore used by the siggen code. The only other
alternative would be a siggen instance for each multiconfig however that
seemed even more complex and invasive.

In real world usage, this issue would mean a qemux86 base config with
other armv5 and armv7 configs (e.g. beaglebone and qemuarm) would
try and build gcc-cross twice since dependencies normaly excluded
(e.g. linux-libc-headers) would now be included. This breaks sstate reuse
as well as breaking builds unless separate tmpdirs are used.

This patch adds all the entries for each multiconfig. Whilst there may
be duplicates, this shouldn't be an issue.

(From OE-Core rev: 7267e7c000c76c44d09835d4cd2bc485b6a39a2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:45 +01:00
Richard Purdie
f88652d284 bitbake: knotty: Drop task prefix of PLAIN log messages
To quote Paul:

Not that long ago we added a prefix to logged messages to allow us to see
where the message has been generated (recipe / task). This is undoubtedly
useful for errors and warnings, however, I'm not sure it's really appropriate
for bb.plain(). As an example, see the output for -c listtasks now:

...
NOTE: Executing RunQueue Tasks
nodejs-native-4.5.0-r0 do_listtasks: do_addto_recipe_sysroot
nodejs-native-4.5.0-r0 do_listtasks: do_build                      Default task for a recipe - depends on all other normal tasks required to 'build' a recipe
nodejs-native-4.5.0-r0 do_listtasks: do_checklicense
nodejs-native-4.5.0-r0 do_listtasks: do_checklicenseall
nodejs-native-4.5.0-r0 do_listtasks: do_checkpkg
...

This patch excludes PLAIN messages from this prefixing making the log output
neater.

[YOCTO #11457]

(Bitbake rev: 4a14b44b3e4fad3a3e5e53461aa8ba9929a515b8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Enrico Scholz
a9d02d0ee2 bitbake: BBHandler: Remove old style bb.data.setVar() syntax usage
Fixes

         except bb.parse.SkipRecipe:
    >        bb.data.setVar("__SKIPPED", True, d)
             if include == 0:
AttributeError: module 'bb.data' has no attribute 'setVar'

(Bitbake rev: d43e97226dc7f53592c06a528f20390b68dc854f)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Richard Purdie
3c602dd4a5 bitbake: server/xmlrpc: Add Heartbeat event support
When heartbeat event support was added it was only added to process.py. Add
it to server/xmlrpc too. There is duplicated code however since we're likely
to combine the server abstractions soon its not worth worrying about now.

This ensures the backends have the same event support.

[YOCTO #10741]

(Bitbake rev: 00bf2e60222767b4dee84fb3f958732a83544e80)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Richard Purdie
35846a3961 bitbake: event: Queue offline events for the UI
Messages printed when no UI is connected (e.g. memres) are currently lost.
Use the existing queue mechanism to queue these until a UI attaches, then
replay them. This isn't ideal but better than the current situation of
losing them entirely.

(Bitbake rev: cb241fb8544dfb05646dbae1a1b04e17878a466c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Richard Purdie
9245c3b87f bitbake: server/process: Fix waitEvent() calls with 0 timeout
You might think Queue.Queue.get(True, 0) would return an event immediately
if present and otherwise return. It doesn't, it immediately "times out"
and returns with nothing from the queue.

The behaviour we want is not to wait but return anything present which is
what .get(False) does so map to this.

This fixes some odd behaviour observed in some of the tinfoil selftests.

(Bitbake rev: 412bfab8721ea317898a1974f6a7a0d0bea763df)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Richard Purdie
fe40092afb bitbake: data: Micro performance optimisation tweak
The datastore can assume internal API, this just removes the function indirection
overhead involved in this very common codepath (800,000 calls in parsing OE-Core).

(Bitbake rev: 9a36531ed2b2881a65e5d39ee4b68d2bb392ed78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Richard Purdie
f85f1ef24e bitbake: cooker: Use multiple BuildStarted events for multiconfig
Currently builds in multiple TMPDIRs with multiconfig can break
since the BuildStarted event is used to create directory strutures in several
cases (e.g. buildstats.bbclass) and there is only on BuildStarted event
generated in a multiconfig build.

We have two options, a) to add a new MultiConfigBuildStarted event which is
generated once per multiconfig, or b) allow multiple BuildStarted events.

Having reviewed the code and current users of BuildStarted, sending one event
per multiconfig seems like its the best way forward and the existing code looks
able to cope with the duplication of events. I did also check toaster and I think
that can handle this issue too (multiconfig builds may have other issues there).

I'm therefore proposing we send multiple BuildStarted events for multiconfig
and for consistency, send multiple BuildCompleted events too.

We need to ensure that BUILDNAME, BUILDSTART and DATE/TIME are set consistently
in all the different multiconfig datastores. These events can write to the
datastore so copies are not used. buildFile was also cleaned up to ensure it
uses the right datastore in various places.

(Bitbake rev: 0b00f0382780ab5390a5c3f756a9b4efafe0aec8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Richard Purdie
bca4396106 bitbake: bitbake: Add MultiConfigParsed event
There are some cases where the metadata needs to be aware a multiconfig build
is happening and have access to the multiconfig data stores to merge data into
the common build. This adds such an event allowing access to these datastores.

(Bitbake rev: 160e47f5df90850e64dcb857c81a5039abc9235f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:29:54 +01:00
Ming Liu
754c030069 local.conf.sample: drop image-swab reference
The image swabber had been dropped by commit e18657df:
[ meta: Drop swabber ]

We need also drop its reference in local.conf.

(From meta-yocto rev: af19371774b3181af7bdd59e12a16c37d922f429)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 15:03:10 +01:00
Choong YinThong
5b23e19841 linux-yocto-custom: include a user feature description file
Missing user feature description file
when select linux-yocto-custom in script/yocto-bsp
and causes failure in script/yocto-kernel feature add.

[YOCTO #11585]

(From meta-yocto rev: 9939e7eacf8a205fb0b10de8a6cc065a8048b103)

Signed-off-by: Choong YinThong <yin.thong.choong@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 15:03:10 +01:00
Amarnath Valluri
96e3848ba0 image.bbclass: create root symlinks in nativesdk target sysroot
To match with the target image, the generated nativesdk's target sysroot also
should have the root symlinks(/lib*, /bin/, /sbin). So, extended the
'create_merged_usr_symlinks' to reuse symlink creation part even for nativesdk
using POPULATE_SDK_PRE_TARGET_COMMAND.

(From OE-Core rev: 2d7a58ef7a9597fde868a0582153d1f9a3007f1e)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Amarnath Valluri
2ea87f74da insane.bbclass: Add package QA check for merged /usr.
This check makes sure that, when usrmerge distro feature enabled, no package
installs files to root (/bin, /sbin, /lib, /lib64) folders.

(From OE-Core rev: 9f52f9f60f5680d7a824dafb3334de624eceed4c)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Amarnath Valluri
66cf94e740 image: create symlinks needed for merged /usr
Prepare the symlinks required for merged /usr at the time of rootfs creation.

The links created in rootfs are:
/bin --> /usr/sbin
/sbin --> /usr/sbin
/lib --> /usr/lib
/lib64 --> /usr/lib64

We cannot make these symlinks as part of 'base-files' or some other package.
Because at rootfs creation, installation of the package(say kernel) that depends
on these root folders/links fails, if package manager installs this package
prior to base-files.

These symbolic links in top level folder should be present as long as
 - kernel tools use /lib/{module,firmware}
 - shell scripts uses "#!/bin/sh"

(From OE-Core rev: 3f978f24ae2cf831bd2b82270f6353edda6364a5)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Amarnath Valluri
4525708784 systemd: changes to support merged /usr
- Enable/disable the split-usr support in systemd based on 'usrmerge'
  DISTRO_FEATURE.
- Modify rootprefix to point to ${root_prefix}, rather than ${base_prefix}.
- And fixed firmware path to use ${nonarch_base_libdir} instead of hard-coded
  '/lib', because when 'usrmege' distro feature enabled this path would be
  '/usr/lib'.

(From OE-Core rev: 7ca0415c26d5a8b00716b0a49f069e26fdeac30c)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Amarnath Valluri
d8232565dc cross.bbclass: merged /usr support
Use ${root_prefix} instead of ${base_prefix} while setting
${target_base_prefix}, otherwise we might loose the root prefix configuration
change in case of 'usrmerge' distro feature is enabled.

(From OE-Core rev: 3ebb2da2eb1ff2f6072a2909e0ac71614e0db0bd)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Amarnath Valluri
178e983cf7 bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
A new configuration variable ${root_prefix} added, which shall be used by all
base_{lib,bin,sbin}dir variables. When usrmerge DISTRO_FEATURE is enabled
${root_prefix} points to ${exec_prefix} otherwise to ${base_prefix}

(From OE-Core rev: 700848c6ebd03bf3105d09a41d758883ab875618)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Ross Burton
53abb9fba8 speex: update SRC_URI
The US download mirror appears to be down, so use the main host instead.

(From OE-Core rev: 8766a93c2c9774e53bb7950f8407243ece4ac682)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Dengke Du
3c39739627 avahi-ui: reduce local pending patches
[Yocto #11548]

(From OE-Core rev: 9e18fc1aa4aa0ead854bb4e02eb3af2e7909f597)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Soren Brinkmann
ec9e631f2f mirrors: Add HTTP mirrors for ftp://sourceware.org
(From OE-Core rev: 081c7b3d474461905eda89f77c760f1453a33e44)

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Fathi Boudra
3cb59a3fe5 ltp: add acl, attr, curl and util-linux runtime dependencies
* Use a list and re-order alphabetically to make it easier to read and
  update.
* Add missing runtime dependencies:
  - acl (getfacl/setfacl commands are required)
  - attr (getfattr/setfattr commands are required)
  - iproute2 (required for netns tests)
  - curl (curl command is required)
  - util-linux (ipcs command is required)

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
(From OE-Core rev: a7480beb33e69d7cb63353ffa215326f4ae4b87d)

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Dengke Du
20dcf0c1ef ltp: Reduce local Pending patches
Rebase the patch on latest ltp upstream:

    0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch

[Yocto #11548]

(From OE-Core rev: 69bd27d9d268d4c52aa521a0ceed0eb5a259a516)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Fathi Boudra
b18a0f56ed ltp: syscalls/add_key02: fix for nonempty NULL payload
Add upstream patch to fix syscalls/add_key02 test for nonempty
NULL payload:
25045624e9

(From OE-Core rev: c7c72b73a841c6eadf88428db643e77deb0c0e65)

Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Ricardo Ribalda Delgado
966b113113 libgfortran: Add missing fincludes
ERROR: libgfortran-6.3.0-r0 do_package: QA Issue: libgfortran:
Files/directories were installed but not shipped in any package:
/usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude
/usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude/ieee_features.mod
/usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude/ieee_arithmetic.mod
/usr/lib/gcc/x86_64-poky-linux/6.3.0/finclude/ieee_exceptions.mod

(From OE-Core rev: 753de3328d36b95c029d2946660f80e083823678)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Ricardo Ribalda Delgado
e026eb73dd libgfortran: Add missing dependency gcc-cross
Due to the fact that the recipe uses INHIBIT_DEFAULT_DEPS, we need to
manually add the cross compiler as a dependency.

(From OE-Core rev: 00fba52c8a6f6383137cf89fc7aa34cc3e2ff45f)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:15 +01:00
Khem Raj
e0a924ab3b systemd: Do not use xlocale.h
glibc specific header which has been removed from glibc 2.26+

(From OE-Core rev: 7e562e24ed295a36f3d909f57cef017faf73f093)

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-07-06 14:38:15 +01:00
Otavio Salvador
773d108734 mesa: Upgrade to 17.1.4 release
This includes following upstream bug fixes:

Bug 77240 - khrplatform.h not installed if EGL is disabled
Bug 95530 - Stellaris - colored overlay of sectors doesn't render on i965
Bug 96958 - [SKL] Improper rendering in Europa Universalis IV
Bug 99467 - [radv] DOOM 2016 + wine. Green screen everywhere (but can be started)
Bug 101071 - compiling glsl fails with undefined reference to `pthread_create'
Bug 101252 - eglGetDisplay() is not thread safe
Bug 101294 - radeonsi minecraft forge splash freeze since 17.1
Bug 101451 - [G33] ES2-CTS.functional.clipping.polygon regression

(From OE-Core rev: f0762f5bad36b7d7d93f8f24bc64cdb0c0d36f09)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Otavio Salvador
eee9c4601a mesa: Avoid platform probing when building without EGL
The 17.1.2 release has changed the platform setting and when not
explicitly disabled it assumes x11 support.

Fixes:

| checking for x11-xcb xcb xcb-dri2 >= 1.8 xcb-xfixes... no
| configure: error: Package requirements (x11-xcb xcb xcb-dri2 >= 1.8 xcb-xfixes) were not met:
|
| No package 'x11-xcb' found
| No package 'xcb' found
| No package 'xcb-dri2' found
| No package 'xcb-xfixes' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.
|
| Alternatively, you may set the environment variables XCB_DRI2_CFLAGS
| and XCB_DRI2_LIBS to avoid the need to call pkg-config.
| See the pkg-config man page for more details.

The issue has been exposed by meta-freescale BSP. Fix tested with
imx6qsabresd machine.

(From OE-Core rev: 49c3dad38134857b31152bf76ebf2cd78c8a53c8)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Mikko Ylinen
26fc1f18a6 sanity.bbclass: fix AttributeError in mirror format checks
mirrors is a list after split() and results in:

AttributeError: 'list' object has no attribute 'strip'

when the 'mirror values are pairs' check fails.

(From OE-Core rev: 2b7232f2913cc3c8463f136bad7dd06b690c5141)

Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Peter Kjellerstedt
2d8e3e9120 oe-pkgdata-util: package-info: Allow extra variables to be displayed
By specifying the -e <var> option one or multiple times, extra
variables available in the pkgdata can be displayed, e.,g,
`oe-pkgdata-util package-info -e SUMMARY -e LICENSE ...`. The extra
variables displayed are quoted since some of them may contain
whitespace.

(From OE-Core rev: 6f054fcf08f6d5aeb6b5ade74ac5cc61a99fb8fe)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Dengke Du
47ac0e35d0 expat: upgrade to 2.2.1
The COPYING file in expat has the following changes:

    2001-20016 to 2001-2017

(From OE-Core rev: 7e880775e2e354c76c386c91b2b8f36eddf1574d)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Dengke Du
fcdb2ab8f5 grep: upgrade to 3.1
(From OE-Core rev: 26289550c572ac4a7c06a21354f8dc7bcbd38114)

Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Aníbal Limón
2d84c7a55d classes/populate_sdk_base: Fix SDK manifest generation
The write_{host,target}_sdk_manifest don't need to be set as
SDK_POSTPROCESS_COMMAND because are already append to
POPULATE_SDK_POST_{HOST,TARGET}_COMMAND and the if doesn't
make sense because are only added for populate sdk task.

[YOCTO #11741]

(From OE-Core rev: b10ecbab3acd46e48d36910e30544e9f5f08d6d7)

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-07-06 14:38:14 +01:00
Khem Raj
1542de816c valgrind: Remove -no-pie from cflags
It has been moved to distro security include file

(From OE-Core rev: a071303abd275d7fd967289f58062240c4e6d764)

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-07-06 14:38:14 +01:00
Khem Raj
931430f94c icu: Fix build with glibc 2.26
(From OE-Core rev: 8906f4dd8e47dbe075125767390f4351a81ae571)

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-07-06 14:38:14 +01:00
Khem Raj
d9a1adbb48 epiphany: Fix build errors when compiling with security flags
We need to have some level of optimization level for FORTIFY_SOURCE
to work therefore set --enable-debug=no

Add a patch to fix build error due to unused result of fread

(From OE-Core rev: 8d3bd6fbf748ad6f67bb2e86854d15f99a07bf87)

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-07-06 14:38:14 +01:00
Khem Raj
ca3886ac96 qemu: Replace use of struct ucontext with ucontext_t
(From OE-Core rev: 03b068881cc22d40c63bb23405b37ce9277460f1)

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-07-06 14:38:14 +01:00
Khem Raj
451c4649bb strace: upgrade to 4.17
Fix build with upcoming glibc 2.26

(From OE-Core rev: 8a4a62ae44d6819cda77c96a5106b78a83364fd6)

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-07-06 14:38:14 +01:00
Khem Raj
8dec4ffdd2 valgrind: Fix build with glibc 2.26
(From OE-Core rev: ee5555c81ca2177b088757cde77f1793db31f1f4)

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-07-06 14:38:14 +01:00
Jun Zhu
1b09ea3690 bluez: Correct the timer count for bcm43xx firmware download
bcm43xx failed as time out for firmware downloading.
The root cause is that it need wait 50ms to download firmware,
but the value of 50us is set to the timer.

(From OE-Core rev: bb8bc17ab8d71e3a30e2f0b655c42434dd968ea4)

Signed-off-by: Jun Zhu <junzhu@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Randy MacLeod
5422b0cc38 binutils: update SRCREV to fix powerpc gold link bug
Update to the latest commit on the 2.28 branch to pick up:
   a3e00a8 [GOLD] Avoid duplicate PLT stub symbols on ppc32
along with several backported bug fixes for arm*, etc.

This resolves the systemd link error for qemuppc
with the error message:
   .../powerpc-oe-linux-ld.gold:
   error: invalid STB_LOCAL symbol in external symbols
   error: linker defined: multiple definition of '00000001.plt_call.memcpy+8000'
   command line: previous definition here

described in:

[YOCTO #11696]

(From OE-Core rev: 0d1273cdf8652bf1844f1f1fe4ba0eacd27ada65)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Patrick Ohly
76f149e384 yocto-compat-layer.py: make signature check code reusable
This moves the main content of test_signature into a helper
function. It can be reused by arbitrary tests that need to do
a before/after signature comparison. Long-term this might even
be useful in oeqa itself.

(From OE-Core rev: ecc9a1f9ceec9996aeb2c602846d51277de0b4a5)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Patrick Ohly
17266ae2dd yocto-compat-layer.py: allow README with suffix
It may be useful to append a suffix denoting the file format. For
example, README.rst is rendered differently when viewed on Github, and
also helps editors to switch to a mode more suitable for the format.

The tests uses a file pattern to find the README file(s) and treats
the one with the shortest name as the main one which must not be
empty.

(From OE-Core rev: 501b5b7f338396a4a115355b8a78ae5b03f67d9a)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Patrick Ohly
d58c365a07 yocto-compat-layer.py: add test_world
"test_signatures" ignores wold build breakage for the sake of
reporting differences also when a world build is broken. Therefore we
need a dedicated test that a world build at least theoretically can
proceed without obvious parse time problems (dependencies, parse
errors, dangling .bbappends, etc.).

This is similar to the BSP test_machine_world. The difference is
that test_world doesn't change the MACHINE.

(From OE-Core rev: 1ca35d8571a92c7f8f80c909ca38666da82eb929)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Patrick Ohly
3cdeea61c1 yocto-compat-layer.py: apply test_signatures to all layers
Software layers were previously allowed to change signatures, but
that's not desired for those layers either. The rule that a layer
which is "Yocto Compatible 2.0" must not change signatures unless
explicitly requested holds for all kinds of layers.

However, as this is something that software layers might not be able
to do right away, testing for signature changes in software layers can
be disabled. It's on by default, as that was Richard's
recommendation. Whether that should change needs further discussion as
part of finalizing "Yocto Compatible 2.0".

As it might still change, the tool now has both a with/without
parameter so that users of the tool can choose the desired behavior
without being affected by future changes to the default.

(From OE-Core rev: e7fe215f50a1b75771f33fffdda529a95c026d3f)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Patrick Ohly
afedb883da yocto-compat-layer.py: tolerate broken world builds during signature diff
The "test_signatures" test ignored a broken world build when getting
signatures, but the code which then tried to analyze a difference
found by the test didn't, which prevented printing the difference.

(From OE-Core rev: e8416554dfc9d4196543279a4845f6c0671f3e5c)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
Patrick Ohly
158575af9d yocto-compat-layer.py: avoid adding layers more than once
add_layer_dependencies() might get called more than once, or one of
the layer dependencies might already be present. The function should
not add layers again because doing so can cause warnings like:

  WARNING: Duplicate inclusion for .../meta-openembedded/meta-oe/conf/distro/include/meta_oe_security_flags.inc in .../meta-openembedded/meta-oe/conf/layer.conf

(From OE-Core rev: 4afb7c3c505a4d21906f07f88c966b794a968cbc)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:14 +01:00
susanbian
4c75c1e832 sysstat:11.5.5 -> 11.5.6
Upgrade sysstat from 11.5.5 to 11.5.6.

(From OE-Core rev: 7b8ae7711273e32a187830c7fab493e6fbb065c3)

Signed-off-by: susanbian <bianyq@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Changhyeok Bae
d9cb7e7139 openssl: Upgrade 1.0.2k -> 1.0.2l
1. Dropped obsolete patches, because the new version contains them:
  - fix-cipher-des-ede3-cfb1.patch
  - openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
2. LICENSE checksum change due to copyright years and wording tweak.
3. Test binaries (x86-64) are included in source code. So remove those
only for ptest.

(From OE-Core rev: 64ec18d7e13d310e5e44080a04b3f2181ea96ae3)

Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Jussi Kukkonen
838c5ba5be libepoxy: Upgrade 1.4.2 -> 1.4.3
Imports the current EGL API registry from Khronos.

Makes EGL support optional: this is reflected in the recipe but
egl is enabled by default as before.

(From OE-Core rev: c6b71bc608c66c216a02fafa4781f19cf6f0f465)

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>
2017-07-06 14:38:13 +01:00
Peter Kjellerstedt
cad6482662 gtk+3: Update the patches to work with old versions of patch
The patch "0003-Add-disable-opengl-configure-option.patch" used Git
rename syntax, which is not supported by patch 2.6.x and older.

(From OE-Core rev: 43e640ddcf32c718b3e0bb3f3654ed60eb497058)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Jussi Kukkonen
10356fefcd gtk+3: Upgrade 3.22.15 -> 3.22.16
A fair amount of bug fixes and improvements.

(From OE-Core rev: 5f640236c04132e392237ff254835425c149e1f5)

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>
2017-07-06 14:38:13 +01:00
Jussi Kukkonen
b0823b9bca gtk+3: Update UPSTREAM_CHECK_REGEX
Avoid versions >= 3.90 (development versions for 4.0).

(From OE-Core rev: a50073d933dbadafd6eaef0c2c8ed99bd8de1502)

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>
2017-07-06 14:38:13 +01:00
Maxime Roussin-Bélanger
38641c842c cmake: Use find_program if find_host_program is not available
CMake does not define the `find_host_program` command we've
been using in the cross-compiling code path.  It was
provided by a widely used Android toolchain file.  For
compatibility, continue to use `find_host_program` if
available, but otherwise use just `find_program`.

(From OE-Core rev: e5f4e0df64531e2296bb1f5002eb106c3eec61e3)

Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Ross Burton
43ff2881f1 insane: remove obsolete gcc 4.5 check
As gcc 4.5 is very old now (released in 2010, gcc 4.6 released in 2011)
this check can be removed now.

(From OE-Core rev: 78ea1af6bc5d314781be4a3c2d28347312238115)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Ross Burton
0efe636e39 sanity.bbclass: remove ASSUME_PROVIDED checks that can't succeed
qemu-arm and libsdl-native are not in HOSTTOOLS, so there's no point in
checking that they're on PATH.

Also qemu uses pkg-config to find SDL, so libsdl-native isn't required.

(From OE-Core rev: a8d8b0d9e1c2346d5a314ed0a7bf5be66044a51d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Amarnath Valluri
a4ada62a21 meta/lib/oe/sdk.py: support added for executing pre-target commands
Added a new POPULATE_SDK_PRE_TARGET_COMMAND variable, which can contain
functions need to be executed at pre traget sysroot creation phase.

classes/populate_sdk_base.bbclass: Added POPULATE_SDK_PRE_TARGET_COMMAND to sdk
command variables list.

(From OE-Core rev: b0c65c8a64cd0b77629c9f3c65fc827d4cdcf026)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Saul Wold
7fd1491d2f mkefidsk: fix bash/dash shell quoting problem
mkefidsk currently writes a startup.nsh with embedded control characters.
This happens because \b etc are control sequences to the shell echo
command when using dash. The resulting startup.nsh causes the bootup
to fail, and the user is dropped into the EFI shell to manually run
startup.nsh.

Patch originally provided by Troy D. Hanson <troy.hanson@jhuapl.edu>

[YOCTO #9665]

(From OE-Core rev: 008d6cb5bb4969f53a228893c502be8c9420ecb0)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06 14:38:13 +01:00
Kristi Rifenbark
4b1d270602 bitbake: bitbake-user-manual: Removed and replaced broken link
Fixes [YOCTO #11675]

THere was a "hambedded" link that was broken. The link was
intended to give additional information on adding layers.
Replaced with link about layers and replaced the wording.

(Bitbake rev: 877a1f476212dc151b74ce0f1febdc48956ef0e9)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-04 16:05:22 +01:00
Kristi Rifenbark
7f23cf87b9 bitbake: bitbake-user-manual: Replaced bad link
Fixes [YOCTO #11675]

There was a "hambedded" link that was broken. The link was
intended to show the bitbake.conf file. I replaced it
with the link to show the actual bitbake.conf file.

(Bitbake rev: 3b8d101e564488ff1f5b27744404f9743da2b97d)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-04 16:05:22 +01:00
Ismo Puustinen
98099349e3 bitbake: npm fetcher: fix unknown variable name.
'mirrortarball' is supposed to be a local variable to the function.

(Bitbake rev: a457cbfb1f20a47db3978290921d0708cd96bd70)

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-29 14:33:42 +01:00
Ross Burton
027bdb0560 scripts/contrib/patchreview: add new script
This script analyses the patches we apply and can sanity check or output
statistics.

(From OE-Core rev: de7914954571ea8e717f56b6d6df13157b0973bc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-29 13:01:38 +01:00
Jussi Kukkonen
abc7131777 lz4: Add patch to fix re-builds
Configure fails when rebuilding lz4 as LIBDIR is used in two different
places for two different things and we override it with a environment
variable.

(From OE-Core rev: c594cacc88b4239f2be2ee97ea127ae27186dbcd)

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>
2017-06-28 20:55:09 +01:00
Ming Liu
9c001dc9eb scripts/test-reexec: fix several incomplete regexp
Some "=" are missing in the regexp, which leads it match multiple results
if the variables have overrides, for instance:
...
SSTATE_DIR="xxxx"
SSTATE_DIR_qemux86="yyyy"
...

it will match both of them without "=".

(From OE-Core rev: 10cb4331caee4b960a6f9ad20023a4a4b69b684e)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:09 +01:00
Ming Liu
4a040aa83f scripts/oe-find-native-sysroot: fix a incomplete regexp
A "=" is missing in the regexp, which leads it match multiple results
if STAGING_DIR_NATIVE has overrides, for instance:
...
STAGING_DIR_NATIVE="xxxx"
STAGING_DIR_NATIVE_qemux86="yyyy"
...

it will match both of them without "=".

(From OE-Core rev: fb9cf84b1d537e2b8c26cd78f6ac27c55a7e79fc)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:09 +01:00
Patrick Ohly
8b6fde28e9 runcmd.py: unit testing for runCmd()
This covers the traditional API as well as the new output_log feature.
While testing, it was noticed that killing hanging commands does not
work when a shell is used to run the command(s). This might be worth
fixing.

(From OE-Core rev: 62489e58ca9975f58b48fc2bd8cf27fd22e25564)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:09 +01:00
Patrick Ohly
ea34f20a06 commands.py: live output logging + result.error encoding fix
Tests that use bitbake("my-test-image") can run for a long time
without any indication to the user of oe-selftest about what's going
on. The test author has to log the bitbake output explicitly,
otherwise it is lost in case of test failures.

Now it is possible to use bitbake("my-test-image",
output_log=self.logger) to get more output both on the console and in
the XML output (when xmlrunner is installed). Example output:

2017-06-23 12:23:14,144 - oe-selftest - INFO - Running tests...
2017-06-23 12:23:14,145 - oe-selftest - INFO - ----------------------------------------------------------------------
2017-06-23 12:23:14,151 - oe-selftest - INFO - Running: bitbake my-test-image
2017-06-23 12:23:16,363 - oe-selftest - INFO - Loading cache...done.
2017-06-23 12:23:17,575 - oe-selftest - INFO - Loaded 3529 entries from dependency cache.
2017-06-23 12:23:18,811 - oe-selftest - INFO - Parsing recipes...done.
2017-06-23 12:23:19,659 - oe-selftest - INFO - Parsing of 2617 .bb files complete (2612 cached, 5 parsed). 3533 targets, 460 skipped, 0 masked, 0 errors.
2017-06-23 12:23:19,659 - oe-selftest - INFO - NOTE: Resolving any missing task queue dependencies

Because the implementation was already using threading, the same is
done to decouple reading and writing the different pipes instead of
trying to multiplex IO in a single thread. Previously the helper
thread waited for command completion, now that is done in the main
thread.

The most common case (no input data, joined stdout/stderr) still uses
one extra thread and a single read(), so performance should be roughly
the same as before.

Probably unintentionally, result.error was left as byte string when
migrating to Python3. OE-core doesn't seem to use runCmd() with split
output at the moment, so changing result.error to be treated the same
as result.output (i.e. decoded to a normal strings) seems like a
relatively safe API change (or rather, implementation fix).

(From OE-Core rev: 00b8c7ff17cd8f1920728fdc2653068e63d71724)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>

merge: wait()
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Stefan Strogin
a17cf42a12 slang: add ptest
This patch adds ptest for slang, it uses `make runtests` to run tests.
The Makefile runs runtests.sh for each *.sl and *.slc tests.
runtests.sh is patched for printing test results in a common format,
Makefile is patched in order not to compile any dependencies.

Changes v2->v3: rebased on the latest master (1d9a88f6).

(From OE-Core rev: 643c81afc16f8d3522cc5dc491459a1bae14d827)

Signed-off-by: Stefan Strogin <sstrogin@cisco.com>
Cc: xe-linux-external@cisco.com
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Martin Jansa
e8b1c65394 v86d, qemuboot-x86.inc: use KERNEL_MODULE_AUTOLOAD+KERNEL_MODULE_PROBECONF for uvesafb instead of fbsetup init script
* also add UVESA_MODE variable for easier change of resolution and respect it in QB_KERNEL_CMDLINE_APPEND
  as well
* don't use init script just to call modprobe
* I wasn't able to test this all the way with runqemu, because runqemu
  doesn't work on my system, but I've verified that the right params
  appear there and that I can easily change UVESA_MODE from
  conf/local.conf, the modules.d and modprobe.d files look OK:
  OE qemux86@ ~/build/oe-core/tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427212613.rootfs
  $ cat etc/modules-load.d/uvesafb.conf
  uvesafb

  OE qemux86@ ~/build/oe-core/tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427212613.rootfs
  $ cat etc/modprobe.d/uvesafb.conf
  options uvesafb mode_option=1600x1200-32

  so I'll be able to drop this KERNEL_MODULE_AUTOLOAD +
  KERNEL_MODULE_PROBECONF from my DISTRO conf.

(From OE-Core rev: f7ba5b5f76bb5678ca3e6ad51586f25871f7a9fb)

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-06-28 20:55:08 +01:00
André Draszik
1ce923bfe1 copyleft_filter.bbclass: restore possiblity to filter on type
Since the changes introduced in ae9102bda3
("copyleft_filter.bbclass: Allow to filter on name"), it is
impossible to filter on the recipe type, all recipes are
treated as though they should be included if the license
matches, irrespective of the COPYLEFT_RECIPE_TYPES
variable.

Fix this.

(From OE-Core rev: e612dfa520c7d7ecf58006e82189be601204f38d)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
André Draszik
68e763d54f selftest/archiver: only execute deploy_archives task
There should be no reason to execute a full build, as we're
just interested in the deployment of the archives.

The newly added tests already do the same.

(From OE-Core rev: 78c2897dff7cd9fe2cab511549cb146d5231e573)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
André Draszik
99e1b01cdc selftest/archiver: add tests for recipe type filtering
The archiver used to be able to filter based on COPYLEFT_RECIPE_TYPES.

Unfortunately, this got broken with the fix for
  https://bugzilla.yoctoproject.org/show_bug.cgi?id=6929
in commit ae9102bda3 ("copyleft_filter.bbclass: Allow to filter on name")

Add two tests to prevent that from happening again.

(From OE-Core rev: 709f02c5cb25983090251c6237bac4fc0a295c4f)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
André Draszik
d8f13c2649 connman: fix nftables dependency
When building with nftables support, connman doesn't ever
depend on the nftables command line tool.

connman will depend on libmnl and libnftnl at build and
run time. In addition, the nftables rules it creates
depend on various kernel modules being present.

Update the PACKAGECONFIG to reflect this. We use the
just introduced RRECOMMENDS field so as to make the
build still succeed if those kernel modules have been
linked statically into the kernel, i.e. when the
packages haven't actually been created.

(From OE-Core rev: ed6c92d62be1c98ec9dbf92317d850499d127631)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
André Draszik
aec7969f49 base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS
It can be useful to add RRECOMMENDS to packages created, based
on certain PACKAGECONFIGs.

In particular where a package depends on certain linux kernel
infrastructure (kernel modules) which might or might not be
built as a module, being able to RRECOMMENDS instead of
RDEPENDS on the relevant packages avoids build failures in
case those modules are built statically into the kernel, i.e.
in case no package is being created for them.

Add another field to the PACKAGECONFIG syntax to achieve just
that.

(From OE-Core rev: ec96c985ce1c888c3ce3c4d964d7a106c3c88a5c)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Khem Raj
627503c7b9 iptables: Apply 0001-fix-build-with-musl.patch unconditionally
This patch is generic enough, That it can be applied universally
and makes maintainence easier

(From OE-Core rev: f769b8389091b4ffaff8f6f8fc7e53462ce176a5)

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-06-28 20:55:08 +01:00
Ed Bartosh
6fa6099b49 image.bbclass: use prependVarFlag for postfuncs
It would be possible to achieve any order of calling functions if
prefuncs are added with appendVarFlag and postfuncs with prependVarFlag.
Then image_X.bbclass can add code with either pre/post-funcs or
do_image_x_append or _prepend.

The execution order would be:

image_X prefuncs
image prefuncs
do_image_X_prepend from image_X.bbclass
do_image_X from image.bbclass
do_image_X_append from image_X.bbclass
image postfuncs
image_X postfuncs

[YOCTO #11372]

Thanks to Ola Nillsson for the idea.

(From OE-Core rev: c5fa6034708b344e184bb6fa361d5ea41371008f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Ed Bartosh
f93d58378f image_types.bbclass: get rid of IMAGE_DEPENDS
The IMAGE_DEPENDS_<type> variables can be set to add dependencies for
individual image types.  Those dependencies are added to the do_rootfs
task, while they really should be added to the specific image type tasks.

These variables are not documented anywhere.

Replaced usage of IMAGE_DEPENDS_<type> with explicitly added
dependencies to do_image_<type> tasks.

[YOCTO #11302]

(From OE-Core rev: c5f33d466122e53be910fa448af60ef3937eb828)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Armin Kuster
cb5116b650 pinentry: update to 1.0.0
add pkg-config support for libassuan and gpg-error
updated config options

(From OE-Core rev: 032f91850d2df819a0b8f2762f12d952cc64284e)

(From OE-Core rev: 8ee40c7d75e5eba43a7b36bcabbd4309660686ad)

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>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
André Draszik
868486c238 linux-libc-headers: fix duplicate IFF_LOWER_UP DORMANT ECHO on musl
musl _does_ define IFF_LOWER_UP DORMANT ECHO so we should
prevent redefinition of these when on musl.

As per the included patch, this can be triggered by
(from connman 6to4.c):
    include <errno.h>
    include <stdio.h>
    include <stdlib.h>
    include <string.h>
    include <sys/socket.h>
    include <netinet/in.h>
    include <arpa/inet.h>
    include <net/if.h>
    include <linux/ip.h>
    include <linux/if_tunnel.h>
    include <linux/netlink.h>
    include <linux/rtnetlink.h>
    include <sys/ioctl.h>
    include <unistd.h>

In file included from ../git/src/6to4.c:34:0:
.../usr/include/linux/if.h:97:2: error: expected identifier before numeric constant
  IFF_LOWER_UP   = 1<<16, /* __volatile__ */
  ^

This is because at that time, IFF_LOWER_UP has been converted
to 0x10000 already:
enum net_device_flags {
 0x10000 = 1<<16,
 0x20000 = 1<<17,
 0x40000 = 1<<18,

};

Backport a patch that addresses this.

(From OE-Core rev: 24dc2200047bae5d32c168d2625d96ac08a93d3d)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Enrico Scholz
15b2d550e0 tzcode-native: quote ${CC}
build fails else with

| + make -j 8 -l 6 cc=ccache gcc
| make: *** No rule to make target 'gcc'.  Stop.

(From OE-Core rev: 5729c1563359e12ebb4451bb1ce7ba3fff4ed2d4)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Choong YinThong
b1ea384edb image_types.bbclass: Prompt error message on missing setting in UBI and UBIFS
Prompt error message to guide user add argument
MKUBIFS_ARGS and UBINIZE_ARGS on
every UBI and UBIFS image creation.

[YOCTO #11589]

(From OE-Core rev: 4a63fa70462eb5a780380b92f916cc8e295246fc)

Signed-off-by: Choong YinThong <yin.thong.choong@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Jose Perez Carranza
f44c923bb9 selftest/seltest.py: Add test to check imports from other layers
This tests adds a check of selftest itself to verify if can
add test from other layers.

[YOCTO #9770]

(From OE-Core rev: 4fe4c408246b9a4a563106d097876e6caefca694)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Oleksandr Kravchuk
3e71c57780 curl: update to 7.54.1
(From OE-Core rev: 2f0b593eacf889486a75c715b823a8337bc3b109)

Signed-off-by: Oleksandr Kravchuk <oleksandr.kravchuk@pelagicore.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Martin Jansa
b7a73352f5 expect: use u-a for mkpasswd
* when busybox is built with CONFIG_CRYPTPW=y, then it will provide
  alternative for mkpasswd, which will fail in postinst, because
  mkpasswd from expect wasn't using u-a:
  update-alternatives: Error: not linking rootfs/usr/bin/mkpasswd to
  /bin/busybox.nosuid since rootfs/usr/bin/mkpasswd exists and is not
  a link

(From OE-Core rev: b12cdaf877bc6df71d19a6bbe8c4098d48dea269)

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-06-28 20:55:08 +01:00
Ross Burton
3ec39b83ea tcl: cleanups
No need to set DEPENDS_class-native explicitly as self-dependencies are ignored
now.

Don't rewrite do_configure, autotools_do_configure works.

Actually invoke the install-private-headers target (autotools_do_install doesn't
take arguments).

Remove redundant cd.

(From OE-Core rev: e41c0827f54ea81274df98473e27263ef7e02c8d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Mikko Rapeli
b090ff6a27 meta: Fix return value checks from subprocess.call()'s
Python function subprocess.call() returns the return value of the
executed process. If return values are not checked, errors may
go unnoticed and bad things can happen.

Change all callers of subprocess.call() which do not check for
the return value to use subprocess.check_call() which raises
CalledProcessError if the subprocess returns with non-zero value.

https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module

All users of the function were found with:

$ git grep "subprocess\.call" | \
  egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call'

Tested similar patch on top of yocto jethro. Only compile tested
core-image-minimal on poky master branch.

(From OE-Core rev: 578c8205fd14c48c6d30ef2889d86f1b4aee060a)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
California Sullivan
df06ad5713 x86-base.inc: Don't add live to IMAGE_FSTYPES, default instead
Using += makes it difficult to remove. Soft-set with ?= instead.

(From OE-Core rev: df850ff9e101afcc9983f907570abaf17421ba0f)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Tobias Hagelborn
73c590ea9e staging.bbclass: Make use of oe.package.strip_execs
Make use of the library function oe.package.strip_execs for stripping
sysroot executables. oe.packge.strip_execs is based on code previously
residing in sysroot_strip.

(From OE-Core rev: fc4e6a30c51f8b15b667c21aaa6de9ba45217c1e)

Signed-off-by: Tobias Hagelborn <tobiasha@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:08 +01:00
Tobias Hagelborn
0e23081d70 package.py: Add function strip_execs
Strip all executables in a directory.
Utility function  placed in oe-package together with run_strip.
strip_execs is based on strip_sysroot from staging.bbclass
Moving out datastore references in favor of function parameters.

(From OE-Core rev: a350bfc41e8a19dfdc5b16e5fb8f2b198e7c55c1)

Signed-off-by: Tobias Hagelborn <tobiasha@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:07 +01:00
Ross Burton
2065fb7f63 cups: don't change permissions of /var/run/cups/certs in do_package
This directory is deleted by do_install, so luckily the lack of error checking
meant this didn't break.

(From OE-Core rev: 4030274eceaf0b95cac5c54c55c3f91ef45fa9b4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 20:55:07 +01:00
Ross Burton
3dea09570a bitbake: cache: don't insert PN into PACKAGES
The cache code currently inserts PN into the package list if it isn't already
present.  Whilst this ensures that the package list contains something which is
important for native recipes that don't set PACKAGES, it causes confusing
behaviour where a normal recipe doesn't have PN in PACKAGES: for example adding
dhcp to IMAGE_INSTALL will parse successfully but fail at rootfs time as the
dhcp recipe doesn't generate a dhcp package.

Solve this by only adding PN to the cache's package list if the package list is
empty.  This results in the package list for recipes such as DHCP being correct,
but native recipes continue to have just PN in the list as before.

[ YOCTO #5533 ]

(Bitbake rev: df31a88786ce5bd7708ff14e1379dc2a58a8c0cf)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 16:02:15 +01:00
David Reyna
b4b2e6d4df bitbake: toaster: test 'commit' first in get_vcs_reference
The 'commit' value should be tested and used first when resolving the ref
for a layer, since that is an explicit override in each layer index
'layeritem' record. If should take precedence over more-global 'branch'
and 'release' values, instead of being last.

[YOCTO #11515]

(Bitbake rev: b303365ca3a1ba5fb8c6839180f1ec26df60c6ce)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 16:02:15 +01:00
David Reyna
eea5cb3171 bitbake: toaster: large package set breaks sqlite query
If you build a project with a large package set, you will get a crash
in "views.py" when the dashboard attempts to fetch the package set to
calculate the package count and size. This is a sqlite limitation, and
it fails with as few as 1220 packages.

[YOCTO #11717]

(Bitbake rev: 02cb2b7f7ff594de75a404396f39a2428750c798)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 16:02:15 +01:00
David Reyna
4f2baebf36 bitbake: toaster: Add distro selection support
Add the ability to select a distro in the project page,
based on values from the Layer Index. Add a distro selection
page with the add layer feature, based on the add machine
page.

[YOCTO #10632]

(Bitbake rev: a156a4eff67cdc3943494f5be72b96e3db656250)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 16:02:15 +01:00
David Reyna
43aaa802c3 bitbake: toaster: git clone progress bar
If a project has a lot of additional layers, the build may
appear to hang while those layers are checked out.
This patch adds a clone progress bar that is visible before
the parsing progress appears.

[YOCTO #9916]

(Bitbake rev: 0c94d947b74c4dee23d7b9d255facd3cf839ccbe)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 16:02:15 +01:00
David Reyna
d74bcbeaf2 bitbake: toaster: address Django-1.10 API deprecations
There are four main API deprecations in Django-1.10:
  (a) String view arguments to url() must be replaced by
      the explicit class reference
  (b) New TEMPLATES stucture in settings.py consolidates
      TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS,
      TEMPLATE_LOADERS, TEMPLATE_STRING_IF_INVALID, and
      TEMPLATE_DEBUG
  (c) patterns() wrapper in url() is removed, with
      urlpatterns now a simple list
  (d) NoArgsCommand in commands() must be replace by
      BaseCommand, and handle_noargs() changed to
      handle()

Also, the Django version checker must be updated to accept
two digit sub-version numbers (e.g. "1.8" < "1.10")

[YOCTO #11684]

(Bitbake rev: e4c7a94fac7a53fc146387a57e5a09b9ec3caca0)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 16:02:15 +01:00
Ross Burton
c3058ec4a4 meta/conf/layer.conf: bump layer version for LSB changes
As oe-core has just dropped a number of recipes that were for LSB
conformance, bump the layer version so we can also remove meta-qt4 from
the autobuilder.

(From OE-Core rev: 179b7ae2511974173ae4aa72dfb49384ff69c2e5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:19 +01:00
Hongxu Jia
2a3071df6f grub: fix 0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch missing
Since grub upgraded to 2.02, it forgot to aplly
0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch.
...
commit 4f27e4042dfb39caa71c7c6eb0a327de6af4d563
Author: Khem Raj <raj.khem@gmail.com>
Date:   Fri Apr 21 20:36:06 2017 +0000

    grub: Update to 2.02
...

The missing caused grub-mkconfig could not detect kernel bzImage.

(From OE-Core rev: 683807bc4abecadd471a3371a8d592f63bc36d68)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:19 +01:00
Gary Thomas
54fe74125a openssh: Remove deprecated sshd option
The UsePrivilegeSeparation is no longer supported (recent SSHD always runs
with previlege separation), so remove this option from the default config
file to avoid this warning:
  /etc/ssh/sshd_config line 110: Deprecated option UsePrivilegeSeparation

(From OE-Core rev: 8ee1c567b67ec55be0fa2fbcef3d5e8fb4e82709)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:19 +01:00
Jussi Kukkonen
01266607aa gdk-pixbuf: Make loader.cache reproducible
Make the loader order in the file reliable to enable more reproducible
builds.

[YOCTO #11610]

(From OE-Core rev: 6c97a3291988cec0ac018338cd96aa2e734ca5c4)

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>
2017-06-28 15:52:19 +01:00
Fan Xin
26d1f90625 libcroco: Upgrade 0.6.11 -> 0.6.12
(From OE-Core rev: 85bb47b0703c26dd816a78a927f595359abb8c6e)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:19 +01:00
Fan Xin
d5e18f4a1a libsndfile1: Fix CVE-2017-6892
Backport upstream patch to fix CVE-2017-6892.

CVE: CVE-2017-6892

(From OE-Core rev: cc9b8d0afe64b83f585843f3aff1c077f69fd656)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Denys Dmytriyenko
d0b743f553 wayland-protocols: upgrade to 1.8
(From OE-Core rev: 24a71ad9976a28192fa79ccec2c2e4f1a97c7fff)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Fan Xin
9e0a037254 libpcre2: 10.22 -> 10.23
1. Upgrade libpcre2 from 10.22 to 10.23

2. Update the checksum of LIC_FILES_CHKSUM
   The copyright time of LICENCE is updated to 2017, the content of LICENCE has no change.

(From OE-Core rev: ed80c94d0099c5a1a75c1e00805fd09f67b6cbbd)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Otavio Salvador
d6b997841f mesa: Update to 17.1.3 release
17.1.2 release includes fixes for:

  Bug 98833 - [REGRESSION, bisected] Wayland revert commit breaks
              non-Vsync fullscreen frame updates
  Bug 100741 - Chromium - Memory leak
  Bug 100877 - vulkan/tests/block_pool_no_free regression
  Bug 101110 - Build failure in GNOME Continuous

17.1.3 release includes fixes for:

  Bug 100988 - glXGetCurrentDisplay() no longer works for FakeGLX
               contexts?

The 17.1.3 release includes the "util/rand_xor: add missing include
statements" which is now merged upstream (thanks Nicolas Dechesne);
the referred patch is then dropped from the recipe.

(From OE-Core rev: a7417bab21d0fbe0746d9e2b840aa2d576149639)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
6b66daaf93 btrfs-tools: upgrade to 4.11
(From OE-Core rev: 71ce00d886f065616c7814079234dd422fe88bdc)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
8656af3856 libfakekey: upgrade to 0.3+gitAUTOINC+7ad885912e
(From OE-Core rev: 9adc1baf815ee06c3317b51f459dbb921e0e6de5)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
4ad09f52c0 vala: upgrade to 0.36.3
(From OE-Core rev: bc0de66e3c80c932cf56f7ddd0ab5fc3d6c1ed47)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Fathi Boudra
9db6fe1d5d ltp: use upstream patch to fix faccessat/fchmodat build warnings
Use 0037-faccessat-and-fchmodat-Fx-build-warnings.patch instead of
0012-fix-faccessat01.c-build-fails-with-security-flags.patch.
The new patch has been merged upstream and will be available in next LTP
release.

(From OE-Core rev: 3c1d9629ac3b5af47d0f4db09b4eb7e0eb4b0afe)

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Maxin B. John
f6eb3edee3 connman: fix build-time warning with sysvinit
Due to recent modifications related to systemd, sysvinit builds began
to show this warning:

WARNING: connman-1.34-r0 do_package: connman: NOT adding alternative
provide /etc/resolv.conf: /etc/resolv-conf.connman does not exist

Fix this warning by making those updates specific to systemd.

(From OE-Core rev: 2a0afa9682d6119f403626ca31cd8c9854637312)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Fan Xin
3674b6e8bd file: 5.30 -> 5.31
1. Upgrade file from 5.30 to 5.31

2. Rebase the following patch file.
   debian-742262.patch

(From OE-Core rev: f38290ec2a727427a6481e4dafb02ecd8a60fad1)

Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Denys Dmytriyenko
d620f8c243 libinput: upgrade to 1.7.3
(From OE-Core rev: 605a306479a00a44698bc23322ddf42d7c99b84c)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Trevor Woerner
7f2ea91457 mesa.inc: replace deprecated configure options
--with-egl-platforms -> --with-platforms
--enable-gallium-llvm -> --enable-llvm

(From OE-Core rev: c284099530e3d2f37ea0cfc96a04cbba22e50783)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
André Draszik
c1474a25a6 gdb: fix gdbserver not working in musl/mips context
Similar to
  https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek

(From OE-Core rev: 0b9d94a5e54191f93659f7b4e7a3cb4376487823)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Acked-by: Sylvain Lemieux <slemieux@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alejandro del Castillo
f1cf60006b opkg-utils: rename recipe to follow versioned releases
(From OE-Core rev: bd259bad336d9deb7b74b633c304f8c18fc84e71)

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Ross Burton
4926943b72 dhcp: remove PN from PACKAGES
(From OE-Core rev: 09960ac22d78d65cf840140bf6458f4fc1ff556f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Ross Burton
b2ea3557f9 epiphany: remove unused intltool build-dependency
(From OE-Core rev: ef347ad8b8d61d287bf787a558563f52994f4277)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
a99dafbfe1 dmidecode: update to 3.1
(From OE-Core rev: dc1110ba6a3a4958da7a16f01343666ce5c75aaf)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
702c8107a4 npth: update to 1.5
Licensing has changed to LGPLv2+.

(From OE-Core rev: 939a485528e37f1e17fb891c670d35a1247a8bc7)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
a64f49ba80 liburcu: update to 0.10.0
Drop backported patch.
Update paths to files that establish the licensing.

(From OE-Core rev: 40e0ca5902981388398f0e12537897233b5b4f07)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
d5d7b49cc5 gettext: relocate msgfmt utility for all recipes
Now that epiphany needs a working msgfmt as well, let's do this trick
where it should be.

(From OE-Core rev: 7c0032b81f56fea5bec33aa0e74d6e28873f72a8)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
64bf080489 python3-pygobject: update to 3.24.1
(From OE-Core rev: 2468534985c43326513a03aa88521c7f467fc347)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
e6b26543f7 gobject-introspection: update to 1.52.1
(From OE-Core rev: 91ee8dc0cfdd1ea96176723c2412b801f107b752)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
68e4f5b22a epiphany: update to 3.24.2
epiphany has been relicensed to GPLv3+:
https://git.gnome.org/browse/epiphany/commit/?id=e54cb1c7e97ddca58977a8ee01a138ff57ba6f2c

(From OE-Core rev: d566148e9a030052beaedee1986e02df41af0d74)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
2e8d7ee5c0 uninative-flags.inc: do not default to old C++ ABI
This was needed for interoperability between code compiled with gcc 4 and 5;
there should be now a different fix for the issue:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c21cec84886d9c70396e9be0ceb9a8ef300b54be

(From OE-Core rev: 80791bd2d58c2e56b0dfbd2f0d43db8c90841ee4)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
7bf70f8e9d bdwgc: remove the recipe
It will be moved to meta-oe, but nothing needs it in oe-core anymore.

(From OE-Core rev: fbee171c29a8ee64fd4db62ab56df0df7b8083c3)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:18 +01:00
Alexander Kanavin
63cda67669 guile: remove the recipe
With the removal of autogen and remake, guile is no longer needed.
Nothing requires it in meta-oe either.

(From OE-Core rev: 0be43e383d6f86066dd1c633ed35839a66a4851b)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
08bd969e53 remake: remove the recipe
Using remake as the provider of virtual/make has been broken for a while;
looks like no one is using it at all.

(From OE-Core rev: 8d682f7b60073d9ed6841f3b2fbe6cb9bd04efe8)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
44da0d9467 autogen-native: remove the recipe
With grub no longer requiring it, there's nothing else in oe-core or meta-oe
that does.

(From OE-Core rev: 765fec2f363aeb0540970c57217a2ea1aab8e088)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
9dad33e9b2 grub2: remove autogen dependency
Hasn't been required by grub for quite a while.

(From OE-Core rev: 7e459c1d13d857b8452b7bedb2ffe2157b27164a)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
6b19b16272 libid3tag: fix upstream version check
(From OE-Core rev: cf4e2fad08227613ee2ba8d3935ddc23dc399467)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
5e4cdeddd0 speex: fix upstream version check
(From OE-Core rev: 2488c95a0840a0c1867fb2d629bdb0582c4b9bad)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
27d9ed31b5 logrotate: fix upstream version check
(From OE-Core rev: 861817af203399e21bd97601bf00d66fbcee436a)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
83c8cecf90 trace-cmd: update to 2.6.1
License change is due to update in FSF address.

Library path needs to be specified in absolute form now.

Remove bash completion file from kernelshark package as it will cause
a conflict with trace-cmd package.

Add a patch to resolve musl build issues.

(From OE-Core rev: 9f07921c6dcb2ea0abeaf1943aa2de5d81c82c0f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
802e03ea95 mailx: remove the recipe
This recipe was carried only for LSB compatibility,
with upstream being defunct for a long time; if there is a need
for a modern, supported implementation of mail/mailx, then
s-nail (http://sdaoden.eu/code.html) or mailutils (http://mailutils.org/)
should be used.

(From OE-Core rev: 0b44f399ce98c61353b30143c205831c1403626f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
477b194ec2 recipes-lsb4/perl: remove the recipes
These were required by LSB 4.1 tests; there's no other reason to continue
carrying them in oe-core.

(From OE-Core rev: 30fb4c8f329fe3aa3c528ffeba60ee7d702e873e)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
64bf619da6 libpng12: remove the recipe
It was only in oe-core because of LSB; let's remove it. Current libpng is 1.6.x.

(From OE-Core rev: 839af0eafc39b4d182617925e6ab9299431c8601)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
ac0a2f8bff packagegroup-core-lsb: do not include Qt4 anymore
Last version of qt4 was released 2 years ago, and Qt4 was
officially EOLd at the end of 2015. On the other hand, LSB is no longer
being developed, and so will 'require' Qt4 until the end of time.

Let's pull the plug.

(From OE-Core rev: a9807738178529c76ea719af158cae1d8566b256)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
1fc2c9315f python: remove unused 2.x versions of several packages
Nothing is using them in oe-core or meta-oe layers (except python-six is used by
and provided in meta-oe, so there was recipe duplication).

(From OE-Core rev: 701ac8e558c9c09cdab2306ebc416f0070585b11)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
489b542b9f python-pycurl: remove the recipe
Nothing is using it in oe-core or meta-oe layers.

(From OE-Core rev: 17a65f6a02ef93bfc337dd5f18ecd2201bce1002)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
5c1243c5c0 libiconv: remove recipe
It was in use by oe-core only when uclibc was used, and so serves
no purpose anymore. Both glibc and musl provide their own implementation.

However, meta-mingw still depends on it, and so the recipe has been moved there.

(From OE-Core rev: fd5f849353e045d60965079a1571160fdd980b0c)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
5ab44ed7a5 README.LSB: describe oe-core's deviations from the LSB spec
(From OE-Core rev: c96aa431f2f56d023b84d28e049065eef2a7490f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alejandro del Castillo
445cdafac7 opkg: upgrade to v0.3.5
Drop status-conffile.patch, present in 0.3.5.

(From OE-Core rev: 89b8cbfd65ae6c682908da8028d86692926e4d45)

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Peter Kjellerstedt
4dd415ad21 perl: Do not generate file dependencies for perl-ptest
The perl-ptest package contains Perl internal modules and generating
file dependencies for it causes problems.

(From OE-Core rev: 77340043e9519ea29899e570dd36315241b188ef)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Ross Burton
1558ff69e0 insane: add extensible framework for recipe-wide QA tests
Following QAPATHTEST (QA hook for each file in each package) and QAPKGTEST (QA
hook for each package), add QARECIPETEST: a hook which is executed once per
recipe in do_package_qa.

This makes it trivial to add recipe-wide QA tests that integrate with the
existing tests.

(From OE-Core rev: 656780b79e55498250d14b2cbe3bed3849fa690d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Ross Burton
e83d446939 insane: rename pkg to pn because that is what it is
(From OE-Core rev: 0a390fc8076d9a4295c693e60335d2f26216671f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
0c6396b74a gnomebase.bbclass: add datadir/icons and datadir/appdata to standard FILES list
Gnome apps seem to increasingly package those, so let's make it common.

(From OE-Core rev: fc318fb191b68232cc400db2d5eb543d296ee884)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Denys Dmytriyenko
3c2cd780f8 toolchain-scripts: add check for LD_LIBRARY_PATH in the SDK env setup script
Provide a descriptive error message and exit the environment-setup script,
when LD_LIBRARY_PATH is set on the host system.

(From OE-Core rev: 2ad6c563828e70728eb48095b2326b52342df37c)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Paul Eggleton
14cea1a05f oe-init-build-env-memres: swap parameter order
This script expected the port number to be specified first, which is
somewhat counter-intuitive especially if you're used to
oe-init-build-env; besides, in local usage you are unlikely to need to
specify a custom port. Given that few people are using this yet (based
on the issues I have recently fixed), switch the arguments around so
that the two scripts behave consistently.

(From OE-Core rev: 5d8f4c46329fbd38ebd034c1e32aa49dfec5f529)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Jussi Kukkonen
ad0d9ce3c6 selftest/devtool: Don't use removed remake as test case
remake was removed from oe-core: use another recipe in the devtool
extract test.

(From OE-Core rev: dbf680ce09ce54f97c781fc7a8e5e05ed4706073)

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>
2017-06-28 15:52:17 +01:00
Alexander Kanavin
51c8ac2d6a oe-selftest: add a test for upstream version check regressions
The test runs an upstream version check, and then compares the
list of recipes that failed the check (i.e. those where latest
upstream version could not be established) against the list of
known-broken upstreams. Mismatches either way (upstream check failed,
recipe not in the exception list, or upstream check worked,
recipe in exception list) fail the test.

[YOCTO #11031]

(From OE-Core rev: 544e04a11ab6c26a367ac0b67774bf7ffdf43c88)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:52:17 +01:00
Joshua Lock
25b410d851 lib/oe/distro_check: drop Mandriva from create_distro_packages_list()
Mandriva is no longer maintained, with its last release having been in
2011. It's no longer useful as a yard-stick distro, therefore drop it from
distro_check.create_distro_packages_list()

(From OE-Core rev: 4e1bef31e04044d26a948a9682a5122b46d15c0f)

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>
2017-06-28 15:52:16 +01:00
Joshua Lock
c36ca7c5c6 lib/oe/distro_check: update openSUSE to use Leap url formats
Since openSUSE switched to their dual development model of Leap and
Tumbleweed the urls we need to check for package lists has changed. Update
get_latest_released_opensuse_source_package_list() to use the new Leap
urls.

(From OE-Core rev: 263da717ba689eb7efe99234566e2b474e8ce95a)

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>
2017-06-28 15:52:16 +01:00
Saul Wold
06bb7a7dac gnupg: fix floating dependancy on gnutls
gunpg added TLS support to the dirmngr for 2.1.0, mostly we linked with
gnutls and had the RDEPENDS for gnutls. Since we had TLS support continue
enabling it by default.

(From OE-Core rev: 7f9806afb0b05fcd6af14910ed488a2ce277913c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:21:34 +01:00
Richard Purdie
0df29783f9 gtk-doc: Handle floating gtk-doc dependency
Allow the tests to be explicitly disabled to avoid floating dependnecy
issues. This is not really an issue with RSS but is on previous releases.
Currently the tests are enabled/disabled depending on the presence of
glib-2.0.

(From OE-Core rev: 6c12d0b8a44a91382d3aa064ebef43769d909e73)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:21:34 +01:00
Nathan Lynch
5fbd486957 lttng-modules: update to 2.9.3
Miscellaneous fixes and support for 4.12-rc kernels.

(From OE-Core rev: 65b7489f406e1d0a03a232f6e1ee3cf55a5f5bd2)

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:21:34 +01:00
Nathan Lynch
82bad30284 lttng-tools: update to 2.9.5
Miscellaneous fixes.

(From OE-Core rev: 4845551e4e5e73a51494109a41c64346c21cb109)

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:21:34 +01:00
Nathan Lynch
a910c2e810 lttng-ust: update to 2.9.1
Miscellaneous fixes.

(From OE-Core rev: fa52a9a7051920521eed6c6d5dae9f8c6f749fe1)

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:21:33 +01:00
Robert Yang
4d54ebab89 runqemu: drop RPC ports
The following commit has removed rpc ports from runqemu-export-rootfs, so
runqemu should also remove them, otherwise "runqemu nfs" doesn't work. And use
abspath for nfsroot, otherwise it doesn't work when it is a relative path.

commit 6bb9860ef7
Author: Cody P Schafer <dev@codyps.com>
Date:   Tue Jun 6 18:30:49 2017 -0400

    runqemu-export-rootfs: don't change RPC ports

[YOCTO #11687]

(From OE-Core rev: d7c5c9344de6974997c39097a7767ec338c3cca3)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28 15:21:33 +01:00
Richard Purdie
1b1d6708dd Revert "bitbake.conf: Add sdl-config to HOSTTOOLS if using host SDL"
This clearly wasn't tested as the correct variable is ASSUME_PROVIDED.

This reverts commit 91cee06433.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27 13:49:39 +01:00
Richard Purdie
a5bf271c7c meta: Add/fix missing Upstream-Status to patches
This adds or fixes the Upstream-Status for all remaining patches missing it
in OE-Core.

(From OE-Core rev: 563cab8e823c3fde8ae4785ceaf4d68a5d3e25df)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27 10:38:43 +01:00
Ross Burton
81f9abc256 meta: Fix malformed Upstream-Status tags
Fix a variety of spelling and format mistakes to improve the ease of reading the
tags programatically.

(From OE-Core rev: 6e1aaf80b0d951b48cd25cb7161ec19448295094)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-27 10:38:43 +01:00
Jair Gonzalez
b8358bc614 bitbake: bitbake-selftest: add bb.tests.event to bitbake-selftest
Tests for bitbake event module were created on bb.tests.event.
This change is to include them on the default test list in
bitbake-selftest script.

[YOCTO #10368]

(Bitbake rev: 22cc318be1aff16f1b653ff0650fe71d0e9f60bb)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 14:14:17 +01:00
Jair Gonzalez
df051ba9a2 bitbake: tests: create unit tests for event module
This change adds a new unit test module (bb.tests.event)
for bitbake event.
It includes the following items:

- Client and server stubs setup
- Testing the module's main functions including:
	- get_class_handlers
	- set_class_handlers
	- clean_class_handlers
	- enable_threadlock
	- disable_threadlock
	- get_handlers
	- set_handlers
	- execute_handler
	- fire_class_handlers
	- print_ui_queue
	- fire_ui_handlers
	- fire
	- fire_from_worker
	- register
	- remove
	- register_UIHhandler
	- unregister_UIHhandler
- Testing event handling using:
	- class Event(object)
	- class OperationStarted(Event)
	- class OperationCompleted(Event)
	- class OperationProgress(Event)
	- class ConfigParsed(Event)

[YOCTO #10368]

(Bitbake rev: 0be3ad391adc73cc0dff81bd0ed7874f2c6a00be)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 14:14:17 +01:00
Jair Gonzalez
d591b00af0 bitbake: event: remove mapping for deleted event handlers
The current remove method for class event handlers does not update the
event mapping after an event handler is deleted from the main dictionary.

This change enhances the remove method by also updating the event mapping
accordingly.

This was detected after creating the bb.tests.event module.

[YOCTO #10368]

(Bitbake rev: 839f83dea1e99d1d182b138e5aea1df1c45a92fc)

Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 14:14:17 +01:00
Jose Perez Carranza
00e2566f0e oeqa/selftest/systemdboot: Add Test to check boot file is created correctly
Add Test case to verify if EFI bootloader for
systemd boot is correctly build inside of image.

[YOCTO #9903]

(From meta-yocto rev: ce060ee09d00d737007f4a0569e13bebbcde0b3f)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 14:13:59 +01:00
Martin Kelly
14d67c0f7c qemuboot.conf: make cpus match built artifacts
Currently, the qemu CPUs for are specified as generic, but the built
artifacts are not. For example, we build x86-64 artifacts targeting
core2duo but run them in qemu with generic qemu/kvm CPUs. This causes
some packages that take advantage of the host architecture to crash
because they try to use CPU features not advertised by qemu. As an
example, Qt uses ssse3. When artifacts linked against Qt and built
targeting core2duo attempt to run on a generic qemu/kvm CPU, we get
the following crash:

Incompatible processor. This Qt build requires the following features:
     ssse3

We could fix this by making packages like Qt not take advantage of CPU
features. However, we will probably keep facing similar issues over
time, so it's better to resolve them in a more enduring way.

Fix this by making the qemu -cpu arguments match the built artifacts.

(From OE-Core rev: 20b3574749420a1fef2cb2e0579584453dd4c5c5)

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 14:07:52 +01:00
Ross Burton
90106d5afc conf/maintainers: update for revised maintainership
- move X.org to MontaVista
- change Denys's email to ti.com
- move "compression" to TI
- move VA to Intel
- move some to LG

Thanks everyone for taking some recipes!

(From meta-yocto rev: 975143f63278a5873bcd41c9763426eebfc19e65)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 14:05:29 +01:00
Alexander Kanavin
ee7c7150f0 package_manager.py: set dnf's releasever setting from DISTRO_CODENAME
So that:

1) dnf does not complain anymore about releasever not being set and then fail
for the same reason;

2) it's possible to refer to $releasever in dnf package feed configuration
(repo paths in particular) without hardconding the release name (pyro, morty, etc.)

(From OE-Core rev: 789e3fc225adbb61f10aaa3bbc3677856f5f0238)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Alexander Kanavin
f74fd6dbcc dnf: update to 2.5.1
Drop 0001-Revert-proper-check-of-releasever-when-using-install.patch
as the problem has been solved upstream.

Add 0001-Move-releasever-check-after-the-etc-dnf-vars-substit.patch,
as the warning for missing releasever is issued prematurely in our case.

(From OE-Core rev: 68b01f9fe239aa224daa8dc901fa3cf0350261c0)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Alexander Kanavin
13ba631b05 libdnf: update to 0.9.1
(From OE-Core rev: d0bc5d51111a98c1102ca0d50796b8677bc74f3a)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Khem Raj
f35a9c1748 gobject-introspection: Disable generating static lbraries
So we do not accidentally end of using static libraries when doing
PIE enabled builds

(From OE-Core rev: 164e0d57e5df5bbaeb03c41f0b265ad5ad56ae2f)

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-06-23 11:44:14 +01:00
Khem Raj
d2e23d3d02 webkitgtk: Upgrade to 2.16.3
Use bfd linker on ppc, this is because gold fails to link
webkit libraries when PIE is enabled

(From OE-Core rev: 8808d4b13a946499bc6e84a1be15f53d8ab3f673)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Khem Raj
9feef47544 zlib: Pass pre-calculate uname enable re-entrant flags
Fix ptest generation

(From OE-Core rev: 07f4b0f016225e2b211689a270e56b2923ecb434)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Khem Raj
f930cbc521 ffmpeg: Upgrade to 3.3.2 stable
* Fix mips/mips64 along the way, it was broken in 3.3 as well

(From OE-Core rev: ace103370746b7d8ae38701d2ef472f53a68edfb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Peter Kjellerstedt
7408dbccb2 git: Add a dependency on perl for gitweb
(From OE-Core rev: db31c837b579dc64bc86553cbc95736bfca97a90)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Peter Kjellerstedt
90e27071fa texi2html: Add a dependency on perl
(From OE-Core rev: c391547e95b1854960b90d93fd9f80f02f761e61)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Peter Kjellerstedt
462c7ff92b linux-firmware: Avoid a dependency on python-core
Remove the check_whence.py script since it is only needed to validate
the WHENCE file, and only if explicitly running `make check`.

(From OE-Core rev: 1fc4d5a31f05970d8d80b0106ea81d486f298e33)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Ross Burton
fd8e632832 libpcap: apply fix from upstream to fix build race
../libpcap-1.8.1/grammar.y:78:10:
fatal error: scanner.h: No such file or directory

(From OE-Core rev: aaed4e92d79919e40c896536fcb4ff6567c9a755)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:14 +01:00
Joe Slater
8f6c991a30 ghostscript: add X11 PACKAGECONFIG info
Add information necessary to build for x11, but
do not enable that option.

Fix parallel build directory creation issue.

(From OE-Core rev: 2bfc7be412da501d8a9138a3dde33636c5fe2616)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Joe Slater
d3e8504ce7 ghostscript: move to version 9.21
Eliminate CVE patches that are now in source.

Add CUPSCONFIG to configure options.

(From OE-Core rev: 3041f94896b50a5a5d19caf0dd0e7910c730e18e)

Signed-off-by: Joe Slater <jslater@windriver.com>

to be scrunched

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Huang Qiyu
a16d0f6c49 libnewt: 0.52.19 -> 0.52.20
Upgrade libnewt from 0.52.19 to 0.52.20.

(From OE-Core rev: a83715c10536904db1d274bfb3faf87a1b3d19bc)

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Jan Kiszka
85f8fc1f50 tzdata: Install zone1970.tab
The modern version of zone.tab is required by tzselect e.g.

(From OE-Core rev: de467998ecfa5fa1d2e9dd43a4a3d828cf9ccade)

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Ming Liu
3afed1549a core-image-sato: drop packagegroup-core-x11-sato-games from IMAGE_INSTALL
packagegroup-core-x11-sato-games package is being RDEPENDS by
packagegroup-core-x11-sato, hence will be installed if x11-sato is
choosen in IMAGE_FEATURES. So it's unnecessary appending it into
IMAGE_INSTALL.

Even worse, it's causing the following error when x11 is not
in DISTRO_FEATURES:
| ERROR: Required build target 'core-image-sato' has no buildable providers.
| Missing or unbuildable dependency chain was: ['core-image-sato', 'packagegroup-core-x11-sato-games']

(From OE-Core rev: 6c28b122e6214a9e57e4b116ff85145d9ac845ec)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
e7fca5d0d8 libxml2: Revert "Add an XML_PARSE_NOXXE flag to block all entities loading even local"
The new flag doesn't work and the change even broke the XML_PARSE_NONET option.

(From OE-Core rev: 8b586f60778579ee2c9adae429128a07e8437553)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
80aac29b38 libxml2: Fix CVE-2017-0663
Fix type confusion in xmlValidateOneNamespace

Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types
on namespace declarations make no practical sense anyway.

Fixes bug 780228

CVE: CVE-2017-0663
(From OE-Core rev: a965be7b6a1d730851b4a3bc8fd534b9b2334227)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
e1a7eb810f libxml2: Fix CVE-2017-5969
Fix NULL pointer deref in xmlDumpElementContent

Can only be triggered in recovery mode.

Fixes bug 758422

CVE: CVE-2017-5969
(From OE-Core rev: 0cae039cbe513b7998e067f4f3958af2ec65ed1a)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
371ba8c743 libxml2: Fix CVE-2017-9049 and CVE-2017-9050
Fix handling of parameter-entity references

There were two bugs where parameter-entity references could lead to an
unexpected change of the input buffer in xmlParseNameComplex and
xmlDictLookup being called with an invalid pointer.

Fixes bug 781205 and bug 781361

CVE: CVE-2017-9049 CVE-2017-9050
(From OE-Core rev: 2300762fef8fc8e3e56fb07fd4076c1deeba0a9b)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
1a4f1ccdcc libxml2: Fix CVE-2017-9047 and CVE-2017-9048
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.

Fixes bug 781333 and bug 781701

CVE: CVE-2017-9047 CVE-2017-9048
(From OE-Core rev: bb0af023e811907b4e641b39f654ca921ac8794a)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
6765fcec15 libxml2: Avoid reparsing and simplify control flow in xmlParseStartTag2
(From OE-Core rev: 4651afdd457eca06da07331186bf28b98df2eeff)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Andrej Valek
89531a512f libxml2: Disable LeakSanitizer when running API tests
Makefile.am: Disable LeakSanitizer when running API tests

The autogenerated API tests leak memory.

Upstream-Status: Backported - [https://git.gnome.org/browse/libxml2/commit/?id=ac9a4560ee85b18811ff8ab7791ddfff7b144b0a]
(From OE-Core rev: e3985be0ddb40e8db44422092c875a4e373a6da3)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Denys Dmytriyenko
953e61870e util-linux: upgrade to 2.30
Drop uuid-test-error-api.patch as it's been fixed upstream differently:
b770b48700

Drop ptest for tailf, as it got deprecated and removed:
70ca1a7772

(From OE-Core rev: 6b69e08cf60abbc40236cc3894b9783d720a6e6d)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Marc Ferland
21f93730e2 bluez5: add more PACKAGECONFIG options
This patch adds missing PACKAGECONFIG options and allow for a more
fine-grained build of bluez5.

I took care of providing a default configuration that matches the
previous default config.

(From OE-Core rev: 2589cfb8a5b46be958ff3ee228c3a32f82dada86)

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Marc Ferland
dff44c4309 bluez5: remove libusb dependency
Not a dependency since version 5.9.

(From OE-Core rev: 3202782d4c76653d83a90122588131e6d945a4e0)

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Nathan Rossi
bd1beb3545 kernel-uimage.bbclass: Fix up generation of uImage from vmlinux
Fix up the generation of uImage from vmlinux when KEEPUIMAGE != 'yes'.
This fixes up the working directory that do_uboot_mkimage is run from,
such that it is run from the ${B} directory to access built artefacts.

Simplify the logic in the task so that the parse step either adds the
task or not if the conditions are met. This reduces the need for the
task to run in cases when it is not used. The task is also changed to
depend on the kernel_link_images task as arch/<arch>/boot/* is not
available until after kernel_link_images in certain cases (e.g.
vmlinux/uImage only KERNEL_IMAGETYPES).

Fix up the use of ${S}/vmlinux when pulling the entry symbols
address so that it accesses the vmlinux in ${B}.

(From OE-Core rev: e0b4f018d1c2a65e66c81e5be1da8894e9a6c132)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Peter Kjellerstedt
e45de1fcfc insane.bbclass: Ignore perl as dependency for nativesdk packages
(From OE-Core rev: b3b768536322f3a79fe7f46f62d949fc976a12c7)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Petter Mabäcker
b3c3f9aaa9 multilib.bbclass: fix faulty redefinition of STAGING_KERNEL_DIR
Due to the problem fixed in
'56c677a multilib: Move redefinition of STAGING_DIR_KERNEL'
STAGING_KERNEL_DIR must be redefined for lib32 in multilib.bbclass.
However this redefinition expanded STAGING_KERNEL_DIR to an absolute
path. This unconsciously added the TMPDIR path in the sstate object,
causing packages depended on STAGING_KERNEL_DIR being rebuild if the
TMPDIR was changed.

Solve this by forcing the unexpanded TMPDIR variable to remain in the
beginning of STAGING_DIR_KERNEL (as default). Since TMPDIR is included in
BB_HASHBASE_WHITELIST, the sstate object will not be depended on the
expanded path anymore.

(From OE-Core rev: 30238852a53d221ebcaa5b2dc30ea9617c2715a1)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:13 +01:00
Aníbal Limón
7a19bbcf81 oeqa/selftest/context: Reload testlayer_path when meta-selftest isn't added
When add meta-selftest by the script the testlayer_path needs to be
reloaded to avoid None value.

(From OE-Core rev: d1120849e12c46aa46b02905a3f43c0853bd11a0)

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-06-23 11:44:13 +01:00
Aníbal Limón
d8380d098a oeqa/core/loader.py: Fix _make_failed_test for python >= 3.4.4
Python unittest change the signature of the _make_failed_test
after python 3.4.4 don't pass the method name.

(From OE-Core rev: 767b68e6ca22512ff80e6fbc42154f3f0c2206c0)

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-06-23 11:44:12 +01:00
Aníbal Limón
aa6e333de9 oeqa/core/threaded: Don't assume that results exists on logDetails
(From OE-Core rev: 7beed75c97a78e945e44a55b28f0f463cd6c8dcd)

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-06-23 11:44:12 +01:00
Jose Perez Carranza
ab0780dfea selftest: Add Testopia ID to test cases
Add decorator @OETestID() with proper Tesopia TC ID to the test cases
that did not have it set.

(From OE-Core rev: d7bc697534db911a3ce98537d772d87482a0f702)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Yeoh Ee Peng
f822525c58 selftest/devtool: replace file assertTrue/False with assertExists/NotExists
Current osselftest print confusing assertion message when using
self.assertTrue(os.path.exists(filepath)) to test file path,
example of confusing assertion message:
	AssertionError: False is not true

Replce assertTrue/assertFalse with assertExists/assertNotExists to test
file path, this will improve assertion message and simplify coding,
self.assertExists(filepath) will print below
	AssertionError: <filepath> does not exist

[YOCTO #11356]

(From OE-Core rev: 08b0702492536d41d3cf2c9c05d1fab36d32a566)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Martin Jansa
97f01ae446 sstate-sysroot-cruft.sh: Extend the whitelist
* add more php5 entries

(From OE-Core rev: f7d105a8e63466afdf226f2139e06f3c0230e2f9)

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-06-23 11:44:12 +01:00
Jean-Francois Dagenais
9ef9eb003b wic: remove extra double-quote on documentation string
(From OE-Core rev: e34fd016ed6634b1375b78f3dfe60afcc58e5bab)

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Ed Bartosh
a0536e61dc wic/runner.py: move runtool API to misc.py
Moved remaining API to misc.py.
Removed runner.py.

Now misc.py is ready to be moved to the scripts/lib/wic and
utils directory can be removed.

(From OE-Core rev: 327e340a29d330f24117e24d0649fa156017208f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Ed Bartosh
44023e6c41 wic: fix restoring of original fstab
Wic updates fstab if mount points are specified in .wks.
After partition images are created the original fstab is restored.
However, if exception is raised when partition image being prepared
wic doesn't restore original fstab. This can cause duplication of
added lines in fstab when 'wic create' runs next time.

Wrapping call of 'prepare' method and restoring original fstab
even if exception occurs should fix this.

[YOCTO #11633]

(From OE-Core rev: 29f7735030d383f9614bdb148b52a47c79f05eea)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Ed Bartosh
247b7a8c3a wic: code cleanup
Split long lines.
Removed unused imports.

(From OE-Core rev: 49b704864c7db49e41a0b6bbdb8a2840e7fa232b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Ed Bartosh
dd7e0ae43d wic: flatten directory structure
Moved misc.py from wic/utils/ to wic/
Removed wic/utils directory

(From OE-Core rev: df906f3caa0721756f5ed48fa657e62e05ae2aa3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Leonardo Sandoval
f9b476ebcd scripts/contrib/patchtest: run patchtest on local branch
The script run patchtest on local branch commits, printing results into
stdout. This script is useful to test patches before sending to the
mailing list.

Examples:

$ git checkout master-next-1.9
Branch master-next-1.9 set up to track remote branch master-next-1.9 from origin.
Switched to a new branch 'master-next-1.9'

  $ ~/scripts/contrib/patchtest.sh
  166e70e: Robert Yang: Thu Apr 2 12:01:37 2015 +0100: patch: fix CVE-2015-1196: FAIL
   Issue             Missing or incorrectly formatted CVE tag in commit message [test_cve_presence_in_commit_message]
    Suggested fix    Include a "CVE-xxxx-xxxx" tag in the commit message
   Issue             Missing or incorrectly formatted CVE tag in included patch file [test_cve_tag_format]
    Suggested fix    Correct or include the CVE tag on cve patch with format: "CVE: CVE-YYYY-XXXX"

  eaa4536: Robert Yang: Thu Apr 2 12:01:37 2015 +0100: wget: 1.16.1 -> 1.16.2: OK

  3c29ce3: Robert Yang: Thu Apr 2 12:01:38 2015 +0100: git: 2.3.0 -> 2.3.1: OK

  85491f6: Khem Raj: Thu Apr 2 12:01:38 2015 +0100: gdb: Upgrade 7.8.1 -> 7.9: OK

  f701142: Robert Yang: Thu Apr 2 12:01:38 2015 +0100: binutils: upgrade to 2.25: OK

  385d0b1: Khem Raj: Thu Apr 2 12:01:39 2015 +0100: binutils: Fix ICE in gold: OK

[YOCTO #10720]

(From OE-Core rev: 4ba1334ab7c9b32502a4f8b3e656fb4f8242ccdd)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Ed Bartosh
d72227fd2b buildhistory-diff: exclude paths from the output
Implemented -e/--exclude-path command line option to
exclude paths from buildhistory-diff output.

[YOCTO #11459]

(From OE-Core rev: 86393230e0ce33bf7d6d69d3019113e704081d30)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Paul Eggleton
43ceb87454 classes/buildhistory: fix failures collecting output signatures
It's possible for tasks to stage symlinks that point to non-existent
files; an example is ncurses-native.do_populate_sysroot. There wasn't
any error checking here so this broke the build when "task" was included
in BUILDHISTORY_FEATURES. In any case we shouldn't be following symlinks
and getting the sha256sum of the link target - we need concern ourselves
only with the target path, so check if the file is a link and sha256 the
target path instead if it is. If it's neither a regular file nor a
symlink (perhaps a pipe or a device), just skip it.

(From OE-Core rev: f60520d97f53dafe783f61eb58fe249798a1e1be)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23 11:44:12 +01:00
Joshua Lock
20565a9693 bitbake: fetch: fix handling of files with incorrect checksums from a premirror
Ensure that when an item fetched from a premirror has an invalid checksum the
fetcher falls back to the usual logic of trying the upstream and any configured
mirrors.

(Bitbake rev: 022adb30dbb0df764c9fb515918cb9a88e4f8d6f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:39 +01:00
Paul Eggleton
b367cd91d1 bitbake: event: drop some unused events
These were all used by support code for the Hob UI which has been
removed - nothing will currently fire or respond to these events.

(Bitbake rev: 03ba8db0595723286ad462fa197f862e1efdf0de)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
David Reyna
246b2fde38 bitbake: toaster: noweb should init database
When the 'noweb' option for Toaster is used, perform the database
check/create if the Toaster database does not yet exist.

This will allow Toaster to not fail if the first use is with 'noweb'.
This avoids potentially clashing database updates if there are
multiple overlaping 'noweb' sessions (for example with a CI system).

If the user wished to update the database, they can either use the
explicit "lsupdate" command or (re)start a web hosted Toaster session
(which is gated by the webserver's PID).

[YOCTO #11378]

(Bitbake rev: 910b96b9894c712aa32b5d4dadda88b766d86e35)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
David Reyna
9e622784e1 bitbake: toaster: get_last_build_id not called correctly
The method "get_last_build_id" missing the "()" in several calls. This
has been failing silently with Django 1.8 but intermittently crash with
Django 1.9.

[YOCTO #11570]

(Bitbake rev: c29e137a6e65317b8a36804126511c2137878715)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
David Reyna
282afb771d bitbake: toaster: add getMessage to MockEvent
The MockEvent needs to not only stand in for Toaster and Bitbake quick events,
it also needs to stand in for LogRecord, and for that it needs to provide
the new getMessage method.

[YOCTO #11440]

(Bitbake rev: d1ac359d460b1abe9815f323b3fd4cd0231cde6c)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
David Reyna
1d7a768dbb bitbake: toaster: fail on layers with sub-layer
For layers directories with sub-layers (for example meta-intel),
Toaster breaks when trying to exact match a dependency event for
that sub-layer against the top level layer directory paths.

Given that top the level layer directory paths are unique, adding
a test to see if the dependency path is a subset of a top level
path is also unique.

Also, since a warning was issued the processing should not fail
on the assert but instead should continue and gather the recipes
and tasks.

[YOCTO #11149]

(Bitbake rev: 6f1a42af19220a6a8d75790893da995e84ecd7aa)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
David Reyna
761325fd63 bitbake: toaster: add ID's to build menu links
Add IDs to the build page menu lines, for example "Tasks", "Recipes",
"Time", "CPU Time", "Disk I/O", and so forth. This will support test
automation.

[YOCTO #11337]

(Bitbake rev: 49d11490fad683a96f71de21f55035398ad8247a)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
David Reyna
b8d5944b8b bitbake: toaster: add ID's to navigation links
Add IDs to the navigation bar links "All builds", "All projects",
and "Documentation. This will support test automation.

[YOCTO #11335]

(Bitbake rev: 5cbf6f67994fc42dae72ece191e5c9630fc4b5af)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:23:38 +01:00
Kevin Hao
5b07a3920f meta-yocto-bsp: bump to the latest linux stable kernel for the non-x86 BSPs
Bump to the latest stable kernel for 4.4, 4,9 and 4.10.

(From meta-yocto rev: 294a7d2e1b8d7c54f6ec11804254e7028390c028)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:45 +01:00
Scott Rifenbark
1b36eebc23 dev-manual: Updates to the section on submitting changes to YP
I added detail to the procedure about pushing a change to a
contrib directory and then requesting a pull using the scripts.
More detailed with examples.

Also, clarified some wording in the section about submitting a
patch through email.

(From yocto-docs rev: 76a358ba588b0f36d14aef0a68efe30c4e16746a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:45 +01:00
Kristi Rifenbark
33b507e995 dev-manual: Updated checkout by branch
Example was incorrect. Fixed it.

(From yocto-docs rev: 7ae1c636e7a8c0448515f339476327bcaf21e63c)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:45 +01:00
Changhyeok Bae
d634fa2e9d ref-manual: uClibc Replaced by musl from Yocto 2.2
(From yocto-docs rev: ed7e62f5937576d7878eb955fda12c18e787db18)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:45 +01:00
Kristi Rifenbark
477ee32dbe ref-manual: Fixed spelling error "containe"
(From yocto-docs rev: cf8032bf7c3bc484b63ee46c195ee1537b1f817f)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:45 +01:00
Scott Rifenbark
cf2169b351 dev-manual, ref-manual: Re-wrote the intros
Fixes [YOCTO #11630]

I updated both the introductory sections of the ref-manual and the
dev-manual.  These need to work more tightly with the projected
YP documentation set.

(From yocto-docs rev: 6a28537d03fad8a53198edc7f9a6229f4e58e551)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:45 +01:00
Scott Rifenbark
1e90dd09ff dev-manual: Updated first section title to "Welcome"
I want this first section to be titled "Welcome" rahter than
"Introduction."  It is more in line with the YP QS and the YP
ref manual.

(From yocto-docs rev: 113b82c589c93a33a2a956790668e8c0a28894ec)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
abc6199f04 yocto-project-qs: Updated "Welcome" section.
I moved the bit about using a VM if you don't have a Linux
machine to a note as it broke the natural flow of this section.
Also, inserted a link to the comprehensive list of links and
other documentation references to the existing list of
other information.

(From yocto-docs rev: 73750063580ef7bc20bd445adc3e2b0b01e2257f)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
df1be92264 yocto-project-qs: Updated phonetic rendition of "poky"
I changed from "Pah-key" to "Pah-kee", which is more universal
and also matched what is used in the dev-manual terms section.

(From yocto-docs rev: 843e832f2416b0e3b0e9d941bf7755f206517603)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
eed50a14fe documentation: Changes section head for sumbitting change to YP
Fixes [YOCTO #11630]

I changed the section heading for the section that describes how
to make a change to the YP.  It was passive.  I need it to be
active and in line with the "how-to" dev-manual.

(From yocto-docs rev: 340e1b6ab9806ec11ec894d4472bc2c937c2b058)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
cd9279ab5c dev-manual: Updated the section on the YP development environment
Fixes [YOCTO #11630]

Extensively updated the development environment section by
creating a task-oriented section.

(From yocto-docs rev: d440f0b5ceb1aca57a73d8bced515ae0bd3188f7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
e928b5251c dev-manual: Updated "How to submit a change" section.
Fixes [YOCTO #11630]

The section on how to submit a change was pretty much a procedure
section.  I did some rewriting to make it more that way.

(From yocto-docs rev: d7edce9268ee5cae96c09c79fe34d5d2dbb701e0)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
652d8cb583 dev-manual: Fixed a DocBook issue with formatting "bug-id"
I discovered a mis-placed block of DocBook text that was
causing the string "bug-id" to appear in a random spot in the
"Patch Submission Details" section.  Re-ording this block
fixed the problem.

(From yocto-docs rev: 6cf0e8ff0d2b176c1faf492c7bdd7d38e23e4c98)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Kristi Rifenbark
1e1bb0dd42 dev-manual: Updated syntax for oe-run-native script
OE native script now requires a native tool as part
of the command line. I added that to the example.

Removed a bad help command at the end of the section.

(From yocto-docs rev: 5eb965ea51d669ee3bac01050b42bee984572199)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Kristi Rifenbark
a331904ab2 dev-manual: Fixed two grammar errors
(From yocto-docs rev: 4e68646edf078c23e414a300b37cb30774b28be7)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Kristi Rifenbark
b2ad7c74d1 dev-manual: Updated "Kernel Overview" section
The list of supported kernels was out of date.
Edited with updated information.

(From yocto-docs rev: b287f76905637834ec6342285b99abd2c5594597)

Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
b5ffe8974b ref-manual: Added "see also" informational note at beginning.
(From yocto-docs rev: 3af3d821b6e26fd352223f3f4196e0e200614203)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
98ba0cd476 dev-manual: Created "Working With Git Repositories" section
Fixes [YOCTO #11630]

This new section has three new procedures for now: 1)
cloning the poky repository, 2) checking out a branch
based on an upstream repository branch name, and 3)
checking out a branch based on an upstream tag name.

More to be added for other key repositories.

(From yocto-docs rev: 4cbcd952ba395b19be5374470a95630a4bc6ffa7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
f2db665b78 ref-manual: Updated the "poky" term
Applied some formatting and some links

(From yocto-docs rev: a0881588fcf2314b6d7bcbfb7ee9b9d4d7a2ef2c)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
fcb53beee4 documentation: Moved "Git" section to the ref-manual
Fixes [YOCTO #11630]

The "Git" section in the dev-manual is really about concepts.
There are a couple of examples that might or not might be
allowed to ultimately stay.  I have moved the section to the
ref-manual.  If those examples get replicated in the new
dev-manual, I will update the "Git" section further.  For now,
however, these remain in this moved section.

(From yocto-docs rev: 2e4b87fdab29c13ce0d2314e50c93e37404b6f7e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:44 +01:00
Scott Rifenbark
c7969c64bb dev-manual, ref-manual: Moved "Workflows" section to ref-manual
Fixes [YOCTO #11630]

I moved the "Workflows" section to the ref-manual.  This section is
primarily concepts and needs to be out of the dev-manual, which
is being reconstituted into a "how-to" manual.

(From yocto-docs rev: 2f8bfaac3da9e2d7042ea381a3e8957f96b5bf5a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
d17632463e sdk-manual: Updated the note for building SDK Installer
For development purposes, static libraries need to be
present only in the SDK. We do not need those static
libraries in the image for most scenarios. So, replace
IMAGE_INSTALL with TOOLCHAIN_TARGET_TASK in the documentation.

I updated the note to reflect this.

Suggested-by: Maxin B. John <maxin.john@intel.com>
(From yocto-docs rev: c05458c6614c38961d23db8f894d542bf93dbf09)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
912d73d42b dev-manual, ref-manual: Moved "Licenses" section to ref-manual
Fixes [YOCTO #11630]

Moved the "Licenses" section from the dev-manual to the ref-manual.
The information in the section is purely reference material and
does not belong in the dev-manual, which is being reconstructed
as a "how-to" manual.

(From yocto-docs rev: a89cb18f6cab6702a2bf2a0f77d46e64f82b1729)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
ba34d31ed9 ref-manual: Updated the LAYERRECOMMENDS variable description
Fixes [YOCTO #11579]

I removed the sentence about throwing an error or warning.

(From yocto-docs rev: cfa3b1559122ec9e927ccd34afa0e26e877486f9)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
216ee69227 documentation: Moved "Yocto Project Source Repositories" section
Fixes [YOCTO #11630]

The "Yocto Project Source Repositories" section is purely conceptual
and thus does not belong in the reconstituted dev-manual, which is
converting to a "how-to" manual.  I have moved this section to the
ref-manual under "The Yocto Project Development Environment" section.

Moving the section affected several things.  Three figures that where
in the dev-manual were copied and moved to the figures folder of the
ref-manual.  This required deleting them from the dev-manual and
adding them to the ref-manual.

The makefile had to be edited to move those figures into the ref-manual
and delete them from the latest version of the dev-manual in order for
the tarball of files to be correct when the manuals are made.

Links to anchors within the moved section had to be fixed in various
manuals.  Links to the main section "id" had to be fixed to point
to the ref-manual manual.

(From yocto-docs rev: c619ae2bbc6be93cb0324ca44e936eefec12b28c)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
12cc5f7ab2 ref-manual, dev-manual: Moved "Open Source Philosophy" to ref-manual.
Fixes [YOCTO #11630]

The "Open Source Philosophy" section that was in the dev-manual is
really conceptual reference information and has no place in the
dev-manual, which is being re-written to be a "how-to" manual. I
moved the section into the new "ref-development-environment.xml"
chapter.

No links were affected by this.

(From yocto-docs rev: 0a3e65bf7a23eec6e36a3cda3c2011b70aef325b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
de6d45fefc documentation: Re-org for "closer-look" chapter
Fixes [YOCTO #11630]

The ref-manual needs expansion for the old "closer-look" chapter.
This chapter previously held a detailed look at what happens when
a user uses the YP to develop something.  Now, the chapter needs
to also contain YP development environment concepts (e.g. open-
source philosophy, etc.), which are coming from the dev-manual.

Because of this, I renamed the "closer-look.xml" chapter to be
"ref-development-environment.xml".  I also renamed the larger
section that was formerly the entire chapter into its own section
named "Development Concepts".

Both these changes caused a few links to break.  I fixed all the
links from within the various manuals so they would find appropriate
targets.

I did some re-writing for introductory material to introduce the new
chapter and the section on "Development Concepts".

A new file ("ref-development-environment.xml") was added by basically
renaming the "closer-look.xml" chapter.  And, the tracking for
"closer-look.xml" was deleted.

(From yocto-docs rev: e37806474578b4f0ed137f64d68a39a17ab60644)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
3f6a9af927 ref-manual: Re-organized the "Introduction" Chapter
I made some changes to better introduce this reference manual.
Clarified the best scenario for using the manual.  Removed the
long list of manual descriptions as that can be referenced further
down in the manual.

(From yocto-docs rev: 8f4555aa387ab3bd3f90f5fcda1d343811ecc168)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
800ee0167a dev-manual: Fixed broken links to "Source Directory" term.
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from dev-manual to
ref-manual broke all the links to the "Source Directory" term.
I fixed them.

(From yocto-docs rev: d3a206b141e0b0c623362622ec73bbf44118071a)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
2ff49eaea0 dev-manual: Fixed broken links to "build-system-term" term
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from the dev-manual to
the ref-manual broke a single link to the "build-system-term"
id.  I fixed it.

(From yocto-docs rev: 51bbfbb6030a5298fde1dc0e6f67332cfa59fae2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
f42d8f4cf0 documentation: Fixed links for "metadata" term.
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from the dev-manual
to the ref-manual broke the links to the "Metadata" term.
I fixed these.

(From yocto-docs rev: 190da4b4d44952d141db26ca72b5bc1a52d77023)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
84d97de54a ref-manual: Removed the "id" for "layer" term - unused
(From yocto-docs rev: 6916dcb203425dd3b05dd0a05acc99a0bc00094e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
96b2eb0b6c ref-manual, sdk-manual: Fixed links for "cross-development-toolchain"
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from the dev-manual to the
ref-manual broke links for the "cross-development-toolchain" term.
I have fixed these.

(From yocto-docs rev: f2d2b5936bd339d691ab859cbe3df86e3da58f0c)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:43 +01:00
Scott Rifenbark
74bf586c94 documentation: Fixed links for "build-directory" term.
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from the dev-manual to the
ref-manual broke several links to the id "build-directory".  I fixed
these to reference into the ref-manual now.

(From yocto-docs rev: debe2ae8ce203ebe0f1cee0de54124c15df8bb7e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:42 +01:00
Scott Rifenbark
b8b87dd690 ref-manual: Fixed links in the "Yocto Project Terms" section.
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from the dev-manual to
the ref-manual caused many links local to that section to be
incorrect.  I scrubbed the section and fixed all the links.

(From yocto-docs rev: 4b795159aa80184f26ff1181a564516840c373b2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:42 +01:00
Scott Rifenbark
45b16e35b6 documentation: Fixed links to "bitbake-term"
Fixes [YOCTO #11630]

Moving the "Yocto Project Terms" section from the dev-manual to
the ref-manual.  Doing so caused all the links to the id
"bitbake-term" to break.  These had to be individually fixed.

Discovered two unresolved references that were a consequence of
moving that section to the ref-manual.  These were fixed as well.

(From yocto-docs rev: 829ca6b64562f00a69f3956e9636c7edaa90ce16)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:42 +01:00
Richard Purdie
dccca9af47 kconfig-frontends: Remove as only needed for eglibc
This was only added for eglibc. That is gone so we can drop this too.

(From OE-Core rev: 7c36b4316ad185088c65a4db8a84b5fcba9eef06)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:01 +01:00
Richard Purdie
5e9b0569e2 pciutils: Fold patches into a single patch with a description
Patches patching content from other patches is bad. This folds the three
patches into one, improves some of what its doing to be a little
cleaner and adds a proper description to the patch header.

This also moves the STRIP override to the configure commandline rather
than patching and handles passing libdir the same way.

(From OE-Core rev: 186b30798cf74b738483e8708157cac628c1d3cd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:01 +01:00
Richard Purdie
4c2d0b1205 meta: Remove further uclibc remnants (inc. patches and site files)
Some of these are clearly dead, e.g. one binutils patch reverts the effects
of the earlier one.

This also removes the uclibc site files. We now have mechanisms to allow these
to be extended from another layer should someone ever wish to do that.

(From OE-Core rev: e01e7c543a559c8926d72159b5cd55db0c661434)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
39df3561d8 gcc: Drop 5.4 series
We now have gcc 6 and gcc 7 recipes, the gcc 5 series can be dropped
as we're no longer going to support it for targets.

(From OE-Core rev: 98183e57dffaa155fc207a28e1c788ff50dc2054)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
f09b074de8 meta: Drop further remnants of uclibc support
uclibc support was removed a while ago and musl works much better. Start to
remove the various overrides and patches related to uclibc which are no longer
needed.

uclibc support in a layer would still be possible. I have strong reasons to
believe nobody is still using uclibc since patches are missing and I doubt
the metadata even parses anymore.

(From OE-Core rev: ec03023d2165b49a52b83bac1ea2f0bfded7b852)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
c1b4bea9a1 package_deb: Drop obsolete comments/variables
These comments/variables appear to be long dead, remove them.

(From OE-Core rev: a50c8fa7c6c9d40279724a04fb616462b1b491ff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
eb40fcf627 meta: Drop remnants of uclibc support
uclibc support was removed a while ago and musl works much better. Start to
remove the various overrides and patches related to uclibc which are no longer
needed.

uclibc support in a layer would still be possible. I have strong reasons to
believe nobody is still using uclibc since patches are missing and I doubt
the metadata even parses anymore.

(From OE-Core rev: 653704e9cf325cb494eb23facca19e9f05132ffd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
1b489073dc package_ipk: Parallelise ipk creation
Allow the creation of ipks to happen in parallel, making best use of resources
on multiprocessor systems.

(From OE-Core rev: 07f6c0b464f0671bc39116317138e4ddf27bdae9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
d28f9b0c86 package_deb: Enable multithreaded package creation
Allow the creation of debs to happen in parallel, making best use of resources
on multiprocessor systems.

(From OE-Core rev: dd540fba6c65fb74df014f5d9d2965078314a790)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Richard Purdie
8cbdc270c9 pseudo: Handle too many files deadlock
If we have large amounts of parallelism, pseudo can end up with too
many open connections and will no longer accept further connections,
hanging. This patch works around that by closing some clients, allowing
turnover of connections and unblocking the system. The downside is a small
but theoretical window of data loss. This is likely better than locking
up entirely though. Discussions with Peter are onging about how we could
better fix this.

(From OE-Core rev: f3589f154dad1c92e599737623d392508810ae7e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22 09:16:00 +01:00
Patrick Ohly
9ea5a31776 ovmf: fix secureboot PACKAGECONFIG + OpenSSL update
The recent ovmf update broke secureboot because upstream changed the
way how openssl gets compiled into ovmf. It's now integrated directly
into the ovmf build process, without having to patch it first.

In addition, more recent OpenSSL releases are supported. 1.1.0e was
explicitly mentioned in the ovmf commits and because the current
1.1.0f only has minor build enhancements, 1.1.0e is used here.

(From OE-Core rev: 1d9a88f635549e68562de681e297b9270ad02d4e)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16 10:58:23 +01:00
Richard Purdie
31a9e8d114 package_ipk: Clean up Source entry in ipk packages
There is the potential for sensitive information to leak through the urls
there and removing it brings this into the behavior of the other package
backends since filtering it is likely error prone.

Since ipks don't appear to be generated at all if we don't set this, set
the field to the recipe name used (basename only, no paths). This avoids
information leaking. We may want to drop the field if opkg can allow that
at a future point but the recipe name is a suitable identifier for now.

Reported-by: Andrej Valek <andrej.valek@siemens.com>
(From OE-Core rev: ec7feb9d315f357b9a073425a31b352ec24ddfd9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16 09:47:49 +01:00
Scott Rifenbark
2bf2ab9fcd bitbake: bitbake-user-manual: Updated BBLAYERS_FETCH_DIR variable description
Just discovered a minor issue in the bitbake manual - under the variable
glossary entry for BBLAYERS_FETCH_DIR we say there's a default value of
${COREBASE} but that's not actually true in bitbake itself - there's no
default in bitbake, that default is set in OE-Core. We can keep this in the YP
ref manual but in the bitbake manual that sentence should be removed.

(Bitbake rev: 7b4e81772ed8789521661a3b32b576c91276ae34)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-15 11:15:59 +01:00
1035 changed files with 19362 additions and 41317 deletions

25
README.LSB Normal file
View File

@@ -0,0 +1,25 @@
OE-Core aims to be able to provide basic LSB compatible images. There
are some challenges for OE as LSB isn't always 100% relevant to its
target embedded and IoT audiences.
One challenge is that the LSB spec is no longer being actively
developed [https://github.com/LinuxStandardBase/lsb] and has
components which are end of life or significantly dated. OE
therefore provides compatibility with the following caveats:
* Qt4 is provided by the separate meta-qt4 layer. Its noted that Qt4
is end of life and this isn't something the core project regularly
tests any longer. Users are recommended to group together to support
maintenance of that layer. [http://git.yoctoproject.org/cgit/cgit.cgi/meta-qt4/]
* mailx has been dropped since its no longer being developed upstream
and there are better, more modern replacements such as s-nail
(http://sdaoden.eu/code.html) or mailutils (http://mailutils.org/).
* A few perl modules that were required by LSB 4.x aren't provided:
libclass-isa, libenv, libdumpvalue, libfile-checktree,
libi18n-collate, libpod-plainer.
* libpng 1.2 isn't provided; oe-core includes the latest release of libpng
instead.

View File

@@ -38,7 +38,7 @@ from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
if sys.getfilesystemencoding() != "utf-8":
sys.exit("Please use a locale setting which supports utf-8.\nPython can't change the filesystem locale after loading so we need a utf-8 when python starts or things won't work.")
__version__ = "1.34.0"
__version__ = "1.35.0"
if __name__ == "__main__":
if __version__ != bb.__version__:

View File

@@ -34,18 +34,39 @@ import bb.msg
logger = bb.msg.logger_create('bitbake-diffsigs')
def find_siginfo(tinfoil, pn, taskname, sigs=None):
result = None
tinfoil.set_event_mask(['bb.event.FindSigInfoResult',
'logging.LogRecord',
'bb.command.CommandCompleted',
'bb.command.CommandFailed'])
ret = tinfoil.run_command('findSigInfo', pn, taskname, sigs)
if ret:
while True:
event = tinfoil.wait_event(1)
if event:
if isinstance(event, bb.command.CommandCompleted):
break
elif isinstance(event, bb.command.CommandFailed):
logger.error(str(event))
sys.exit(2)
elif isinstance(event, bb.event.FindSigInfoResult):
result = event.result
elif isinstance(event, logging.LogRecord):
logger.handle(event)
else:
logger.error('No result returned from findSigInfo command')
sys.exit(2)
return result
def find_compare_task(bbhandler, pn, taskname, sig1=None, sig2=None, color=False):
""" Find the most recent signature files for the specified PN/task and compare them """
if not hasattr(bb.siggen, 'find_siginfo'):
logger.error('Metadata does not support finding signature data files')
sys.exit(1)
if not taskname.startswith('do_'):
taskname = 'do_%s' % taskname
if sig1 and sig2:
sigfiles = bb.siggen.find_siginfo(pn, taskname, [sig1, sig2], bbhandler.config_data)
sigfiles = find_siginfo(bbhandler, pn, taskname, [sig1, sig2])
if len(sigfiles) == 0:
logger.error('No sigdata files found matching %s %s matching either %s or %s' % (pn, taskname, sig1, sig2))
sys.exit(1)
@@ -57,7 +78,7 @@ def find_compare_task(bbhandler, pn, taskname, sig1=None, sig2=None, color=False
sys.exit(1)
latestfiles = [sigfiles[sig1], sigfiles[sig2]]
else:
filedates = bb.siggen.find_siginfo(pn, taskname, None, bbhandler.config_data)
filedates = find_siginfo(bbhandler, pn, taskname)
latestfiles = sorted(filedates.keys(), key=lambda f: filedates[f])[-3:]
if not latestfiles:
logger.error('No sigdata files found matching %s %s' % (pn, taskname))
@@ -69,7 +90,7 @@ def find_compare_task(bbhandler, pn, taskname, sig1=None, sig2=None, color=False
# Define recursion callback
def recursecb(key, hash1, hash2):
hashes = [hash1, hash2]
hashfiles = bb.siggen.find_siginfo(key, None, hashes, bbhandler.config_data)
hashfiles = find_siginfo(bbhandler, key, None, hashes)
recout = []
if len(hashfiles) == 0:

View File

@@ -90,7 +90,7 @@ def main():
if getattr(args, 'parserecipes', False):
tinfoil.config_data.disableTracking()
tinfoil.parseRecipes()
tinfoil.parse_recipes()
tinfoil.config_data.enableTracking()
return args.func(args)

View File

@@ -28,6 +28,7 @@ except RuntimeError as exc:
tests = ["bb.tests.codeparser",
"bb.tests.cow",
"bb.tests.data",
"bb.tests.event",
"bb.tests.fetch",
"bb.tests.parse",
"bb.tests.utils"]

View File

@@ -24,6 +24,29 @@ Usage: source toaster start|stop [webport=<address:port>] [noweb]
[webport] Set the development server (default: localhost:8000)
"
databaseCheck()
{
retval=0
# you can always add a superuser later via
# ../bitbake/lib/toaster/manage.py createsuperuser --username=<ME>
$MANAGE migrate --noinput || retval=1
if [ $retval -eq 1 ]; then
echo "Failed migrations, aborting system start" 1>&2
return $retval
fi
# Make sure that checksettings can pick up any value for TEMPLATECONF
export TEMPLATECONF
$MANAGE checksettings --traceback || retval=1
if [ $retval -eq 1 ]; then
printf "\nError while checking settings; aborting\n"
return $retval
fi
return $retval
}
webserverKillAll()
{
local pidfile
@@ -48,22 +71,9 @@ webserverStartAll()
fi
retval=0
# you can always add a superuser later via
# ../bitbake/lib/toaster/manage.py createsuperuser --username=<ME>
$MANAGE migrate --noinput || retval=1
if [ $retval -eq 1 ]; then
echo "Failed migrations, aborting system start" 1>&2
return $retval
fi
# Make sure that checksettings can pick up any value for TEMPLATECONF
export TEMPLATECONF
$MANAGE checksettings --traceback || retval=1
if [ $retval -eq 1 ]; then
printf "\nError while checking settings; aborting\n"
return $retval
fi
# check the database
databaseCheck || return 1
echo "Starting webserver..."
@@ -106,8 +116,14 @@ verify_prereq() {
# Verify Django version
reqfile=$(python3 -c "import os; print(os.path.realpath('$BBBASEDIR/toaster-requirements.txt'))")
exp='s/Django\([><=]\+\)\([^,]\+\),\([><=]\+\)\(.\+\)/'
exp=$exp'import sys,django;version=django.get_version().split(".");'
exp=$exp'sys.exit(not (version \1 "\2".split(".") and version \3 "\4".split(".")))/p'
# expand version parts to 2 digits to support 1.10.x > 1.8
# (note:helper functions hard to insert in-line)
exp=$exp'import sys,django;'
exp=$exp'version=["%02d" % int(n) for n in django.get_version().split(".")];'
exp=$exp'vmin=["%02d" % int(n) for n in "\2".split(".")];'
exp=$exp'vmax=["%02d" % int(n) for n in "\4".split(".")];'
exp=$exp'sys.exit(not (version \1 vmin and version \3 vmax))'
exp=$exp'/p'
if ! sed -n "$exp" $reqfile | python3 - ; then
req=`grep ^Django $reqfile`
echo "This program needs $req"
@@ -240,6 +256,16 @@ case $CMD in
line='INHERIT+="toaster buildhistory"'
grep -q "$line" $conf || echo $line >> $conf
if [ $WEBSERVER -eq 0 ] ; then
# Do not update the database for "noweb" unless
# it does not yet exist
if [ ! -f "$TOASTER_DIR/toaster.sqlite" ] ; then
if ! databaseCheck; then
echo "Failed ${CMD}."
return 4
fi
fi
fi
if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
echo "Failed ${CMD}."
return 4

View File

@@ -269,7 +269,7 @@
and define some key BitBake variables.
For more information on the <filename>bitbake.conf</filename>,
see
<ulink url='http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#an-overview-of-bitbakeconf'></ulink>
<ulink url='http://git.openembedded.org/bitbake/tree/conf/bitbake.conf'></ulink>.
</para>
<para>Use the following commands to create the <filename>conf</filename>
directory in the project directory:
@@ -375,8 +375,8 @@ ERROR: Unable to parse base: ParseError in configuration INHERITs: Could not inh
code separate from the general metadata used by BitBake.
Thus, this example creates and uses a layer called "mylayer".
<note>
You can find additional information on adding a layer at
<ulink url='http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#adding-an-example-layer'></ulink>.
You can find additional information on layers at
<ulink url='http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#layers'></ulink>.
</note>
</para>
<para>Minimally, you need a recipe file and a layer configuration

View File

@@ -1143,8 +1143,6 @@
<glossdef>
<para>
Sets the base location where layers are stored.
By default, this location is set to
<filename>${COREBASE}</filename>.
This setting is used in conjunction with
<filename>bitbake-layers layerindex-fetch</filename> and
tells <filename>bitbake-layers</filename> where to place

View File

@@ -21,7 +21,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
__version__ = "1.34.0"
__version__ = "1.35.0"
import sys
if sys.version_info < (3, 4, 0):

View File

@@ -86,9 +86,9 @@ class RecipeInfoCommon(object):
class CoreRecipeInfo(RecipeInfoCommon):
__slots__ = ()
cachefile = "bb_cache.dat"
cachefile = "bb_cache.dat"
def __init__(self, filename, metadata):
def __init__(self, filename, metadata):
self.file_depends = metadata.getVar('__depends', False)
self.timestamp = bb.parse.cached_mtime(filename)
self.variants = self.listvar('__VARIANTS', metadata) + ['']
@@ -107,7 +107,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
self.pn = self.getvar('PN', metadata)
self.packages = self.listvar('PACKAGES', metadata)
if not self.pn in self.packages:
if not self.packages:
self.packages.append(self.pn)
self.basetaskhashes = self.taskvar('BB_BASEHASH', self.tasks, metadata)
@@ -122,7 +122,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
self.defaultpref = self.intvar('DEFAULT_PREFERENCE', metadata)
self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata)
self.stamp = self.getvar('STAMP', metadata)
self.stampclean = self.getvar('STAMPCLEAN', metadata)
self.stampclean = self.getvar('STAMPCLEAN', metadata)
self.stamp_extrainfo = self.flaglist('stamp-extra-info', self.tasks, metadata)
self.file_checksums = self.flaglist('file-checksums', self.tasks, metadata, True)
self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata)
@@ -217,7 +217,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
cachedata.packages_dynamic[package].append(fn)
# Build hash of runtime depends and recommends
for package in self.packages + [self.pn]:
for package in self.packages:
cachedata.rundeps[fn][package] = list(self.rdepends) + self.rdepends_pkg[package]
cachedata.runrecs[fn][package] = list(self.rrecommends) + self.rrecommends_pkg[package]
@@ -375,8 +375,8 @@ class Cache(NoCache):
data = databuilder.data
# Pass caches_array information into Cache Constructor
# It will be used later for deciding whether we
# need extra cache file dump/load support
# It will be used later for deciding whether we
# need extra cache file dump/load support
self.caches_array = caches_array
self.cachedir = data.getVar("CACHE")
self.clean = set()
@@ -421,7 +421,7 @@ class Cache(NoCache):
cachesize += os.fstat(cachefile.fileno()).st_size
bb.event.fire(bb.event.CacheLoadStarted(cachesize), self.data)
for cache_class in self.caches_array:
cachefile = getCacheFile(self.cachedir, cache_class.cachefile, self.data_hash)
with open(cachefile, "rb") as cachefile:
@@ -438,8 +438,8 @@ class Cache(NoCache):
logger.info('Cache version mismatch, rebuilding...')
return
elif bitbake_ver != bb.__version__:
logger.info('Bitbake version mismatch, rebuilding...')
return
logger.info('Bitbake version mismatch, rebuilding...')
return
# Load the rest of the cache file
current_progress = 0
@@ -616,13 +616,13 @@ class Cache(NoCache):
a = fl.find(":True")
b = fl.find(":False")
if ((a < 0) and b) or ((b > 0) and (b < a)):
f = fl[:b+6]
fl = fl[b+7:]
f = fl[:b+6]
fl = fl[b+7:]
elif ((b < 0) and a) or ((a > 0) and (a < b)):
f = fl[:a+5]
fl = fl[a+6:]
f = fl[:a+5]
fl = fl[a+6:]
else:
break
break
fl = fl.strip()
if "*" in f:
continue
@@ -886,4 +886,3 @@ class MultiProcessCache(object):
p.dump([data, self.__class__.CACHE_VERSION])
bb.utils.unlockfile(glf)

View File

@@ -50,6 +50,8 @@ class CommandFailed(CommandExit):
def __init__(self, message):
self.error = message
CommandExit.__init__(self, 1)
def __str__(self):
return "Command execution failed: %s" % self.error
class CommandError(Exception):
pass
@@ -238,6 +240,11 @@ class CommandsSync:
return command.cooker.matchFile(fMatch)
matchFile.needconfig = False
def getUIHandlerNum(self, command, params):
return bb.event.get_uihandler()
getUIHandlerNum.needconfig = False
getUIHandlerNum.readonly = True
def setEventMask(self, command, params):
handlerNum = params[0]
llevel = params[1]
@@ -305,6 +312,38 @@ class CommandsSync:
return command.cooker.recipecaches[mc].pkg_pepvpr
getRecipeVersions.readonly = True
def getRecipeProvides(self, command, params):
try:
mc = params[0]
except IndexError:
mc = ''
return command.cooker.recipecaches[mc].fn_provides
getRecipeProvides.readonly = True
def getRecipePackages(self, command, params):
try:
mc = params[0]
except IndexError:
mc = ''
return command.cooker.recipecaches[mc].packages
getRecipePackages.readonly = True
def getRecipePackagesDynamic(self, command, params):
try:
mc = params[0]
except IndexError:
mc = ''
return command.cooker.recipecaches[mc].packages_dynamic
getRecipePackagesDynamic.readonly = True
def getRProviders(self, command, params):
try:
mc = params[0]
except IndexError:
mc = ''
return command.cooker.recipecaches[mc].rproviders
getRProviders.readonly = True
def getRuntimeDepends(self, command, params):
ret = []
try:
@@ -543,11 +582,14 @@ class CommandsAsync:
bfile = params[0]
task = params[1]
if len(params) > 2:
hidewarning = params[2]
internal = params[2]
else:
hidewarning = False
internal = False
command.cooker.buildFile(bfile, task, hidewarning)
if internal:
command.cooker.buildFileInternal(bfile, task, fireevents=False, quietlog=True)
else:
command.cooker.buildFile(bfile, task)
buildFile.needcache = False
def buildTargets(self, command, params):
@@ -704,3 +746,14 @@ class CommandsAsync:
command.finishAsyncCommand()
clientComplete.needcache = False
def findSigInfo(self, command, params):
"""
Find signature info files via the signature generator
"""
pn = params[0]
taskname = params[1]
sigs = params[2]
res = bb.siggen.find_siginfo(pn, taskname, sigs, command.cooker.data)
bb.event.fire(bb.event.FindSigInfoResult(res), command.cooker.data)
command.finishAsyncCommand()
findSigInfo.needcache = False

View File

@@ -165,7 +165,7 @@ class BBCooker:
Manages one bitbake build run
"""
def __init__(self, configuration, featureSet=None):
def __init__(self, configuration, featureSet=None, readypipe=None):
self.recipecaches = None
self.skiplist = {}
self.featureset = CookerFeatures()
@@ -181,13 +181,13 @@ class BBCooker:
self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \
pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \
pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
self.watcher = pyinotify.WatchManager()
self.watcher.bbseen = []
self.watcher.bbwatchedfiles = []
self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
# If being called by something like tinfoil, we need to clean cached data
# If being called by something like tinfoil, we need to clean cached data
# which may now be invalid
bb.parse.__mtime_cache = {}
bb.parse.BBHandler.cached_statements = {}
@@ -215,19 +215,6 @@ class BBCooker:
self.configuration.server_register_idlecallback(_process_inotify_updates, [self.confignotifier, self.notifier])
# Take a lock so only one copy of bitbake can run against a given build
# directory at a time
if not self.lockBitbake():
bb.fatal("Only one copy of bitbake should be run against a build directory")
try:
self.lock.seek(0)
self.lock.truncate()
if len(configuration.interface) >= 2:
self.lock.write("%s:%s\n" % (configuration.interface[0], configuration.interface[1]));
self.lock.flush()
except:
pass
# TOSTOP must not be set or our children will hang when they output
try:
fd = sys.stdout.fileno()
@@ -250,6 +237,10 @@ class BBCooker:
# Let SIGHUP exit as SIGTERM
signal.signal(signal.SIGHUP, self.sigterm_exception)
if readypipe:
os.write(readypipe, b"ready")
os.close(readypipe)
def config_notifications(self, event):
if event.maskname == "IN_Q_OVERFLOW":
bb.warn("inotify event queue overflowed, invalidating caches.")
@@ -282,7 +273,7 @@ class BBCooker:
watchtarget = None
while True:
# We try and add watches for files that don't exist but if they did, would influence
# the parser. The parent directory of these files may not exist, in which case we need
# the parser. The parent directory of these files may not exist, in which case we need
# to watch any parent that does exist for changes.
try:
watcher.add_watch(f, self.watchmask, quiet=False)
@@ -440,7 +431,7 @@ class BBCooker:
del self.configuration.env[k]
clean = False
if k not in self.configuration.env and k not in environment:
continue
continue
if environment[k] != self.configuration.env[k]:
logger.debug(1, "Updating environment variable %s from %s to %s" % (k, self.configuration.env[k], environment[k]))
self.configuration.env[k] = environment[k]
@@ -687,12 +678,12 @@ class BBCooker:
depend_tree["pn"][pn][ei] = vars(self.recipecaches[mc])[ei][taskfn]
dotname = "%s.%s" % (pn, bb.runqueue.taskname_from_tid(tid))
if not dotname in depend_tree["tdepends"]:
depend_tree["tdepends"][dotname] = []
for dep in rq.rqdata.runtaskentries[tid].depends:
(depmc, depfn, deptaskname, deptaskfn) = bb.runqueue.split_tid_mcfn(dep)
deppn = self.recipecaches[mc].pkg_fn[deptaskfn]
dotname = "%s.%s" % (pn, bb.runqueue.taskname_from_tid(tid))
if not dotname in depend_tree["tdepends"]:
depend_tree["tdepends"][dotname] = []
depend_tree["tdepends"][dotname].append("%s.%s" % (deppn, bb.runqueue.taskname_from_tid(dep)))
if taskfn not in seen_fns:
seen_fns.append(taskfn)
@@ -1172,12 +1163,14 @@ class BBCooker:
"""
Setup any variables needed before starting a build
"""
t = time.gmtime()
if not self.data.getVar("BUILDNAME", False):
self.data.setVar("BUILDNAME", "${DATE}${TIME}")
self.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', t))
self.data.setVar("DATE", time.strftime('%Y%m%d', t))
self.data.setVar("TIME", time.strftime('%H%M%S', t))
t = time.gmtime()
for mc in self.databuilder.mcdata:
ds = self.databuilder.mcdata[mc]
if not ds.getVar("BUILDNAME", False):
ds.setVar("BUILDNAME", "${DATE}${TIME}")
ds.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', t))
ds.setVar("DATE", time.strftime('%Y%m%d', t))
ds.setVar("TIME", time.strftime('%H%M%S', t))
def reset_mtime_caches(self):
"""
@@ -1230,21 +1223,27 @@ class BBCooker:
raise NoSpecificMatch
return matches[0]
def buildFile(self, buildfile, task, hidewarning=False):
def buildFile(self, buildfile, task):
"""
Build the file matching regexp buildfile
"""
bb.event.fire(bb.event.BuildInit(), self.data)
if not hidewarning:
# Too many people use -b because they think it's how you normally
# specify a target to be built, so show a warning
bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.")
# Too many people use -b because they think it's how you normally
# specify a target to be built, so show a warning
bb.warn("Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.")
# Parse the configuration here. We need to do it explicitly here since
# buildFile() doesn't use the cache
self.parseConfiguration()
self.buildFileInternal(buildfile, task)
def buildFileInternal(self, buildfile, task, fireevents=True, quietlog=False):
"""
Build the file matching regexp buildfile
"""
# If we are told to do the None task then query the default task
if (task == None):
task = self.configuration.cmd
@@ -1281,8 +1280,8 @@ class BBCooker:
# Remove external dependencies
self.recipecaches[mc].task_deps[fn]['depends'] = {}
self.recipecaches[mc].deps[fn] = []
self.recipecaches[mc].rundeps[fn] = []
self.recipecaches[mc].runrecs[fn] = []
self.recipecaches[mc].rundeps[fn] = defaultdict(list)
self.recipecaches[mc].runrecs[fn] = defaultdict(list)
# Invalidate task for target if force mode active
if self.configuration.force:
@@ -1292,10 +1291,15 @@ class BBCooker:
# Setup taskdata structure
taskdata = {}
taskdata[mc] = bb.taskdata.TaskData(self.configuration.abort)
taskdata[mc].add_provider(self.data, self.recipecaches[mc], item)
taskdata[mc].add_provider(self.databuilder.mcdata[mc], self.recipecaches[mc], item)
buildname = self.data.getVar("BUILDNAME")
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.data)
if quietlog:
rqloglevel = bb.runqueue.logger.getEffectiveLevel()
bb.runqueue.logger.setLevel(logging.WARNING)
buildname = self.databuilder.mcdata[mc].getVar("BUILDNAME")
if fireevents:
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.databuilder.mcdata[mc])
# Execute the runqueue
runlist = [[mc, item, task, fn]]
@@ -1322,11 +1326,16 @@ class BBCooker:
retval = False
except SystemExit as exc:
self.command.finishAsyncCommand(str(exc))
if quietlog:
bb.runqueue.logger.setLevel(rqloglevel)
return False
if not retval:
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, item, failures, interrupted), self.data)
if fireevents:
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, item, failures, interrupted), self.databuilder.mcdata[mc])
self.command.finishAsyncCommand(msg)
if quietlog:
bb.runqueue.logger.setLevel(rqloglevel)
return False
if retval is True:
return True
@@ -1362,7 +1371,8 @@ class BBCooker:
if not retval:
try:
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data)
for mc in self.multiconfigs:
bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.databuilder.mcdata[mc])
finally:
self.command.finishAsyncCommand(msg)
return False
@@ -1395,7 +1405,8 @@ class BBCooker:
ntargets.append("multiconfig:%s:%s:%s" % (target[0], target[1], target[2]))
ntargets.append("%s:%s" % (target[1], target[2]))
bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.data)
for mc in self.multiconfigs:
bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.databuilder.mcdata[mc])
rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
if 'universe' in targets:
@@ -1553,33 +1564,6 @@ class BBCooker:
def post_serve(self):
prserv.serv.auto_shutdown(self.data)
bb.event.fire(CookerExit(), self.data)
lockfile = self.lock.name
self.lock.close()
self.lock = None
while not self.lock:
with bb.utils.timeout(3):
self.lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=True)
if not self.lock:
# Some systems may not have lsof available
procs = None
try:
procs = subprocess.check_output(["lsof", '-w', lockfile], stderr=subprocess.STDOUT)
except OSError as e:
if e.errno != errno.ENOENT:
raise
if procs is None:
# Fall back to fuser if lsof is unavailable
try:
procs = subprocess.check_output(["fuser", '-v', lockfile], stderr=subprocess.STDOUT)
except OSError as e:
if e.errno != errno.ENOENT:
raise
msg = "Delaying shutdown due to active processes which appear to be holding bitbake.lock"
if procs:
msg += ":\n%s" % str(procs)
print(msg)
def shutdown(self, force = False):
@@ -1601,46 +1585,10 @@ class BBCooker:
def clientComplete(self):
"""Called when the client is done using the server"""
if self.configuration.server_only:
self.finishcommand()
else:
self.shutdown(True)
self.finishcommand()
self.databuilder.reset()
self.data = self.databuilder.data
def lockBitbake(self):
if not hasattr(self, 'lock'):
self.lock = None
if self.data:
lockfile = self.data.expand("${TOPDIR}/bitbake.lock")
if lockfile:
self.lock = bb.utils.lockfile(lockfile, False, False)
return self.lock
def unlockBitbake(self):
if hasattr(self, 'lock') and self.lock:
bb.utils.unlockfile(self.lock)
def server_main(cooker, func, *args):
cooker.pre_serve()
if cooker.configuration.profile:
try:
import cProfile as profile
except:
import profile
prof = profile.Profile()
ret = profile.Profile.runcall(prof, func, *args)
prof.dump_stats("profile.log")
bb.utils.process_profilelog("profile.log")
print("Raw profiling information saved to profile.log and processed statistics to profile.log.processed")
else:
ret = func(*args)
cooker.post_serve()
return ret
class CookerExit(bb.event.Event):
"""

View File

@@ -73,15 +73,15 @@ class ConfigParameters(object):
def updateToServer(self, server, environment):
options = {}
for o in ["abort", "tryaltconfigs", "force", "invalidate_stamp",
"verbose", "debug", "dry_run", "dump_signatures",
for o in ["abort", "tryaltconfigs", "force", "invalidate_stamp",
"verbose", "debug", "dry_run", "dump_signatures",
"debug_domains", "extra_assume_provided", "profile",
"prefile", "postfile", "tracking"]:
"prefile", "postfile", "tracking", "server_timeout"]:
options[o] = getattr(self.options, o)
ret, error = server.runCommand(["updateConfig", options, environment, sys.argv])
if error:
raise Exception("Unable to update the server configuration with local parameters: %s" % error)
raise Exception("Unable to update the server configuration with local parameters: %s" % error)
def parseActions(self):
# Parse any commandline into actions
@@ -144,7 +144,8 @@ class CookerConfiguration(object):
self.dump_signatures = []
self.dry_run = False
self.tracking = False
self.interface = []
self.xmlrpcinterface = []
self.server_timeout = None
self.writeeventlog = False
self.server_only = False
self.limited_deps = False
@@ -173,7 +174,7 @@ class CookerConfiguration(object):
def __setstate__(self,state):
for k in state:
setattr(self, k, state[k])
setattr(self, k, state[k])
def catch_parse_error(func):
@@ -230,6 +231,27 @@ def findConfigFile(configfile, data):
return None
#
# We search for a conf/bblayers.conf under an entry in BBPATH or in cwd working
# up to /. If that fails, we search for a conf/bitbake.conf in BBPATH.
#
def findTopdir():
d = bb.data.init()
bbpath = None
if 'BBPATH' in os.environ:
bbpath = os.environ['BBPATH']
d.setVar('BBPATH', bbpath)
layerconf = findConfigFile("bblayers.conf", d)
if layerconf:
return os.path.dirname(os.path.dirname(layerconf))
if bbpath:
bitbakeconf = bb.utils.which(bbpath, "conf/bitbake.conf")
if bitbakeconf:
return os.path.dirname(os.path.dirname(bitbakeconf))
return None
class CookerDataBuilder(object):
def __init__(self, cookercfg, worker = False):
@@ -255,7 +277,7 @@ class CookerDataBuilder(object):
filtered_keys = bb.utils.approved_variables()
bb.data.inheritFromOS(self.basedata, self.savedenv, filtered_keys)
self.basedata.setVar("BB_ORIGENV", self.savedenv)
if worker:
self.basedata.setVar("BB_WORKERCONTEXT", "1")
@@ -294,6 +316,8 @@ class CookerDataBuilder(object):
mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config)
bb.event.fire(bb.event.ConfigParsed(), mcdata)
self.mcdata[config] = mcdata
if multiconfig:
bb.event.fire(bb.event.MultiConfigParsed(self.mcdata), self.data)
except (SyntaxError, bb.BBHandledException):
raise bb.BBHandledException
@@ -304,6 +328,15 @@ class CookerDataBuilder(object):
logger.exception("Error parsing configuration files")
raise bb.BBHandledException
# Create a copy so we can reset at a later date when UIs disconnect
self.origdata = self.data
self.data = bb.data.createCopy(self.origdata)
self.mcdata[''] = self.data
def reset(self):
self.data = bb.data.createCopy(self.origdata)
self.mcdata[''] = self.data
def _findLayerConf(self, data):
return findConfigFile("bblayers.conf", data)

View File

@@ -1,48 +1,14 @@
"""
Python Daemonizing helper
Configurable daemon behaviors:
1.) The current working directory set to the "/" directory.
2.) The current file creation mode mask set to 0.
3.) Close all open files (1024).
4.) Redirect standard I/O streams to "/dev/null".
A failed call to fork() now raises an exception.
References:
1) Advanced Programming in the Unix Environment: W. Richard Stevens
http://www.apuebook.com/apue3e.html
2) The Linux Programming Interface: Michael Kerrisk
http://man7.org/tlpi/index.html
3) Unix Programming Frequently Asked Questions:
http://www.faqs.org/faqs/unix-faq/programmer/faq/
Modified to allow a function to be daemonized and return for
bitbake use by Richard Purdie
Originally based on code Copyright (C) 2005 Chad J. Schroeder but now heavily modified
to allow a function to be daemonized and return for bitbake use by Richard Purdie
"""
__author__ = "Chad J. Schroeder"
__copyright__ = "Copyright (C) 2005 Chad J. Schroeder"
__version__ = "0.2"
# Standard Python modules.
import os # Miscellaneous OS interfaces.
import sys # System-specific parameters and functions.
# Default daemon parameters.
# File mode creation mask of the daemon.
# For BitBake's children, we do want to inherit the parent umask.
UMASK = None
# Default maximum for the number of available file descriptors.
MAXFD = 1024
# The standard I/O file descriptors are redirected to /dev/null by default.
if (hasattr(os, "devnull")):
REDIRECT_TO = os.devnull
else:
REDIRECT_TO = "/dev/null"
import os
import sys
import io
import traceback
def createDaemon(function, logfile):
"""
@@ -65,36 +31,6 @@ def createDaemon(function, logfile):
# leader of the new process group, we call os.setsid(). The process is
# also guaranteed not to have a controlling terminal.
os.setsid()
# Is ignoring SIGHUP necessary?
#
# It's often suggested that the SIGHUP signal should be ignored before
# the second fork to avoid premature termination of the process. The
# reason is that when the first child terminates, all processes, e.g.
# the second child, in the orphaned group will be sent a SIGHUP.
#
# "However, as part of the session management system, there are exactly
# two cases where SIGHUP is sent on the death of a process:
#
# 1) When the process that dies is the session leader of a session that
# is attached to a terminal device, SIGHUP is sent to all processes
# in the foreground process group of that terminal device.
# 2) When the death of a process causes a process group to become
# orphaned, and one or more processes in the orphaned group are
# stopped, then SIGHUP and SIGCONT are sent to all members of the
# orphaned group." [2]
#
# The first case can be ignored since the child is guaranteed not to have
# a controlling terminal. The second case isn't so easy to dismiss.
# The process group is orphaned when the first child terminates and
# POSIX.1 requires that every STOPPED process in an orphaned process
# group be sent a SIGHUP signal followed by a SIGCONT signal. Since the
# second child is not STOPPED though, we can safely forego ignoring the
# SIGHUP signal. In any case, there are no ill-effects if it is ignored.
#
# import signal # Set handlers for asynchronous events.
# signal.signal(signal.SIGHUP, signal.SIG_IGN)
try:
# Fork a second child and exit immediately to prevent zombies. This
# causes the second child process to be orphaned, making the init
@@ -108,86 +44,39 @@ def createDaemon(function, logfile):
except OSError as e:
raise Exception("%s [%d]" % (e.strerror, e.errno))
if (pid == 0): # The second child.
# We probably don't want the file mode creation mask inherited from
# the parent, so we give the child complete control over permissions.
if UMASK is not None:
os.umask(UMASK)
else:
if (pid != 0):
# Parent (the first child) of the second child.
# exit() or _exit()?
# _exit is like exit(), but it doesn't call any functions registered
# with atexit (and on_exit) or any registered signal handlers. It also
# closes any open file descriptors. Using exit() may cause all stdio
# streams to be flushed twice and any temporary files may be unexpectedly
# removed. It's therefore recommended that child branches of a fork()
# and the parent branch(es) of a daemon use _exit().
os._exit(0)
else:
# exit() or _exit()?
# _exit is like exit(), but it doesn't call any functions registered
# with atexit (and on_exit) or any registered signal handlers. It also
# closes any open file descriptors. Using exit() may cause all stdio
# streams to be flushed twice and any temporary files may be unexpectedly
# removed. It's therefore recommended that child branches of a fork()
# and the parent branch(es) of a daemon use _exit().
os.waitpid(pid, 0)
return
# Close all open file descriptors. This prevents the child from keeping
# open any file descriptors inherited from the parent. There is a variety
# of methods to accomplish this task. Three are listed below.
#
# Try the system configuration variable, SC_OPEN_MAX, to obtain the maximum
# number of open file descriptors to close. If it doesn't exist, use
# the default value (configurable).
#
# try:
# maxfd = os.sysconf("SC_OPEN_MAX")
# except (AttributeError, ValueError):
# maxfd = MAXFD
#
# OR
#
# if (os.sysconf_names.has_key("SC_OPEN_MAX")):
# maxfd = os.sysconf("SC_OPEN_MAX")
# else:
# maxfd = MAXFD
#
# OR
#
# Use the getrlimit method to retrieve the maximum file descriptor number
# that can be opened by this process. If there is no limit on the
# resource, use the default value.
#
import resource # Resource usage information.
maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
if (maxfd == resource.RLIM_INFINITY):
maxfd = MAXFD
# Iterate through and close all file descriptors.
# for fd in range(0, maxfd):
# try:
# os.close(fd)
# except OSError: # ERROR, fd wasn't open to begin with (ignored)
# pass
# Redirect the standard I/O file descriptors to the specified file. Since
# the daemon has no controlling terminal, most daemons redirect stdin,
# stdout, and stderr to /dev/null. This is done to prevent side-effects
# from reads and writes to the standard I/O file descriptors.
# This call to open is guaranteed to return the lowest file descriptor,
# which will be 0 (stdin), since it was closed above.
# os.open(REDIRECT_TO, os.O_RDWR) # standard input (0)
# Duplicate standard input to standard output and standard error.
# os.dup2(0, 1) # standard output (1)
# os.dup2(0, 2) # standard error (2)
# The second child.
# Replace standard fds with our own
si = open('/dev/null', 'r')
so = open(logfile, 'w')
se = so
# Replace those fds with our own
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
function()
try:
so = open(logfile, 'a+')
se = so
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
except io.UnsupportedOperation:
sys.stdout = open(logfile, 'a+')
sys.stderr = sys.stdout
os._exit(0)
try:
function()
except Exception as e:
traceback.print_exc()
finally:
bb.event.print_ui_queue()
os._exit(0)

View File

@@ -290,7 +290,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
return deps, value
varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "exports", "postfuncs", "prefuncs", "lineno", "filename"]) or {}
vardeps = varflags.get("vardeps")
value = d.getVar(key, False)
value = d.getVarFlag(key, "_content", False)
def handle_contains(value, contains, d):
newvalue = ""

View File

@@ -149,23 +149,30 @@ def print_ui_queue():
# First check to see if we have any proper messages
msgprint = False
msgerrs = False
# Should we print to stderr?
for event in ui_queue[:]:
if isinstance(event, logging.LogRecord) and event.levelno >= logging.WARNING:
msgerrs = True
break
if msgerrs:
logger.addHandler(stderr)
else:
logger.addHandler(stdout)
for event in ui_queue[:]:
if isinstance(event, logging.LogRecord):
if event.levelno > logging.DEBUG:
if event.levelno >= logging.WARNING:
logger.addHandler(stderr)
else:
logger.addHandler(stdout)
logger.handle(event)
msgprint = True
if msgprint:
return
# Nope, so just print all of the messages we have (including debug messages)
logger.addHandler(stdout)
for event in ui_queue[:]:
if isinstance(event, logging.LogRecord):
logger.handle(event)
if not msgprint:
for event in ui_queue[:]:
if isinstance(event, logging.LogRecord):
logger.handle(event)
def fire_ui_handlers(event, d):
global _thread_lock
@@ -212,6 +219,12 @@ def fire(event, d):
if worker_fire:
worker_fire(event, d)
else:
# If messages have been queued up, clear the queue
global _uiready, ui_queue
if _uiready and ui_queue:
for queue_event in ui_queue:
fire_ui_handlers(queue_event, d)
ui_queue = []
fire_ui_handlers(event, d)
def fire_from_worker(event, d):
@@ -264,6 +277,11 @@ def register(name, handler, mask=None, filename=None, lineno=None):
def remove(name, handler):
"""Remove an Event handler"""
_handlers.pop(name)
if name in _catchall_handlers:
_catchall_handlers.pop(name)
for event in _event_handler_map.keys():
if name in _event_handler_map[event]:
_event_handler_map[event].pop(name)
def get_handlers():
return _handlers
@@ -277,20 +295,28 @@ def set_eventfilter(func):
_eventfilter = func
def register_UIHhandler(handler, mainui=False):
if mainui:
global _uiready
_uiready = True
bb.event._ui_handler_seq = bb.event._ui_handler_seq + 1
_ui_handlers[_ui_handler_seq] = handler
level, debug_domains = bb.msg.constructLogOptions()
_ui_logfilters[_ui_handler_seq] = UIEventFilter(level, debug_domains)
if mainui:
global _uiready
_uiready = _ui_handler_seq
return _ui_handler_seq
def unregister_UIHhandler(handlerNum):
def unregister_UIHhandler(handlerNum, mainui=False):
if mainui:
global _uiready
_uiready = False
if handlerNum in _ui_handlers:
del _ui_handlers[handlerNum]
return
def get_uihandler():
if _uiready is False:
return None
return _uiready
# Class to allow filtering of events and specific filtering of LogRecords *before* we put them over the IPC
class UIEventFilter(object):
def __init__(self, level, debug_domains):
@@ -353,6 +379,12 @@ class OperationProgress(Event):
class ConfigParsed(Event):
"""Configuration Parsing Complete"""
class MultiConfigParsed(Event):
"""Multi-Config Parsing Complete"""
def __init__(self, mcdata):
self.mcdata = mcdata
Event.__init__(self)
class RecipeEvent(Event):
def __init__(self, fn):
self.fn = fn
@@ -496,6 +528,28 @@ class NoProvider(Event):
def isRuntime(self):
return self._runtime
def __str__(self):
msg = ''
if self._runtime:
r = "R"
else:
r = ""
extra = ''
if not self._reasons:
if self._close_matches:
extra = ". Close matches:\n %s" % '\n '.join(self._close_matches)
if self._dependees:
msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s" % (r, self._item, ", ".join(self._dependees), r, extra)
else:
msg = "Nothing %sPROVIDES '%s'%s" % (r, self._item, extra)
if self._reasons:
for reason in self._reasons:
msg += '\n' + reason
return msg
class MultipleProviders(Event):
"""Multiple Providers"""
@@ -523,6 +577,16 @@ class MultipleProviders(Event):
"""
return self._candidates
def __str__(self):
msg = "Multiple providers are available for %s%s (%s)" % (self._is_runtime and "runtime " or "",
self._item,
", ".join(self._candidates))
rtime = ""
if self._is_runtime:
rtime = "R"
msg += "\nConsider defining a PREFERRED_%sPROVIDER entry to match %s" % (rtime, self._item)
return msg
class ParseStarted(OperationStarted):
"""Recipe parsing for the runqueue has begun"""
def __init__(self, total):
@@ -616,14 +680,6 @@ class FilesMatchingFound(Event):
self._pattern = pattern
self._matches = matches
class CoreBaseFilesFound(Event):
"""
Event when a list of appropriate config files has been generated
"""
def __init__(self, paths):
Event.__init__(self)
self._paths = paths
class ConfigFilesFound(Event):
"""
Event when a list of appropriate config files has been generated
@@ -694,19 +750,6 @@ class LogHandler(logging.Handler):
record.taskpid = worker_pid
return True
class RequestPackageInfo(Event):
"""
Event to request package information
"""
class PackageInfo(Event):
"""
Package information for GUI
"""
def __init__(self, pkginfolist):
Event.__init__(self)
self._pkginfolist = pkginfolist
class MetadataEvent(Event):
"""
Generic event that target for OE-Core classes
@@ -784,3 +827,10 @@ class NetworkTestFailed(Event):
Event to indicate network test has failed
"""
class FindSigInfoResult(Event):
"""
Event to return results from findSigInfo command
"""
def __init__(self, result):
Event.__init__(self)
self.result = result

View File

@@ -39,6 +39,7 @@ import errno
import bb.persist_data, bb.utils
import bb.checksum
import bb.process
import bb.event
__version__ = "2"
_checksum_cache = bb.checksum.FileChecksumCache()
@@ -48,11 +49,11 @@ logger = logging.getLogger("BitBake.Fetcher")
class BBFetchException(Exception):
"""Class all fetch exceptions inherit from"""
def __init__(self, message):
self.msg = message
Exception.__init__(self, message)
self.msg = message
Exception.__init__(self, message)
def __str__(self):
return self.msg
return self.msg
class UntrustedUrl(BBFetchException):
"""Exception raised when encountering a host not listed in BB_ALLOWED_NETWORKS"""
@@ -68,24 +69,24 @@ class UntrustedUrl(BBFetchException):
class MalformedUrl(BBFetchException):
"""Exception raised when encountering an invalid url"""
def __init__(self, url, message=''):
if message:
msg = message
else:
msg = "The URL: '%s' is invalid and cannot be interpreted" % url
self.url = url
BBFetchException.__init__(self, msg)
self.args = (url,)
if message:
msg = message
else:
msg = "The URL: '%s' is invalid and cannot be interpreted" % url
self.url = url
BBFetchException.__init__(self, msg)
self.args = (url,)
class FetchError(BBFetchException):
"""General fetcher exception when something happens incorrectly"""
def __init__(self, message, url = None):
if url:
if url:
msg = "Fetcher failure for URL: '%s'. %s" % (url, message)
else:
else:
msg = "Fetcher failure: %s" % message
self.url = url
BBFetchException.__init__(self, msg)
self.args = (message, url)
self.url = url
BBFetchException.__init__(self, msg)
self.args = (message, url)
class ChecksumError(FetchError):
"""Exception when mismatched checksum encountered"""
@@ -99,49 +100,56 @@ class NoChecksumError(FetchError):
class UnpackError(BBFetchException):
"""General fetcher exception when something happens incorrectly when unpacking"""
def __init__(self, message, url):
msg = "Unpack failure for URL: '%s'. %s" % (url, message)
self.url = url
BBFetchException.__init__(self, msg)
self.args = (message, url)
msg = "Unpack failure for URL: '%s'. %s" % (url, message)
self.url = url
BBFetchException.__init__(self, msg)
self.args = (message, url)
class NoMethodError(BBFetchException):
"""Exception raised when there is no method to obtain a supplied url or set of urls"""
def __init__(self, url):
msg = "Could not find a fetcher which supports the URL: '%s'" % url
self.url = url
BBFetchException.__init__(self, msg)
self.args = (url,)
msg = "Could not find a fetcher which supports the URL: '%s'" % url
self.url = url
BBFetchException.__init__(self, msg)
self.args = (url,)
class MissingParameterError(BBFetchException):
"""Exception raised when a fetch method is missing a critical parameter in the url"""
def __init__(self, missing, url):
msg = "URL: '%s' is missing the required parameter '%s'" % (url, missing)
self.url = url
self.missing = missing
BBFetchException.__init__(self, msg)
self.args = (missing, url)
msg = "URL: '%s' is missing the required parameter '%s'" % (url, missing)
self.url = url
self.missing = missing
BBFetchException.__init__(self, msg)
self.args = (missing, url)
class ParameterError(BBFetchException):
"""Exception raised when a url cannot be proccessed due to invalid parameters."""
def __init__(self, message, url):
msg = "URL: '%s' has invalid parameters. %s" % (url, message)
self.url = url
BBFetchException.__init__(self, msg)
self.args = (message, url)
msg = "URL: '%s' has invalid parameters. %s" % (url, message)
self.url = url
BBFetchException.__init__(self, msg)
self.args = (message, url)
class NetworkAccess(BBFetchException):
"""Exception raised when network access is disabled but it is required."""
def __init__(self, url, cmd):
msg = "Network access disabled through BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY) but access requested with command %s (for url %s)" % (cmd, url)
self.url = url
self.cmd = cmd
BBFetchException.__init__(self, msg)
self.args = (url, cmd)
msg = "Network access disabled through BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY) but access requested with command %s (for url %s)" % (cmd, url)
self.url = url
self.cmd = cmd
BBFetchException.__init__(self, msg)
self.args = (url, cmd)
class NonLocalMethod(Exception):
def __init__(self):
Exception.__init__(self)
class MissingChecksumEvent(bb.event.Event):
def __init__(self, url, md5sum, sha256sum):
self.url = url
self.checksums = {'md5sum': md5sum,
'sha256sum': sha256sum}
bb.event.Event.__init__(self)
class URI(object):
"""
@@ -455,7 +463,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
result_decoded[loc][k] = uri_replace_decoded[loc][k]
elif (re.match(regexp, uri_decoded[loc])):
if not uri_replace_decoded[loc]:
result_decoded[loc] = ""
result_decoded[loc] = ""
else:
for k in replacements:
uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k])
@@ -584,6 +592,14 @@ def verify_checksum(ud, d, precomputed={}):
ud.sha256_name, sha256data))
raise NoChecksumError('Missing SRC_URI checksum', ud.url)
bb.event.fire(MissingChecksumEvent(ud.url, md5data, sha256data), d)
if strict == "ignore":
return {
_MD5_KEY: md5data,
_SHA256_KEY: sha256data
}
# Log missing sums so user can more easily add them
logger.warning('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
'SRC_URI[%s] = "%s"',
@@ -733,7 +749,7 @@ def get_srcrev(d, method_name='sortable_revision'):
In the multi SCM case, we build a value based on SRCREV_FORMAT which must
have been set.
The idea here is that we put the string "AUTOINC+" into return value if the revisions are not
The idea here is that we put the string "AUTOINC+" into return value if the revisions are not
incremental, other code is then responsible for turning that into an increasing value (if needed)
A method_name can be supplied to retrieve an alternatively formatted revision from a fetcher, if
@@ -785,7 +801,7 @@ def get_srcrev(d, method_name='sortable_revision'):
format = re.sub(name_to_rev_re, lambda match: name_to_rev[match.group(0)], format)
if seenautoinc:
format = "AUTOINC+" + format
format = "AUTOINC+" + format
return format
@@ -921,7 +937,7 @@ def build_mirroruris(origud, mirrors, ld):
logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
logger.debug(1, str(e))
try:
# setup_localpath of file:// urls may fail, we should still see
# setup_localpath of file:// urls may fail, we should still see
# if mirrors of the url exist
adduri(newud, uris, uds, localmirrors, tarballs)
except UnboundLocalError:
@@ -1017,7 +1033,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
except IOError as e:
if e.errno in [os.errno.ESTALE]:
logger.warn("Stale Error Observed %s." % ud.url)
logger.warning("Stale Error Observed %s." % ud.url)
return False
raise
@@ -1117,7 +1133,7 @@ def srcrev_internal_helper(ud, d, name):
attempts.append("SRCREV")
for a in attempts:
srcrev = d.getVar(a)
srcrev = d.getVar(a)
if srcrev and srcrev != "INVALID":
break
@@ -1230,7 +1246,7 @@ class FetchData(object):
for m in methods:
if m.supports(self, d):
self.method = m
break
break
if not self.method:
raise NoMethodError(url)
@@ -1265,7 +1281,7 @@ class FetchData(object):
elif self.basepath or self.basename:
basepath = dldir + os.sep + (self.basepath or self.basename)
else:
bb.fatal("Can't determine lock path for url %s" % url)
bb.fatal("Can't determine lock path for url %s" % url)
self.donestamp = basepath + '.done'
self.lockfile = basepath + '.lock'
@@ -1328,13 +1344,13 @@ class FetchMethod(object):
if os.path.isdir(urldata.localpath) == True:
return False
if urldata.localpath.find("*") != -1:
return False
return False
return True
def recommends_checksum(self, urldata):
"""
Is the backend on where checksumming is recommended (should warnings
Is the backend on where checksumming is recommended (should warnings
be displayed if there is no checksum)?
"""
return False
@@ -1614,13 +1630,22 @@ class Fetch(object):
try:
self.d.setVar("BB_NO_NETWORK", network)
if verify_donestamp(ud, self.d) and not m.need_update(ud, self.d):
localpath = ud.localpath
elif m.try_premirror(ud, self.d):
logger.debug(1, "Trying PREMIRRORS")
mirrors = mirror_from_string(self.d.getVar('PREMIRRORS'))
localpath = try_mirrors(self, self.d, ud, mirrors, False)
if localpath:
try:
# early checksum verification so that if the checksum of the premirror
# contents mismatch the fetcher can still try upstream and mirrors
update_stamp(ud, self.d)
except ChecksumError as e:
logger.warning("Checksum failure encountered with premirror download of %s - will attempt other sources." % u)
logger.debug(1, str(e))
localpath = ""
if premirroronly:
self.d.setVar("BB_NO_NETWORK", "1")
@@ -1701,9 +1726,8 @@ class Fetch(object):
ret = try_mirrors(self, self.d, ud, mirrors, True)
if not ret:
# Next try checking from the original uri, u
try:
ret = m.checkstatus(self, ud, self.d)
except:
ret = m.checkstatus(self, ud, self.d)
if not ret:
# Finally, try checking uri, u, from MIRRORS
mirrors = mirror_from_string(self.d.getVar('MIRRORS'))
ret = try_mirrors(self, self.d, ud, mirrors, True)
@@ -1713,7 +1737,7 @@ class Fetch(object):
def unpack(self, root, urls=None):
"""
Check all urls exist upstream
Unpack urls to root
"""
if not urls:

View File

@@ -92,7 +92,7 @@ class Npm(FetchMethod):
ud.write_tarballs = ((d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0") != "0")
mirrortarball = 'npm_%s-%s.tar.xz' % (ud.pkgname, ud.version)
mirrortarball = ud.mirrortarball.replace('/', '-')
mirrortarball = mirrortarball.replace('/', '-')
ud.fullmirror = os.path.join(d.getVar("DL_DIR"), mirrortarball)
ud.mirrortarballs = [mirrortarball]

View File

@@ -30,6 +30,7 @@ import tempfile
import subprocess
import os
import logging
import errno
import bb
import bb.progress
import urllib.request, urllib.parse, urllib.error
@@ -89,13 +90,13 @@ class Wget(FetchMethod):
self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate"
def _runwget(self, ud, d, command, quiet):
def _runwget(self, ud, d, command, quiet, workdir=None):
progresshandler = WgetProgressHandler(d)
logger.debug(2, "Fetching %s using command '%s'" % (ud.url, command))
bb.fetch2.check_network_access(d, command, ud.url)
runfetchcmd(command + ' --progress=dot -v', d, quiet, log=progresshandler)
runfetchcmd(command + ' --progress=dot -v', d, quiet, log=progresshandler, workdir=workdir)
def download(self, ud, d):
"""Fetch urls"""
@@ -206,8 +207,21 @@ class Wget(FetchMethod):
h.request(req.get_method(), req.selector, req.data, headers)
except socket.error as err: # XXX what error?
# Don't close connection when cache is enabled.
# Instead, try to detect connections that are no longer
# usable (for example, closed unexpectedly) and remove
# them from the cache.
if fetch.connection_cache is None:
h.close()
elif isinstance(err, OSError) and err.errno == errno.EBADF:
# This happens when the server closes the connection despite the Keep-Alive.
# Apparently urllib then uses the file descriptor, expecting it to be
# connected, when in reality the connection is already gone.
# We let the request fail and expect it to be
# tried once more ("try_again" in check_status()),
# with the dead connection removed from the cache.
# If it still fails, we give up, which can happend for bad
# HTTP proxy settings.
fetch.connection_cache.remove_connection(h.host, h.port)
raise urllib.error.URLError(err)
else:
try:
@@ -269,11 +283,6 @@ class Wget(FetchMethod):
"""
http_error_403 = http_error_405
"""
Some servers (e.g. FusionForge) returns 406 Not Acceptable when they
actually mean 405 Method Not Allowed.
"""
http_error_406 = http_error_405
class FixedHTTPRedirectHandler(urllib.request.HTTPRedirectHandler):
"""
@@ -302,7 +311,9 @@ class Wget(FetchMethod):
uri = ud.url.split(";")[0]
r = urllib.request.Request(uri)
r.get_method = lambda: "HEAD"
# Some servers (FusionForge, as used on Alioth) require that the
# optional Accept header is set.
r.add_header("Accept", "*/*")
def add_basic_auth(login_str, request):
'''Adds Basic auth to http request, pass in login:password as string'''
import base64
@@ -408,17 +419,16 @@ class Wget(FetchMethod):
Run fetch checkstatus to get directory information
"""
f = tempfile.NamedTemporaryFile()
with tempfile.TemporaryDirectory(prefix="wget-index-") as workdir, tempfile.NamedTemporaryFile(dir=workdir, prefix="wget-listing-") as f:
agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12"
fetchcmd = self.basecmd
fetchcmd += " -O " + f.name + " --user-agent='" + agent + "' '" + uri + "'"
try:
self._runwget(ud, d, fetchcmd, True, workdir=workdir)
fetchresult = f.read()
except bb.fetch2.BBFetchException:
fetchresult = ""
agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12"
fetchcmd = self.basecmd
fetchcmd += " -O " + f.name + " --user-agent='" + agent + "' '" + uri + "'"
try:
self._runwget(ud, d, fetchcmd, True)
fetchresult = f.read()
except bb.fetch2.BBFetchException:
fetchresult = ""
f.close()
return fetchresult
def _check_latest_version(self, url, package, package_regex, current_version, ud, d):

View File

@@ -28,6 +28,8 @@ import logging
import optparse
import warnings
import fcntl
import time
import traceback
import bb
from bb import event
@@ -37,6 +39,9 @@ from bb import ui
from bb import server
from bb import cookerdata
import bb.server.process
import bb.server.xmlrpcclient
logger = logging.getLogger("BitBake")
class BBMainException(Exception):
@@ -58,9 +63,6 @@ class BitbakeHelpFormatter(optparse.IndentedHelpFormatter):
if option.dest == 'ui':
valid_uis = list_extension_modules(bb.ui, 'main')
option.help = option.help.replace('@CHOICES@', present_options(valid_uis))
elif option.dest == 'servertype':
valid_server_types = list_extension_modules(bb.server, 'BitBakeServer')
option.help = option.help.replace('@CHOICES@', present_options(valid_server_types))
return optparse.IndentedHelpFormatter.format_option(self, option)
@@ -238,11 +240,6 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
default=os.environ.get('BITBAKE_UI', 'knotty'),
help="The user interface to use (@CHOICES@ - default %default).")
# @CHOICES@ is substituted out by BitbakeHelpFormatter above
parser.add_option("-t", "--servertype", action="store", dest="servertype",
default=["process", "xmlrpc"]["BBSERVER" in os.environ],
help="Choose which server type to use (@CHOICES@ - default %default).")
parser.add_option("", "--token", action="store", dest="xmlrpctoken",
default=os.environ.get("BBTOKEN"),
help="Specify the connection token to be used when connecting "
@@ -258,14 +255,11 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
help="Run bitbake without a UI, only starting a server "
"(cooker) process.")
parser.add_option("", "--foreground", action="store_true",
help="Run bitbake server in foreground.")
parser.add_option("-B", "--bind", action="store", dest="bind", default=False,
help="The name/address for the bitbake server to bind to.")
help="The name/address for the bitbake xmlrpc server to bind to.")
parser.add_option("-T", "--idle-timeout", type=int,
default=int(os.environ.get("BBTIMEOUT", "0")),
parser.add_option("-T", "--idle-timeout", type=float, dest="server_timeout",
default=float(os.environ.get("BB_SERVER_TIMEOUT", 0)) or None,
help="Set timeout to unload bitbake server due to inactivity")
parser.add_option("", "--no-setscene", action="store_true",
@@ -283,7 +277,7 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("-m", "--kill-server", action="store_true",
dest="kill_server", default=False,
help="Terminate the remote server.")
help="Terminate any running bitbake server.")
parser.add_option("", "--observe-only", action="store_true",
dest="observe_only", default=False,
@@ -322,70 +316,20 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
eventlog = "bitbake_eventlog_%s.json" % datetime.now().strftime("%Y%m%d%H%M%S")
options.writeeventlog = eventlog
# if BBSERVER says to autodetect, let's do that
if options.remote_server:
port = -1
if options.remote_server != 'autostart':
host, port = options.remote_server.split(":", 2)
if options.bind:
try:
#Checking that the port is a number and is a ':' delimited value
(host, port) = options.bind.split(':')
port = int(port)
# use automatic port if port set to -1, means read it from
# the bitbake.lock file; this is a bit tricky, but we always expect
# to be in the base of the build directory if we need to have a
# chance to start the server later, anyway
if port == -1:
lock_location = "./bitbake.lock"
# we try to read the address at all times; if the server is not started,
# we'll try to start it after the first connect fails, below
try:
lf = open(lock_location, 'r')
remotedef = lf.readline()
[host, port] = remotedef.split(":")
port = int(port)
lf.close()
options.remote_server = remotedef
except Exception as e:
if options.remote_server != 'autostart':
raise BBMainException("Failed to read bitbake.lock (%s), invalid port" % str(e))
except (ValueError,IndexError):
raise BBMainException("FATAL: Malformed host:port bind parameter")
options.xmlrpcinterface = (host, port)
else:
options.xmlrpcinterface = (None, 0)
return options, targets[1:]
def start_server(servermodule, configParams, configuration, features):
server = servermodule.BitBakeServer()
single_use = not configParams.server_only and os.getenv('BBSERVER') != 'autostart'
if configParams.bind:
(host, port) = configParams.bind.split(':')
server.initServer((host, int(port)), single_use=single_use,
idle_timeout=configParams.idle_timeout)
configuration.interface = [server.serverImpl.host, server.serverImpl.port]
else:
server.initServer(single_use=single_use)
configuration.interface = []
try:
configuration.setServerRegIdleCallback(server.getServerIdleCB())
cooker = bb.cooker.BBCooker(configuration, features)
server.addcooker(cooker)
server.saveConnectionDetails()
except Exception as e:
while hasattr(server, "event_queue"):
import queue
try:
event = server.event_queue.get(block=False)
except (queue.Empty, IOError):
break
if isinstance(event, logging.LogRecord):
logger.handle(event)
raise
if not configParams.foreground:
server.detach()
cooker.shutdown()
cooker.lock.close()
return server
def bitbake_main(configParams, configuration):
# Python multiprocessing requires /dev/shm on Linux
@@ -406,45 +350,15 @@ def bitbake_main(configParams, configuration):
configuration.setConfigParameters(configParams)
if configParams.server_only:
if configParams.servertype != "xmlrpc":
raise BBMainException("FATAL: If '--server-only' is defined, we must set the "
"servertype as 'xmlrpc'.\n")
if not configParams.bind:
raise BBMainException("FATAL: The '--server-only' option requires a name/address "
"to bind to with the -B option.\n")
else:
try:
#Checking that the port is a number
int(configParams.bind.split(":")[1])
except (ValueError,IndexError):
raise BBMainException(
"FATAL: Malformed host:port bind parameter")
if configParams.remote_server:
if configParams.server_only and configParams.remote_server:
raise BBMainException("FATAL: The '--server-only' option conflicts with %s.\n" %
("the BBSERVER environment variable" if "BBSERVER" in os.environ \
else "the '--remote-server' option"))
elif configParams.foreground:
raise BBMainException("FATAL: The '--foreground' option can only be used "
"with --server-only.\n")
if configParams.bind and configParams.servertype != "xmlrpc":
raise BBMainException("FATAL: If '-B' or '--bind' is defined, we must "
"set the servertype as 'xmlrpc'.\n")
if configParams.remote_server and configParams.servertype != "xmlrpc":
raise BBMainException("FATAL: If '--remote-server' is defined, we must "
"set the servertype as 'xmlrpc'.\n")
if configParams.observe_only and (not configParams.remote_server or configParams.bind):
if configParams.observe_only and not (configParams.remote_server or configParams.bind):
raise BBMainException("FATAL: '--observe-only' can only be used by UI clients "
"connecting to a server.\n")
if configParams.kill_server and not configParams.remote_server:
raise BBMainException("FATAL: '--kill-server' can only be used to "
"terminate a remote server")
if "BBDEBUG" in os.environ:
level = int(os.environ["BBDEBUG"])
if level > configuration.debug:
@@ -453,9 +367,13 @@ def bitbake_main(configParams, configuration):
bb.msg.init_msgconfig(configParams.verbose, configuration.debug,
configuration.debug_domains)
server, server_connection, ui_module = setup_bitbake(configParams, configuration)
if server_connection is None and configParams.kill_server:
return 0
server_connection, ui_module = setup_bitbake(configParams, configuration)
# No server connection
if server_connection is None:
if configParams.status_only:
return 1
if configParams.kill_server:
return 0
if not configParams.server_only:
if configParams.status_only:
@@ -463,16 +381,15 @@ def bitbake_main(configParams, configuration):
return 0
try:
for event in bb.event.ui_queue:
server_connection.events.queue_event(event)
bb.event.ui_queue = []
return ui_module.main(server_connection.connection, server_connection.events,
configParams)
finally:
bb.event.ui_queue = []
server_connection.terminate()
else:
print("Bitbake server address: %s, server port: %s" % (server.serverImpl.host,
server.serverImpl.port))
if configParams.foreground:
server.serverImpl.serve_forever()
return 0
return 1
@@ -495,58 +412,73 @@ def setup_bitbake(configParams, configuration, extrafeatures=None, setup_logging
# Collect the feature set for the UI
featureset = getattr(ui_module, "featureSet", [])
if configParams.server_only:
for param in ('prefile', 'postfile'):
value = getattr(configParams, param)
if value:
setattr(configuration, "%s_server" % param, value)
param = "%s_server" % param
if extrafeatures:
for feature in extrafeatures:
if not feature in featureset:
featureset.append(feature)
servermodule = import_extension_module(bb.server,
configParams.servertype,
'BitBakeServer')
server_connection = None
if configParams.remote_server:
if os.getenv('BBSERVER') == 'autostart':
if configParams.remote_server == 'autostart' or \
not servermodule.check_connection(configParams.remote_server, timeout=2):
configParams.bind = 'localhost:0'
srv = start_server(servermodule, configParams, configuration, featureset)
configParams.remote_server = '%s:%d' % tuple(configuration.interface)
bb.event.ui_queue = []
# we start a stub server that is actually a XMLRPClient that connects to a real server
from bb.server.xmlrpc import BitBakeXMLRPCClient
server = servermodule.BitBakeXMLRPCClient(configParams.observe_only,
configParams.xmlrpctoken)
server.saveConnectionDetails(configParams.remote_server)
# Connect to a remote XMLRPC server
server_connection = bb.server.xmlrpcclient.connectXMLRPC(configParams.remote_server, featureset,
configParams.observe_only, configParams.xmlrpctoken)
else:
# we start a server with a given configuration
server = start_server(servermodule, configParams, configuration, featureset)
retries = 8
while retries:
try:
topdir, lock = lockBitbake()
sockname = topdir + "/bitbake.sock"
if lock:
if configParams.status_only or configParams.kill_server:
logger.info("bitbake server is not running.")
lock.close()
return None, None
# we start a server with a given configuration
logger.info("Starting bitbake server...")
server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
# The server will handle any events already in the queue
bb.event.ui_queue = []
else:
logger.info("Reconnecting to bitbake server...")
if not os.path.exists(sockname):
print("Previous bitbake instance shutting down?, waiting to retry...")
time.sleep(5)
raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?")
if not configParams.server_only:
server_connection = bb.server.process.connectProcessServer(sockname, featureset)
if server_connection or configParams.server_only:
break
except (Exception, bb.server.process.ProcessTimeout) as e:
if not retries:
raise
retries -= 1
if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError)):
logger.info("Retrying server connection...")
else:
logger.info("Retrying server connection... (%s)" % traceback.format_exc())
if not retries:
bb.fatal("Unable to connect to bitbake server, or start one")
if retries < 5:
time.sleep(5)
if configParams.kill_server:
server_connection.connection.terminateServer()
server_connection.terminate()
bb.event.ui_queue = []
logger.info("Terminated bitbake server.")
return None, None
if configParams.server_only:
server_connection = None
else:
try:
server_connection = server.establishConnection(featureset)
except Exception as e:
bb.fatal("Could not connect to server %s: %s" % (configParams.remote_server, str(e)))
# Restore the environment in case the UI needs it
for k in cleanedvars:
os.environ[k] = cleanedvars[k]
if configParams.kill_server:
server_connection.connection.terminateServer()
bb.event.ui_queue = []
return None, None, None
logger.removeHandler(handler)
server_connection.setupEventQueue()
return server_connection, ui_module
# Restore the environment in case the UI needs it
for k in cleanedvars:
os.environ[k] = cleanedvars[k]
def lockBitbake():
topdir = bb.cookerdata.findTopdir()
lockfile = topdir + "/bitbake.lock"
return topdir, bb.utils.lockfile(lockfile, False, False)
logger.removeHandler(handler)
return server, server_connection, ui_module

View File

@@ -144,7 +144,7 @@ def handle(fn, d, include):
try:
statements.eval(d)
except bb.parse.SkipRecipe:
bb.data.setVar("__SKIPPED", True, d)
d.setVar("__SKIPPED", True)
if include == 0:
return { "" : d }

View File

@@ -2372,7 +2372,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
self.rq.scenequeue_covered = self.scenequeue_covered
self.rq.scenequeue_notcovered = self.scenequeue_notcovered
logger.debug(1, 'We can skip tasks %s', sorted(self.rq.scenequeue_covered))
logger.debug(1, 'We can skip tasks %s', "\n".join(sorted(self.rq.scenequeue_covered)))
self.rq.state = runQueueRunInit
@@ -2488,6 +2488,9 @@ class runQueueTaskFailed(runQueueEvent):
runQueueEvent.__init__(self, task, stats, rq)
self.exitcode = exitcode
def __str__(self):
return "Task (%s) failed with exit code '%s'" % (self.taskstring, self.exitcode)
class sceneQueueTaskFailed(sceneQueueEvent):
"""
Event notifying a setscene task failed
@@ -2496,6 +2499,9 @@ class sceneQueueTaskFailed(sceneQueueEvent):
sceneQueueEvent.__init__(self, task, stats, rq)
self.exitcode = exitcode
def __str__(self):
return "Setscene task (%s) failed with exit code '%s' - real task will be run instead" % (self.taskstring, self.exitcode)
class sceneQueueComplete(sceneQueueEvent):
"""
Event when all the sceneQueue tasks are complete

View File

@@ -18,82 +18,4 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
""" Base code for Bitbake server process
Have a common base for that all Bitbake server classes ensures a consistent
approach to the interface, and minimize risks associated with code duplication.
"""
""" BaseImplServer() the base class for all XXServer() implementations.
These classes contain the actual code that runs the server side, i.e.
listens for the commands and executes them. Although these implementations
contain all the data of the original bitbake command, i.e the cooker instance,
they may well run on a different process or even machine.
"""
class BaseImplServer():
def __init__(self):
self._idlefuns = {}
def addcooker(self, cooker):
self.cooker = cooker
def register_idle_function(self, function, data):
"""Register a function to be called while the server is idle"""
assert hasattr(function, '__call__')
self._idlefuns[function] = data
""" BitBakeBaseServerConnection class is the common ancestor to all
BitBakeServerConnection classes.
These classes control the remote server. The only command currently
implemented is the terminate() command.
"""
class BitBakeBaseServerConnection():
def __init__(self, serverImpl):
pass
def terminate(self):
pass
def setupEventQueue(self):
pass
""" BitBakeBaseServer class is the common ancestor to all Bitbake servers
Derive this class in order to implement a BitBakeServer which is the
controlling stub for the actual server implementation
"""
class BitBakeBaseServer(object):
def initServer(self):
self.serverImpl = None # we ensure a runtime crash if not overloaded
self.connection = None
return
def addcooker(self, cooker):
self.cooker = cooker
self.serverImpl.addcooker(cooker)
def getServerIdleCB(self):
return self.serverImpl.register_idle_function
def saveConnectionDetails(self):
return
def detach(self):
return
def establishConnection(self, featureset):
raise "Must redefine the %s.establishConnection()" % self.__class__.__name__
def endSession(self):
self.connection.terminate()

View File

@@ -22,125 +22,232 @@
import bb
import bb.event
import itertools
import logging
import multiprocessing
import threading
import array
import os
import signal
import sys
import time
import select
from queue import Empty
from multiprocessing import Event, Process, util, Queue, Pipe, queues, Manager
from . import BitBakeBaseServer, BitBakeBaseServerConnection, BaseImplServer
import socket
import subprocess
import errno
import bb.server.xmlrpcserver
from bb import daemonize
from multiprocessing import queues
logger = logging.getLogger('BitBake')
class ServerCommunicator():
def __init__(self, connection, event_handle, server):
self.connection = connection
self.event_handle = event_handle
self.server = server
class ProcessTimeout(SystemExit):
pass
def runCommand(self, command):
# @todo try/except
self.connection.send(command)
if not self.server.is_alive():
raise SystemExit
while True:
# don't let the user ctrl-c while we're waiting for a response
try:
for idx in range(0,4): # 0, 1, 2, 3
if self.connection.poll(5):
return self.connection.recv()
else:
bb.warn("Timeout while attempting to communicate with bitbake server")
bb.fatal("Gave up; Too many tries: timeout while attempting to communicate with bitbake server")
except KeyboardInterrupt:
pass
def getEventHandle(self):
return self.event_handle.value
class EventAdapter():
"""
Adapter to wrap our event queue since the caller (bb.event) expects to
call a send() method, but our actual queue only has put()
"""
def __init__(self, queue):
self.queue = queue
def send(self, event):
try:
self.queue.put(event)
except Exception as err:
print("EventAdapter puked: %s" % str(err))
class ProcessServer(Process, BaseImplServer):
class ProcessServer(multiprocessing.Process):
profile_filename = "profile.log"
profile_processed_filename = "profile.log.processed"
def __init__(self, command_channel, event_queue, featurelist):
BaseImplServer.__init__(self)
Process.__init__(self)
self.command_channel = command_channel
self.event_queue = event_queue
self.event = EventAdapter(event_queue)
self.featurelist = featurelist
def __init__(self, lock, sock, sockname):
multiprocessing.Process.__init__(self)
self.command_channel = False
self.command_channel_reply = False
self.quit = False
self.heartbeat_seconds = 1 # default, BB_HEARTBEAT_EVENT will be checked once we have a datastore.
self.next_heartbeat = time.time()
self.quitin, self.quitout = Pipe()
self.event_handle = multiprocessing.Value("i")
self.event_handle = None
self.haveui = False
self.lastui = False
self.xmlrpc = False
self._idlefuns = {}
self.bitbake_lock = lock
self.sock = sock
self.sockname = sockname
def register_idle_function(self, function, data):
"""Register a function to be called while the server is idle"""
assert hasattr(function, '__call__')
self._idlefuns[function] = data
def run(self):
for event in bb.event.ui_queue:
self.event_queue.put(event)
self.event_handle.value = bb.event.register_UIHhandler(self, True)
if self.xmlrpcinterface[0]:
self.xmlrpc = bb.server.xmlrpcserver.BitBakeXMLRPCServer(self.xmlrpcinterface, self.cooker, self)
print("Bitbake XMLRPC server address: %s, server port: %s" % (self.xmlrpc.host, self.xmlrpc.port))
heartbeat_event = self.cooker.data.getVar('BB_HEARTBEAT_EVENT')
if heartbeat_event:
try:
self.heartbeat_seconds = float(heartbeat_event)
except:
# Throwing an exception here causes bitbake to hang.
# Just warn about the invalid setting and continue
bb.warn('Ignoring invalid BB_HEARTBEAT_EVENT=%s, must be a float specifying seconds.' % heartbeat_event)
bb.cooker.server_main(self.cooker, self.main)
self.timeout = self.server_timeout or self.cooker.data.getVar('BB_SERVER_TIMEOUT')
try:
if self.timeout:
self.timeout = float(self.timeout)
except:
bb.warn('Ignoring invalid BB_SERVER_TIMEOUT=%s, must be a float specifying seconds.' % self.timeout)
try:
self.bitbake_lock.seek(0)
self.bitbake_lock.truncate()
if self.xmlrpc:
self.bitbake_lock.write("%s %s:%s\n" % (os.getpid(), self.xmlrpc.host, self.xmlrpc.port))
else:
self.bitbake_lock.write("%s\n" % (os.getpid()))
self.bitbake_lock.flush()
except Exception as e:
print("Error writing to lock file: %s" % str(e))
pass
if self.cooker.configuration.profile:
try:
import cProfile as profile
except:
import profile
prof = profile.Profile()
ret = profile.Profile.runcall(prof, self.main)
prof.dump_stats("profile.log")
bb.utils.process_profilelog("profile.log")
print("Raw profiling information saved to profile.log and processed statistics to profile.log.processed")
else:
ret = self.main()
return ret
def main(self):
# Ignore SIGINT within the server, as all SIGINT handling is done by
# the UI and communicated to us
self.quitin.close()
signal.signal(signal.SIGINT, signal.SIG_IGN)
self.cooker.pre_serve()
bb.utils.set_process_name("Cooker")
ready = []
self.controllersock = False
fds = [self.sock]
if self.xmlrpc:
fds.append(self.xmlrpc)
print("Entering server connection loop")
while not self.quit:
try:
if self.command_channel.poll():
command = self.command_channel.recv()
self.runCommand(command)
if self.quitout.poll():
self.quitout.recv()
if self.sock in ready:
self.controllersock, address = self.sock.accept()
if self.haveui:
print("Dropping connection attempt as we have a UI %s" % (str(ready)))
self.controllersock.close()
else:
print("Accepting %s" % (str(ready)))
fds.append(self.controllersock)
if self.controllersock in ready:
try:
print("Connecting Client")
ui_fds = recvfds(self.controllersock, 3)
# Where to write events to
writer = ConnectionWriter(ui_fds[0])
self.event_handle = bb.event.register_UIHhandler(writer, True)
self.event_writer = writer
# Where to read commands from
reader = ConnectionReader(ui_fds[1])
fds.append(reader)
self.command_channel = reader
# Where to send command return values to
writer = ConnectionWriter(ui_fds[2])
self.command_channel_reply = writer
self.haveui = True
except EOFError:
print("Disconnecting Client")
fds.remove(self.controllersock)
fds.remove(self.command_channel)
bb.event.unregister_UIHhandler(self.event_handle, True)
self.command_channel_reply.writer.close()
self.event_writer.writer.close()
del self.event_writer
self.controllersock.close()
self.haveui = False
self.lastui = time.time()
self.cooker.clientComplete()
if self.timeout is None:
print("No timeout, exiting.")
self.quit = True
if not self.haveui and self.lastui and self.timeout and (self.lastui + self.timeout) < time.time():
print("Server timeout, exiting.")
self.quit = True
if self.command_channel in ready:
try:
command = self.command_channel.get()
except EOFError:
# Client connection shutting down
continue
if command[0] == "terminateServer":
self.quit = True
continue
try:
print("Running command %s" % command)
self.command_channel_reply.send(self.cooker.command.runCommand(command))
except Exception as e:
logger.exception('Exception in server main event loop running command %s (%s)' % (command, str(e)))
if self.xmlrpc in ready:
self.xmlrpc.handle_requests()
ready = self.idle_commands(.1, fds)
print("Exiting")
try:
self.cooker.shutdown(True)
except:
pass
self.cooker.post_serve()
# Remove the socket file so we don't get any more connections to avoid races
os.unlink(self.sockname)
self.sock.close()
# Finally release the lockfile but warn about other processes holding it open
lock = self.bitbake_lock
lockfile = lock.name
lock.close()
lock = None
while not lock:
with bb.utils.timeout(3):
lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=True)
if not lock:
# Some systems may not have lsof available
procs = None
try:
self.runCommand(["stateForceShutdown"])
except:
pass
procs = subprocess.check_output(["lsof", '-w', lockfile], stderr=subprocess.STDOUT)
except OSError as e:
if e.errno != errno.ENOENT:
raise
if procs is None:
# Fall back to fuser if lsof is unavailable
try:
procs = subprocess.check_output(["fuser", '-v', lockfile], stderr=subprocess.STDOUT)
except OSError as e:
if e.errno != errno.ENOENT:
raise
self.idle_commands(.1, [self.command_channel, self.quitout])
except Exception:
logger.exception('Running command %s', command)
self.event_queue.close()
bb.event.unregister_UIHhandler(self.event_handle.value)
self.command_channel.close()
self.cooker.shutdown(True)
self.quitout.close()
msg = "Delaying shutdown due to active processes which appear to be holding bitbake.lock"
if procs:
msg += ":\n%s" % str(procs)
print(msg)
return
# We hold the lock so we can remove the file (hide stale pid data)
bb.utils.remove(lockfile)
bb.utils.unlockfile(lock)
def idle_commands(self, delay, fds=None):
nextsleep = delay
@@ -186,109 +293,294 @@ class ProcessServer(Process, BaseImplServer):
nextsleep = self.next_heartbeat - now
if nextsleep is not None:
select.select(fds,[],[],nextsleep)
if self.xmlrpc:
nextsleep = self.xmlrpc.get_timeout(nextsleep)
try:
return select.select(fds,[],[],nextsleep)[0]
except InterruptedError:
# Ignore EINTR
return []
else:
return []
class ServerCommunicator():
def __init__(self, connection, recv):
self.connection = connection
self.recv = recv
def runCommand(self, command):
"""
Run a cooker command on the server
"""
self.command_channel.send(self.cooker.command.runCommand(command))
self.connection.send(command)
if not self.recv.poll(5):
raise ProcessTimeout("Timeout while waiting for a reply from the bitbake server")
return self.recv.get()
def stop(self):
self.quitin.send("quit")
self.quitin.close()
class BitBakeProcessServerConnection(BitBakeBaseServerConnection):
def __init__(self, serverImpl, ui_channel, event_queue):
self.procserver = serverImpl
self.ui_channel = ui_channel
self.event_queue = event_queue
self.connection = ServerCommunicator(self.ui_channel, self.procserver.event_handle, self.procserver)
self.events = self.event_queue
self.terminated = False
def sigterm_terminate(self):
bb.error("UI received SIGTERM")
self.terminate()
def terminate(self):
if self.terminated:
return
self.terminated = True
def flushevents():
while True:
try:
event = self.event_queue.get(block=False)
except (Empty, IOError):
break
if isinstance(event, logging.LogRecord):
logger.handle(event)
self.procserver.stop()
while self.procserver.is_alive():
flushevents()
self.procserver.join(0.1)
self.ui_channel.close()
self.event_queue.close()
self.event_queue.setexit()
# XXX: Call explicity close in _writer to avoid
# fd leakage because isn't called on Queue.close()
self.event_queue._writer.close()
# Wrap Queue to provide API which isn't server implementation specific
class ProcessEventQueue(multiprocessing.queues.Queue):
def __init__(self, maxsize):
multiprocessing.queues.Queue.__init__(self, maxsize, ctx=multiprocessing.get_context())
self.exit = False
bb.utils.set_process_name("ProcessEQueue")
def setexit(self):
self.exit = True
def waitEvent(self, timeout):
if self.exit:
return self.getEvent()
try:
if not self.server.is_alive():
return self.getEvent()
return self.get(True, timeout)
except Empty:
return None
def getEvent(self):
try:
if not self.server.is_alive():
self.setexit()
return self.get(False)
except Empty:
if self.exit:
sys.exit(1)
return None
class BitBakeServer(BitBakeBaseServer):
def initServer(self, single_use=True):
# establish communication channels. We use bidirectional pipes for
# ui <--> server command/response pairs
# and a queue for server -> ui event notifications
#
self.ui_channel, self.server_channel = Pipe()
self.event_queue = ProcessEventQueue(0)
self.serverImpl = ProcessServer(self.server_channel, self.event_queue, None)
self.event_queue.server = self.serverImpl
def detach(self):
self.serverImpl.start()
return
def establishConnection(self, featureset):
self.connection = BitBakeProcessServerConnection(self.serverImpl, self.ui_channel, self.event_queue)
_, error = self.connection.connection.runCommand(["setFeatures", featureset])
def updateFeatureSet(self, featureset):
_, error = self.runCommand(["setFeatures", featureset])
if error:
logger.error("Unable to set the cooker to the correct featureset: %s" % error)
raise BaseException(error)
signal.signal(signal.SIGTERM, lambda i, s: self.connection.sigterm_terminate())
return self.connection
def getEventHandle(self):
handle, error = self.runCommand(["getUIHandlerNum"])
if error:
logger.error("Unable to get UI Handler Number: %s" % error)
raise BaseException(error)
return handle
def terminateServer(self):
self.connection.send(['terminateServer'])
return
class BitBakeProcessServerConnection(object):
def __init__(self, ui_channel, recv, eq, sock):
self.connection = ServerCommunicator(ui_channel, recv)
self.events = eq
# Save sock so it doesn't get gc'd for the life of our connection
self.socket_connection = sock
def terminate(self):
self.socket_connection.close()
self.connection.connection.close()
self.connection.recv.close()
return
class BitBakeServer(object):
def __init__(self, lock, sockname, configuration, featureset):
self.configuration = configuration
self.featureset = featureset
self.sockname = sockname
self.bitbake_lock = lock
self.readypipe, self.readypipein = os.pipe()
# Create server control socket
if os.path.exists(sockname):
os.unlink(sockname)
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# AF_UNIX has path length issues so chdir here to workaround
cwd = os.getcwd()
logfile = os.path.join(cwd, "bitbake-cookerdaemon.log")
try:
os.chdir(os.path.dirname(sockname))
self.sock.bind(os.path.basename(sockname))
finally:
os.chdir(cwd)
self.sock.listen(1)
os.set_inheritable(self.sock.fileno(), True)
bb.daemonize.createDaemon(self._startServer, logfile)
self.sock.close()
self.bitbake_lock.close()
ready = ConnectionReader(self.readypipe)
r = ready.wait(8)
if not r:
ready.close()
bb.error("Unable to start bitbake server")
if os.path.exists(logfile):
with open(logfile, "r") as f:
logs=f.readlines()
bb.error("Last 10 lines of server log %s:\n%s" % (logfile, "".join(logs[-10:])))
raise SystemExit(1)
ready.close()
os.close(self.readypipein)
def _startServer(self):
print("Starting bitbake server pid %d" % os.getpid())
server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
self.configuration.setServerRegIdleCallback(server.register_idle_function)
# Copy prefile and postfile to _server variants
for param in ('prefile', 'postfile'):
value = getattr(self.configuration, param)
if value:
setattr(self.configuration, "%s_server" % param, value)
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset, self.readypipein)
server.cooker = self.cooker
server.server_timeout = self.configuration.server_timeout
server.xmlrpcinterface = self.configuration.xmlrpcinterface
print("Started bitbake server pid %d" % os.getpid())
server.start()
def connectProcessServer(sockname, featureset):
# Connect to socket
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# AF_UNIX has path length issues so chdir here to workaround
cwd = os.getcwd()
try:
os.chdir(os.path.dirname(sockname))
sock.connect(os.path.basename(sockname))
finally:
os.chdir(cwd)
readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
eq = command_chan_recv = command_chan = None
try:
# Send an fd for the remote to write events to
readfd, writefd = os.pipe()
eq = BBUIEventQueue(readfd)
# Send an fd for the remote to recieve commands from
readfd1, writefd1 = os.pipe()
command_chan = ConnectionWriter(writefd1)
# Send an fd for the remote to write commands results to
readfd2, writefd2 = os.pipe()
command_chan_recv = ConnectionReader(readfd2)
sendfds(sock, [writefd, readfd1, writefd2])
server_connection = BitBakeProcessServerConnection(command_chan, command_chan_recv, eq, sock)
# Close the ends of the pipes we won't use
for i in [writefd, readfd1, writefd2]:
os.close(i)
server_connection.connection.updateFeatureSet(featureset)
except (Exception, SystemExit) as e:
if command_chan_recv:
command_chan_recv.close()
if command_chan:
command_chan.close()
for i in [writefd, readfd1, writefd2]:
try:
os.close(i)
except OSError:
pass
sock.close()
raise
return server_connection
def sendfds(sock, fds):
'''Send an array of fds over an AF_UNIX socket.'''
fds = array.array('i', fds)
msg = bytes([len(fds) % 256])
sock.sendmsg([msg], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, fds)])
def recvfds(sock, size):
'''Receive an array of fds over an AF_UNIX socket.'''
a = array.array('i')
bytes_size = a.itemsize * size
msg, ancdata, flags, addr = sock.recvmsg(1, socket.CMSG_LEN(bytes_size))
if not msg and not ancdata:
raise EOFError
try:
if len(ancdata) != 1:
raise RuntimeError('received %d items of ancdata' %
len(ancdata))
cmsg_level, cmsg_type, cmsg_data = ancdata[0]
if (cmsg_level == socket.SOL_SOCKET and
cmsg_type == socket.SCM_RIGHTS):
if len(cmsg_data) % a.itemsize != 0:
raise ValueError
a.frombytes(cmsg_data)
assert len(a) % 256 == msg[0]
return list(a)
except (ValueError, IndexError):
pass
raise RuntimeError('Invalid data received')
class BBUIEventQueue:
def __init__(self, readfd):
self.eventQueue = []
self.eventQueueLock = threading.Lock()
self.eventQueueNotify = threading.Event()
self.reader = ConnectionReader(readfd)
self.t = threading.Thread()
self.t.setDaemon(True)
self.t.run = self.startCallbackHandler
self.t.start()
def getEvent(self):
self.eventQueueLock.acquire()
if len(self.eventQueue) == 0:
self.eventQueueLock.release()
return None
item = self.eventQueue.pop(0)
if len(self.eventQueue) == 0:
self.eventQueueNotify.clear()
self.eventQueueLock.release()
return item
def waitEvent(self, delay):
self.eventQueueNotify.wait(delay)
return self.getEvent()
def queue_event(self, event):
self.eventQueueLock.acquire()
self.eventQueue.append(event)
self.eventQueueNotify.set()
self.eventQueueLock.release()
def send_event(self, event):
self.queue_event(pickle.loads(event))
def startCallbackHandler(self):
bb.utils.set_process_name("UIEventQueue")
while True:
try:
self.reader.wait()
event = self.reader.get()
self.queue_event(event)
except EOFError:
# Easiest way to exit is to close the file descriptor to cause an exit
break
self.reader.close()
class ConnectionReader(object):
def __init__(self, fd):
self.reader = multiprocessing.connection.Connection(fd, writable=False)
self.rlock = multiprocessing.Lock()
def wait(self, timeout=None):
return multiprocessing.connection.wait([self.reader], timeout)
def poll(self, timeout=None):
return self.reader.poll(timeout)
def get(self):
with self.rlock:
res = self.reader.recv_bytes()
return multiprocessing.reduction.ForkingPickler.loads(res)
def fileno(self):
return self.reader.fileno()
def close(self):
return self.reader.close()
class ConnectionWriter(object):
def __init__(self, fd):
self.writer = multiprocessing.connection.Connection(fd, readable=False)
self.wlock = multiprocessing.Lock()
# Why bb.event needs this I have no idea
self.event = self
def send(self, obj):
obj = multiprocessing.reduction.ForkingPickler.dumps(obj)
with self.wlock:
self.writer.send_bytes(obj)
def fileno(self):
return self.writer.fileno()
def close(self):
return self.writer.close()

View File

@@ -1,422 +0,0 @@
#
# BitBake XMLRPC Server
#
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2008 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
This module implements an xmlrpc server for BitBake.
Use this by deriving a class from BitBakeXMLRPCServer and then adding
methods which you want to "export" via XMLRPC. If the methods have the
prefix xmlrpc_, then registering those function will happen automatically,
if not, you need to call register_function.
Use register_idle_function() to add a function which the xmlrpc server
calls from within server_forever when no requests are pending. Make sure
that those functions are non-blocking or else you will introduce latency
in the server's main loop.
"""
import os
import sys
import hashlib
import time
import socket
import signal
import threading
import pickle
import inspect
import select
import http.client
import xmlrpc.client
from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
import bb
from bb import daemonize
from bb.ui import uievent
from . import BitBakeBaseServer, BitBakeBaseServerConnection, BaseImplServer
DEBUG = False
class BBTransport(xmlrpc.client.Transport):
def __init__(self, timeout):
self.timeout = timeout
self.connection_token = None
xmlrpc.client.Transport.__init__(self)
# Modified from default to pass timeout to HTTPConnection
def make_connection(self, host):
#return an existing connection if possible. This allows
#HTTP/1.1 keep-alive.
if self._connection and host == self._connection[0]:
return self._connection[1]
# create a HTTP connection object from a host descriptor
chost, self._extra_headers, x509 = self.get_host_info(host)
#store the host argument along with the connection object
self._connection = host, http.client.HTTPConnection(chost, timeout=self.timeout)
return self._connection[1]
def set_connection_token(self, token):
self.connection_token = token
def send_content(self, h, body):
if self.connection_token:
h.putheader("Bitbake-token", self.connection_token)
xmlrpc.client.Transport.send_content(self, h, body)
def _create_server(host, port, timeout = 60):
t = BBTransport(timeout)
s = xmlrpc.client.ServerProxy("http://%s:%d/" % (host, port), transport=t, allow_none=True, use_builtin_types=True)
return s, t
def check_connection(remote, timeout):
try:
host, port = remote.split(":")
port = int(port)
except Exception as e:
bb.warn("Failed to read remote definition (%s)" % str(e))
raise e
server, _transport = _create_server(host, port, timeout)
try:
ret, err = server.runCommand(['getVariable', 'TOPDIR'])
if err or not ret:
return False
except ConnectionError:
return False
return True
class BitBakeServerCommands():
def __init__(self, server):
self.server = server
self.has_client = False
def registerEventHandler(self, host, port):
"""
Register a remote UI Event Handler
"""
s, t = _create_server(host, port)
# we don't allow connections if the cooker is running
if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]):
return None, "Cooker is busy: %s" % bb.cooker.state.get_name(self.cooker.state)
self.event_handle = bb.event.register_UIHhandler(s, True)
return self.event_handle, 'OK'
def unregisterEventHandler(self, handlerNum):
"""
Unregister a remote UI Event Handler
"""
return bb.event.unregister_UIHhandler(handlerNum)
def runCommand(self, command):
"""
Run a cooker command on the server
"""
return self.cooker.command.runCommand(command, self.server.readonly)
def getEventHandle(self):
return self.event_handle
def terminateServer(self):
"""
Trigger the server to quit
"""
self.server.quit = True
print("Server (cooker) exiting")
return
def addClient(self):
if self.has_client:
return None
token = hashlib.md5(str(time.time()).encode("utf-8")).hexdigest()
self.server.set_connection_token(token)
self.has_client = True
return token
def removeClient(self):
if self.has_client:
self.server.set_connection_token(None)
self.has_client = False
if self.server.single_use:
self.server.quit = True
# This request handler checks if the request has a "Bitbake-token" header
# field (this comes from the client side) and compares it with its internal
# "Bitbake-token" field (this comes from the server). If the two are not
# equal, it is assumed that a client is trying to connect to the server
# while another client is connected to the server. In this case, a 503 error
# ("service unavailable") is returned to the client.
class BitBakeXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
def __init__(self, request, client_address, server):
self.server = server
SimpleXMLRPCRequestHandler.__init__(self, request, client_address, server)
def do_POST(self):
try:
remote_token = self.headers["Bitbake-token"]
except:
remote_token = None
if remote_token != self.server.connection_token and remote_token != "observer":
self.report_503()
else:
if remote_token == "observer":
self.server.readonly = True
else:
self.server.readonly = False
SimpleXMLRPCRequestHandler.do_POST(self)
def report_503(self):
self.send_response(503)
response = 'No more client allowed'
self.send_header("Content-type", "text/plain")
self.send_header("Content-length", str(len(response)))
self.end_headers()
self.wfile.write(bytes(response, 'utf-8'))
class XMLRPCProxyServer(BaseImplServer):
""" not a real working server, but a stub for a proxy server connection
"""
def __init__(self, host, port, use_builtin_types=True):
self.host = host
self.port = port
class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
# remove this when you're done with debugging
# allow_reuse_address = True
def __init__(self, interface, single_use=False, idle_timeout=0):
"""
Constructor
"""
BaseImplServer.__init__(self)
self.single_use = single_use
# Use auto port configuration
if (interface[1] == -1):
interface = (interface[0], 0)
SimpleXMLRPCServer.__init__(self, interface,
requestHandler=BitBakeXMLRPCRequestHandler,
logRequests=False, allow_none=True)
self.host, self.port = self.socket.getsockname()
self.connection_token = None
#self.register_introspection_functions()
self.commands = BitBakeServerCommands(self)
self.autoregister_all_functions(self.commands, "")
self.interface = interface
self.time = time.time()
self.idle_timeout = idle_timeout
if idle_timeout:
self.register_idle_function(self.handle_idle_timeout, self)
def addcooker(self, cooker):
BaseImplServer.addcooker(self, cooker)
self.commands.cooker = cooker
def autoregister_all_functions(self, context, prefix):
"""
Convenience method for registering all functions in the scope
of this class that start with a common prefix
"""
methodlist = inspect.getmembers(context, inspect.ismethod)
for name, method in methodlist:
if name.startswith(prefix):
self.register_function(method, name[len(prefix):])
def handle_idle_timeout(self, server, data, abort):
if not abort:
if time.time() - server.time > server.idle_timeout:
server.quit = True
print("Server idle timeout expired")
return []
def serve_forever(self):
# Start the actual XMLRPC server
bb.cooker.server_main(self.cooker, self._serve_forever)
def _serve_forever(self):
"""
Serve Requests. Overloaded to honor a quit command
"""
self.quit = False
while not self.quit:
fds = [self]
nextsleep = 0.1
for function, data in list(self._idlefuns.items()):
retval = None
try:
retval = function(self, data, False)
if retval is False:
del self._idlefuns[function]
elif retval is True:
nextsleep = 0
elif isinstance(retval, float):
if (retval < nextsleep):
nextsleep = retval
else:
fds = fds + retval
except SystemExit:
raise
except:
import traceback
traceback.print_exc()
if retval == None:
# the function execute failed; delete it
del self._idlefuns[function]
pass
socktimeout = self.socket.gettimeout() or nextsleep
socktimeout = min(socktimeout, nextsleep)
# Mirror what BaseServer handle_request would do
try:
fd_sets = select.select(fds, [], [], socktimeout)
if fd_sets[0] and self in fd_sets[0]:
if self.idle_timeout:
self.time = time.time()
self._handle_request_noblock()
except IOError:
# we ignore interrupted calls
pass
# Tell idle functions we're exiting
for function, data in list(self._idlefuns.items()):
try:
retval = function(self, data, True)
except:
pass
self.server_close()
return
def set_connection_token(self, token):
self.connection_token = token
class BitBakeXMLRPCServerConnection(BitBakeBaseServerConnection):
def __init__(self, serverImpl, clientinfo=("localhost", 0), observer_only = False, featureset = None):
self.connection, self.transport = _create_server(serverImpl.host, serverImpl.port)
self.clientinfo = clientinfo
self.serverImpl = serverImpl
self.observer_only = observer_only
if featureset:
self.featureset = featureset
else:
self.featureset = []
def connect(self, token = None):
if token is None:
if self.observer_only:
token = "observer"
else:
token = self.connection.addClient()
if token is None:
return None
self.transport.set_connection_token(token)
return self
def setupEventQueue(self):
self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
for event in bb.event.ui_queue:
self.events.queue_event(event)
_, error = self.connection.runCommand(["setFeatures", self.featureset])
if error:
# disconnect the client, we can't make the setFeature work
self.connection.removeClient()
# no need to log it here, the error shall be sent to the client
raise BaseException(error)
def removeClient(self):
if not self.observer_only:
self.connection.removeClient()
def terminate(self):
# Don't wait for server indefinitely
import socket
socket.setdefaulttimeout(2)
try:
self.events.system_quit()
except:
pass
try:
self.connection.removeClient()
except:
pass
class BitBakeServer(BitBakeBaseServer):
def initServer(self, interface = ("localhost", 0),
single_use = False, idle_timeout=0):
self.interface = interface
self.serverImpl = XMLRPCServer(interface, single_use, idle_timeout)
def detach(self):
daemonize.createDaemon(self.serverImpl.serve_forever, "bitbake-cookerdaemon.log")
del self.cooker
def establishConnection(self, featureset):
self.connection = BitBakeXMLRPCServerConnection(self.serverImpl, self.interface, False, featureset)
return self.connection.connect()
def set_connection_token(self, token):
self.connection.transport.set_connection_token(token)
class BitBakeXMLRPCClient(BitBakeBaseServer):
def __init__(self, observer_only = False, token = None):
self.token = token
self.observer_only = observer_only
# if we need extra caches, just tell the server to load them all
pass
def saveConnectionDetails(self, remote):
self.remote = remote
def establishConnection(self, featureset):
# The format of "remote" must be "server:port"
try:
[host, port] = self.remote.split(":")
port = int(port)
except Exception as e:
bb.warn("Failed to read remote definition (%s)" % str(e))
raise e
# We need our IP for the server connection. We get the IP
# by trying to connect with the server
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect((host, port))
ip = s.getsockname()[0]
s.close()
except Exception as e:
bb.warn("Could not create socket for %s:%s (%s)" % (host, port, str(e)))
raise e
try:
self.serverImpl = XMLRPCProxyServer(host, port, use_builtin_types=True)
self.connection = BitBakeXMLRPCServerConnection(self.serverImpl, (ip, 0), self.observer_only, featureset)
return self.connection.connect(self.token)
except Exception as e:
bb.warn("Could not connect to server at %s:%s (%s)" % (host, port, str(e)))
raise e
def endSession(self):
self.connection.removeClient()

View File

@@ -0,0 +1,154 @@
#
# BitBake XMLRPC Client Interface
#
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2008 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import sys
import socket
import http.client
import xmlrpc.client
import bb
from bb.ui import uievent
class BBTransport(xmlrpc.client.Transport):
def __init__(self, timeout):
self.timeout = timeout
self.connection_token = None
xmlrpc.client.Transport.__init__(self)
# Modified from default to pass timeout to HTTPConnection
def make_connection(self, host):
#return an existing connection if possible. This allows
#HTTP/1.1 keep-alive.
if self._connection and host == self._connection[0]:
return self._connection[1]
# create a HTTP connection object from a host descriptor
chost, self._extra_headers, x509 = self.get_host_info(host)
#store the host argument along with the connection object
self._connection = host, http.client.HTTPConnection(chost, timeout=self.timeout)
return self._connection[1]
def set_connection_token(self, token):
self.connection_token = token
def send_content(self, h, body):
if self.connection_token:
h.putheader("Bitbake-token", self.connection_token)
xmlrpc.client.Transport.send_content(self, h, body)
def _create_server(host, port, timeout = 60):
t = BBTransport(timeout)
s = xmlrpc.client.ServerProxy("http://%s:%d/" % (host, port), transport=t, allow_none=True, use_builtin_types=True)
return s, t
def check_connection(remote, timeout):
try:
host, port = remote.split(":")
port = int(port)
except Exception as e:
bb.warn("Failed to read remote definition (%s)" % str(e))
raise e
server, _transport = _create_server(host, port, timeout)
try:
ret, err = server.runCommand(['getVariable', 'TOPDIR'])
if err or not ret:
return False
except ConnectionError:
return False
return True
class BitBakeXMLRPCServerConnection(object):
def __init__(self, host, port, clientinfo=("localhost", 0), observer_only = False, featureset = None):
self.connection, self.transport = _create_server(host, port)
self.clientinfo = clientinfo
self.observer_only = observer_only
if featureset:
self.featureset = featureset
else:
self.featureset = []
self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
_, error = self.connection.runCommand(["setFeatures", self.featureset])
if error:
# disconnect the client, we can't make the setFeature work
self.connection.removeClient()
# no need to log it here, the error shall be sent to the client
raise BaseException(error)
def connect(self, token = None):
if token is None:
if self.observer_only:
token = "observer"
else:
token = self.connection.addClient()
if token is None:
return None
self.transport.set_connection_token(token)
return self
def removeClient(self):
if not self.observer_only:
self.connection.removeClient()
def terminate(self):
# Don't wait for server indefinitely
socket.setdefaulttimeout(2)
try:
self.events.system_quit()
except:
pass
try:
self.connection.removeClient()
except:
pass
def connectXMLRPC(remote, featureset, observer_only = False, token = None):
# The format of "remote" must be "server:port"
try:
[host, port] = remote.split(":")
port = int(port)
except Exception as e:
bb.warn("Failed to parse remote definition %s (%s)" % (remote, str(e)))
raise e
# We need our IP for the server connection. We get the IP
# by trying to connect with the server
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect((host, port))
ip = s.getsockname()[0]
s.close()
except Exception as e:
bb.warn("Could not create socket for %s:%s (%s)" % (host, port, str(e)))
raise e
try:
connection = BitBakeXMLRPCServerConnection(host, port, (ip, 0), observer_only, featureset)
return connection.connect(token)
except Exception as e:
bb.warn("Could not connect to server at %s:%s (%s)" % (host, port, str(e)))
raise e

View File

@@ -0,0 +1,158 @@
#
# BitBake XMLRPC Server Interface
#
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2008 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os
import sys
import hashlib
import time
import inspect
from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
import bb
# This request handler checks if the request has a "Bitbake-token" header
# field (this comes from the client side) and compares it with its internal
# "Bitbake-token" field (this comes from the server). If the two are not
# equal, it is assumed that a client is trying to connect to the server
# while another client is connected to the server. In this case, a 503 error
# ("service unavailable") is returned to the client.
class BitBakeXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
def __init__(self, request, client_address, server):
self.server = server
SimpleXMLRPCRequestHandler.__init__(self, request, client_address, server)
def do_POST(self):
try:
remote_token = self.headers["Bitbake-token"]
except:
remote_token = None
if 0 and remote_token != self.server.connection_token and remote_token != "observer":
self.report_503()
else:
if remote_token == "observer":
self.server.readonly = True
else:
self.server.readonly = False
SimpleXMLRPCRequestHandler.do_POST(self)
def report_503(self):
self.send_response(503)
response = 'No more client allowed'
self.send_header("Content-type", "text/plain")
self.send_header("Content-length", str(len(response)))
self.end_headers()
self.wfile.write(bytes(response, 'utf-8'))
class BitBakeXMLRPCServer(SimpleXMLRPCServer):
# remove this when you're done with debugging
# allow_reuse_address = True
def __init__(self, interface, cooker, parent):
# Use auto port configuration
if (interface[1] == -1):
interface = (interface[0], 0)
SimpleXMLRPCServer.__init__(self, interface,
requestHandler=BitBakeXMLRPCRequestHandler,
logRequests=False, allow_none=True)
self.host, self.port = self.socket.getsockname()
self.interface = interface
self.connection_token = None
self.commands = BitBakeXMLRPCServerCommands(self)
self.register_functions(self.commands, "")
self.cooker = cooker
self.parent = parent
def register_functions(self, context, prefix):
"""
Convenience method for registering all functions in the scope
of this class that start with a common prefix
"""
methodlist = inspect.getmembers(context, inspect.ismethod)
for name, method in methodlist:
if name.startswith(prefix):
self.register_function(method, name[len(prefix):])
def get_timeout(self, delay):
socktimeout = self.socket.gettimeout() or delay
return min(socktimeout, delay)
def handle_requests(self):
self._handle_request_noblock()
class BitBakeXMLRPCServerCommands():
def __init__(self, server):
self.server = server
self.has_client = False
def registerEventHandler(self, host, port):
"""
Register a remote UI Event Handler
"""
s, t = bb.server.xmlrpcclient._create_server(host, port)
# we don't allow connections if the cooker is running
if (self.server.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]):
return None, "Cooker is busy: %s" % bb.cooker.state.get_name(self.server.cooker.state)
self.event_handle = bb.event.register_UIHhandler(s, True)
return self.event_handle, 'OK'
def unregisterEventHandler(self, handlerNum):
"""
Unregister a remote UI Event Handler
"""
ret = bb.event.unregister_UIHhandler(handlerNum, True)
self.event_handle = None
return ret
def runCommand(self, command):
"""
Run a cooker command on the server
"""
return self.server.cooker.command.runCommand(command, self.server.readonly)
def getEventHandle(self):
return self.event_handle
def terminateServer(self):
"""
Trigger the server to quit
"""
self.server.parent.quit = True
print("XMLRPC Server triggering exit")
return
def addClient(self):
if self.server.parent.haveui:
return None
token = hashlib.md5(str(time.time()).encode("utf-8")).hexdigest()
self.server.connection_token = token
self.server.parent.haveui = True
return token
def removeClient(self):
if self.server.parent.haveui:
self.server.connection_token = None
self.server.parent.haveui = False

View File

@@ -0,0 +1,377 @@
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# BitBake Tests for the Event implementation (event.py)
#
# Copyright (C) 2017 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
import unittest
import bb
import logging
import bb.compat
import bb.event
import importlib
import threading
import time
import pickle
from unittest.mock import Mock
from unittest.mock import call
class EventQueueStub():
""" Class used as specification for UI event handler queue stub objects """
def __init__(self):
return
def send(self, event):
return
class PickleEventQueueStub():
""" Class used as specification for UI event handler queue stub objects
with sendpickle method """
def __init__(self):
return
def sendpickle(self, pickled_event):
return
class UIClientStub():
""" Class used as specification for UI event handler stub objects """
def __init__(self):
self.event = None
class EventHandlingTest(unittest.TestCase):
""" Event handling test class """
_threadlock_test_calls = []
def setUp(self):
self._test_process = Mock()
ui_client1 = UIClientStub()
ui_client2 = UIClientStub()
self._test_ui1 = Mock(wraps=ui_client1)
self._test_ui2 = Mock(wraps=ui_client2)
importlib.reload(bb.event)
def _create_test_handlers(self):
""" Method used to create a test handler ordered dictionary """
test_handlers = bb.compat.OrderedDict()
test_handlers["handler1"] = self._test_process.handler1
test_handlers["handler2"] = self._test_process.handler2
return test_handlers
def test_class_handlers(self):
""" Test set_class_handlers and get_class_handlers methods """
test_handlers = self._create_test_handlers()
bb.event.set_class_handlers(test_handlers)
self.assertEqual(test_handlers,
bb.event.get_class_handlers())
def test_handlers(self):
""" Test set_handlers and get_handlers """
test_handlers = self._create_test_handlers()
bb.event.set_handlers(test_handlers)
self.assertEqual(test_handlers,
bb.event.get_handlers())
def test_clean_class_handlers(self):
""" Test clean_class_handlers method """
cleanDict = bb.compat.OrderedDict()
self.assertEqual(cleanDict,
bb.event.clean_class_handlers())
def test_register(self):
""" Test register method for class handlers """
result = bb.event.register("handler", self._test_process.handler)
self.assertEqual(result, bb.event.Registered)
handlers_dict = bb.event.get_class_handlers()
self.assertIn("handler", handlers_dict)
def test_already_registered(self):
""" Test detection of an already registed class handler """
bb.event.register("handler", self._test_process.handler)
handlers_dict = bb.event.get_class_handlers()
self.assertIn("handler", handlers_dict)
result = bb.event.register("handler", self._test_process.handler)
self.assertEqual(result, bb.event.AlreadyRegistered)
def test_register_from_string(self):
""" Test register method receiving code in string """
result = bb.event.register("string_handler", " return True")
self.assertEqual(result, bb.event.Registered)
handlers_dict = bb.event.get_class_handlers()
self.assertIn("string_handler", handlers_dict)
def test_register_with_mask(self):
""" Test register method with event masking """
mask = ["bb.event.OperationStarted",
"bb.event.OperationCompleted"]
result = bb.event.register("event_handler",
self._test_process.event_handler,
mask)
self.assertEqual(result, bb.event.Registered)
handlers_dict = bb.event.get_class_handlers()
self.assertIn("event_handler", handlers_dict)
def test_remove(self):
""" Test remove method for class handlers """
test_handlers = self._create_test_handlers()
bb.event.set_class_handlers(test_handlers)
count = len(test_handlers)
bb.event.remove("handler1", None)
test_handlers = bb.event.get_class_handlers()
self.assertEqual(len(test_handlers), count - 1)
with self.assertRaises(KeyError):
bb.event.remove("handler1", None)
def test_execute_handler(self):
""" Test execute_handler method for class handlers """
mask = ["bb.event.OperationProgress"]
result = bb.event.register("event_handler",
self._test_process.event_handler,
mask)
self.assertEqual(result, bb.event.Registered)
event = bb.event.OperationProgress(current=10, total=100)
bb.event.execute_handler("event_handler",
self._test_process.event_handler,
event,
None)
self._test_process.event_handler.assert_called_once_with(event)
def test_fire_class_handlers(self):
""" Test fire_class_handlers method """
mask = ["bb.event.OperationStarted"]
result = bb.event.register("event_handler1",
self._test_process.event_handler1,
mask)
self.assertEqual(result, bb.event.Registered)
result = bb.event.register("event_handler2",
self._test_process.event_handler2,
"*")
self.assertEqual(result, bb.event.Registered)
event1 = bb.event.OperationStarted()
event2 = bb.event.OperationCompleted(total=123)
bb.event.fire_class_handlers(event1, None)
bb.event.fire_class_handlers(event2, None)
bb.event.fire_class_handlers(event2, None)
expected_event_handler1 = [call(event1)]
expected_event_handler2 = [call(event1),
call(event2),
call(event2)]
self.assertEqual(self._test_process.event_handler1.call_args_list,
expected_event_handler1)
self.assertEqual(self._test_process.event_handler2.call_args_list,
expected_event_handler2)
def test_change_handler_event_mapping(self):
""" Test changing the event mapping for class handlers """
event1 = bb.event.OperationStarted()
event2 = bb.event.OperationCompleted(total=123)
# register handler for all events
result = bb.event.register("event_handler1",
self._test_process.event_handler1,
"*")
self.assertEqual(result, bb.event.Registered)
bb.event.fire_class_handlers(event1, None)
bb.event.fire_class_handlers(event2, None)
expected = [call(event1), call(event2)]
self.assertEqual(self._test_process.event_handler1.call_args_list,
expected)
# unregister handler and register it only for OperationStarted
result = bb.event.remove("event_handler1",
self._test_process.event_handler1)
mask = ["bb.event.OperationStarted"]
result = bb.event.register("event_handler1",
self._test_process.event_handler1,
mask)
self.assertEqual(result, bb.event.Registered)
bb.event.fire_class_handlers(event1, None)
bb.event.fire_class_handlers(event2, None)
expected = [call(event1), call(event2), call(event1)]
self.assertEqual(self._test_process.event_handler1.call_args_list,
expected)
# unregister handler and register it only for OperationCompleted
result = bb.event.remove("event_handler1",
self._test_process.event_handler1)
mask = ["bb.event.OperationCompleted"]
result = bb.event.register("event_handler1",
self._test_process.event_handler1,
mask)
self.assertEqual(result, bb.event.Registered)
bb.event.fire_class_handlers(event1, None)
bb.event.fire_class_handlers(event2, None)
expected = [call(event1), call(event2), call(event1), call(event2)]
self.assertEqual(self._test_process.event_handler1.call_args_list,
expected)
def test_register_UIHhandler(self):
""" Test register_UIHhandler method """
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
def test_UIHhandler_already_registered(self):
""" Test registering an UIHhandler already existing """
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 2)
def test_unregister_UIHhandler(self):
""" Test unregister_UIHhandler method """
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
result = bb.event.unregister_UIHhandler(1)
self.assertIs(result, None)
def test_fire_ui_handlers(self):
""" Test fire_ui_handlers method """
self._test_ui1.event = Mock(spec_set=EventQueueStub)
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
self._test_ui2.event = Mock(spec_set=PickleEventQueueStub)
result = bb.event.register_UIHhandler(self._test_ui2, mainui=True)
self.assertEqual(result, 2)
event1 = bb.event.OperationStarted()
bb.event.fire_ui_handlers(event1, None)
expected = [call(event1)]
self.assertEqual(self._test_ui1.event.send.call_args_list,
expected)
expected = [call(pickle.dumps(event1))]
self.assertEqual(self._test_ui2.event.sendpickle.call_args_list,
expected)
def test_fire(self):
""" Test fire method used to trigger class and ui event handlers """
mask = ["bb.event.ConfigParsed"]
result = bb.event.register("event_handler1",
self._test_process.event_handler1,
mask)
self._test_ui1.event = Mock(spec_set=EventQueueStub)
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
event1 = bb.event.ConfigParsed()
bb.event.fire(event1, None)
expected = [call(event1)]
self.assertEqual(self._test_process.event_handler1.call_args_list,
expected)
self.assertEqual(self._test_ui1.event.send.call_args_list,
expected)
def test_fire_from_worker(self):
""" Test fire_from_worker method """
self._test_ui1.event = Mock(spec_set=EventQueueStub)
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
event1 = bb.event.ConfigParsed()
bb.event.fire_from_worker(event1, None)
expected = [call(event1)]
self.assertEqual(self._test_ui1.event.send.call_args_list,
expected)
def test_print_ui_queue(self):
""" Test print_ui_queue method """
event1 = bb.event.OperationStarted()
event2 = bb.event.OperationCompleted(total=123)
bb.event.fire(event1, None)
bb.event.fire(event2, None)
logger = logging.getLogger("BitBake")
logger.addHandler(bb.event.LogHandler())
logger.info("Test info LogRecord")
logger.warning("Test warning LogRecord")
with self.assertLogs("BitBake", level="INFO") as cm:
bb.event.print_ui_queue()
self.assertEqual(cm.output,
["INFO:BitBake:Test info LogRecord",
"WARNING:BitBake:Test warning LogRecord"])
def _set_threadlock_test_mockups(self):
""" Create UI event handler mockups used in enable and disable
threadlock tests """
def ui1_event_send(event):
if type(event) is bb.event.ConfigParsed:
self._threadlock_test_calls.append("w1_ui1")
if type(event) is bb.event.OperationStarted:
self._threadlock_test_calls.append("w2_ui1")
time.sleep(2)
def ui2_event_send(event):
if type(event) is bb.event.ConfigParsed:
self._threadlock_test_calls.append("w1_ui2")
if type(event) is bb.event.OperationStarted:
self._threadlock_test_calls.append("w2_ui2")
time.sleep(2)
self._threadlock_test_calls = []
self._test_ui1.event = EventQueueStub()
self._test_ui1.event.send = ui1_event_send
result = bb.event.register_UIHhandler(self._test_ui1, mainui=True)
self.assertEqual(result, 1)
self._test_ui2.event = EventQueueStub()
self._test_ui2.event.send = ui2_event_send
result = bb.event.register_UIHhandler(self._test_ui2, mainui=True)
self.assertEqual(result, 2)
def _set_and_run_threadlock_test_workers(self):
""" Create and run the workers used to trigger events in enable and
disable threadlock tests """
worker1 = threading.Thread(target=self._thread_lock_test_worker1)
worker2 = threading.Thread(target=self._thread_lock_test_worker2)
worker1.start()
time.sleep(1)
worker2.start()
worker1.join()
worker2.join()
def _thread_lock_test_worker1(self):
""" First worker used to fire the ConfigParsed event for enable and
disable threadlocks tests """
bb.event.fire(bb.event.ConfigParsed(), None)
def _thread_lock_test_worker2(self):
""" Second worker used to fire the OperationStarted event for enable
and disable threadlocks tests """
bb.event.fire(bb.event.OperationStarted(), None)
def test_enable_threadlock(self):
""" Test enable_threadlock method """
self._set_threadlock_test_mockups()
bb.event.enable_threadlock()
self._set_and_run_threadlock_test_workers()
# Calls to UI handlers should be in order as all the registered
# handlers for the event coming from the first worker should be
# called before processing the event from the second worker.
self.assertEqual(self._threadlock_test_calls,
["w1_ui1", "w1_ui2", "w2_ui1", "w2_ui2"])
def test_disable_threadlock(self):
""" Test disable_threadlock method """
self._set_threadlock_test_mockups()
bb.event.disable_threadlock()
self._set_and_run_threadlock_test_workers()
# Calls to UI handlers should be intertwined together. Thanks to the
# delay in the registered handlers for the event coming from the first
# worker, the event coming from the second worker starts being
# processed before finishing handling the first worker event.
self.assertEqual(self._threadlock_test_calls,
["w1_ui1", "w2_ui1", "w1_ui2", "w2_ui2"])

View File

@@ -1440,7 +1440,7 @@ class GitShallowTest(FetcherTest):
def test_bitbake(self):
self.git('remote add --mirror=fetch origin git://github.com/openembedded/bitbake', cwd=self.srcdir)
self.git('config core.bare true', cwd=self.srcdir)
self.git('fetch --tags', cwd=self.srcdir)
self.git('fetch', cwd=self.srcdir)
self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')
# Note that the 1.10.0 tag is annotated, so this also tests

View File

@@ -2,6 +2,7 @@
#
# Copyright (C) 2012-2017 Intel Corporation
# Copyright (C) 2011 Mentor Graphics Corporation
# Copyright (C) 2006-2012 Richard Purdie
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -54,6 +55,7 @@ class TinfoilCommandFailed(Exception):
"""Exception raised when run_command fails"""
class TinfoilDataStoreConnector:
"""Connector object used to enable access to datastore objects via tinfoil"""
def __init__(self, tinfoil, dsindex):
self.tinfoil = tinfoil
@@ -172,6 +174,14 @@ class TinfoilCookerAdapter:
attrvalue = self.tinfoil.run_command('getBbFilePriority') or {}
elif name == 'pkg_dp':
attrvalue = self.tinfoil.run_command('getDefaultPreference') or {}
elif name == 'fn_provides':
attrvalue = self.tinfoil.run_command('getRecipeProvides') or {}
elif name == 'packages':
attrvalue = self.tinfoil.run_command('getRecipePackages') or {}
elif name == 'packages_dynamic':
attrvalue = self.tinfoil.run_command('getRecipePackagesDynamic') or {}
elif name == 'rproviders':
attrvalue = self.tinfoil.run_command('getRProviders') or {}
else:
raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name))
@@ -208,15 +218,110 @@ class TinfoilCookerAdapter:
return self.tinfoil.find_best_provider(pn)
class TinfoilRecipeInfo:
"""
Provides a convenient representation of the cached information for a single recipe.
Some attributes are set on construction, others are read on-demand (which internally
may result in a remote procedure call to the bitbake server the first time).
Note that only information which is cached is available through this object - if
you need other variable values you will need to parse the recipe using
Tinfoil.parse_recipe().
"""
def __init__(self, recipecache, d, pn, fn, fns):
self._recipecache = recipecache
self._d = d
self.pn = pn
self.fn = fn
self.fns = fns
self.inherit_files = recipecache.inherits[fn]
self.depends = recipecache.deps[fn]
(self.pe, self.pv, self.pr) = recipecache.pkg_pepvpr[fn]
self._cached_packages = None
self._cached_rprovides = None
self._cached_packages_dynamic = None
def __getattr__(self, name):
if name == 'alternates':
return [x for x in self.fns if x != self.fn]
elif name == 'rdepends':
return self._recipecache.rundeps[self.fn]
elif name == 'rrecommends':
return self._recipecache.runrecs[self.fn]
elif name == 'provides':
return self._recipecache.fn_provides[self.fn]
elif name == 'packages':
if self._cached_packages is None:
self._cached_packages = []
for pkg, fns in self._recipecache.packages.items():
if self.fn in fns:
self._cached_packages.append(pkg)
return self._cached_packages
elif name == 'packages_dynamic':
if self._cached_packages_dynamic is None:
self._cached_packages_dynamic = []
for pkg, fns in self._recipecache.packages_dynamic.items():
if self.fn in fns:
self._cached_packages_dynamic.append(pkg)
return self._cached_packages_dynamic
elif name == 'rprovides':
if self._cached_rprovides is None:
self._cached_rprovides = []
for pkg, fns in self._recipecache.rproviders.items():
if self.fn in fns:
self._cached_rprovides.append(pkg)
return self._cached_rprovides
else:
raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name))
def inherits(self, only_recipe=False):
"""
Get the inherited classes for a recipe. Returns the class names only.
Parameters:
only_recipe: True to return only the classes inherited by the recipe
itself, False to return all classes inherited within
the context for the recipe (which includes globally
inherited classes).
"""
if only_recipe:
global_inherit = [x for x in (self._d.getVar('BBINCLUDED') or '').split() if x.endswith('.bbclass')]
else:
global_inherit = []
for clsfile in self.inherit_files:
if only_recipe and clsfile in global_inherit:
continue
clsname = os.path.splitext(os.path.basename(clsfile))[0]
yield clsname
def __str__(self):
return '%s' % self.pn
class Tinfoil:
"""
Tinfoil - an API for scripts and utilities to query
BitBake internals and perform build operations.
"""
def __init__(self, output=sys.stdout, tracking=False, setup_logging=True):
"""
Create a new tinfoil object.
Parameters:
output: specifies where console output should be sent. Defaults
to sys.stdout.
tracking: True to enable variable history tracking, False to
disable it (default). Enabling this has a minor
performance impact so typically it isn't enabled
unless you need to query variable history.
setup_logging: True to setup a logger so that things like
bb.warn() will work immediately and timeout warnings
are visible; False to let BitBake do this itself.
"""
self.logger = logging.getLogger('BitBake')
self.config_data = None
self.cooker = None
self.tracking = tracking
self.ui_module = None
self.server_connection = None
self.recipes_parsed = False
self.quiet = 0
if setup_logging:
# This is the *client-side* logger, nothing to do with
# logging messages from the server
@@ -229,6 +334,39 @@ class Tinfoil:
self.shutdown()
def prepare(self, config_only=False, config_params=None, quiet=0, extra_features=None):
"""
Prepares the underlying BitBake system to be used via tinfoil.
This function must be called prior to calling any of the other
functions in the API.
NOTE: if you call prepare() you must absolutely call shutdown()
before your code terminates. You can use a "with" block to ensure
this happens e.g.
with bb.tinfoil.Tinfoil() as tinfoil:
tinfoil.prepare()
...
Parameters:
config_only: True to read only the configuration and not load
the cache / parse recipes. This is useful if you just
want to query the value of a variable at the global
level or you want to do anything else that doesn't
involve knowing anything about the recipes in the
current configuration. False loads the cache / parses
recipes.
config_params: optionally specify your own configuration
parameters. If not specified an instance of
TinfoilConfigParameters will be created internally.
quiet: quiet level controlling console output - equivalent
to bitbake's -q/--quiet option. Default of 0 gives
the same output level as normal bitbake execution.
extra_features: extra features to be added to the feature
set requested from the server. See
CookerFeatures._feature_list for possible
features.
"""
self.quiet = quiet
if self.tracking:
extrafeatures = [bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING]
else:
@@ -243,7 +381,7 @@ class Tinfoil:
cookerconfig = CookerConfiguration()
cookerconfig.setConfigParameters(config_params)
server, self.server_connection, ui_module = setup_bitbake(config_params,
self.server_connection, ui_module = setup_bitbake(config_params,
cookerconfig,
extrafeatures,
setup_logging=False)
@@ -270,6 +408,7 @@ class Tinfoil:
self.run_command('parseConfiguration')
else:
self.run_actions(config_params)
self.recipes_parsed = True
self.config_data = bb.data.init()
connector = TinfoilDataStoreConnector(self, None)
@@ -289,7 +428,13 @@ class Tinfoil:
def parseRecipes(self):
"""
Force a parse of all recipes. Normally you should specify
Legacy function - use parse_recipes() instead.
"""
self.parse_recipes()
def parse_recipes(self):
"""
Load information on all recipes. Normally you should specify
config_only=False when calling prepare() instead of using this
function; this function is designed for situations where you need
to initialise Tinfoil and use it with config_only=True first and
@@ -297,6 +442,7 @@ class Tinfoil:
"""
config_params = TinfoilConfigParameters(config_only=False)
self.run_actions(config_params)
self.recipes_parsed = True
def run_command(self, command, *params):
"""
@@ -343,9 +489,16 @@ class Tinfoil:
return self.server_connection.events.waitEvent(timeout)
def get_overlayed_recipes(self):
"""
Find recipes which are overlayed (i.e. where recipes exist in multiple layers)
"""
return defaultdict(list, self.run_command('getOverlayedRecipes'))
def get_skipped_recipes(self):
"""
Find recipes which were skipped (i.e. SkipRecipe was raised
during parsing).
"""
return OrderedDict(self.run_command('getSkippedRecipes'))
def get_all_providers(self):
@@ -378,8 +531,77 @@ class Tinfoil:
return best[3]
def get_file_appends(self, fn):
"""
Find the bbappends for a recipe file
"""
return self.run_command('getFileAppends', fn)
def all_recipes(self, mc='', sort=True):
"""
Enable iterating over all recipes in the current configuration.
Returns an iterator over TinfoilRecipeInfo objects created on demand.
Parameters:
mc: The multiconfig, default of '' uses the main configuration.
sort: True to sort recipes alphabetically (default), False otherwise
"""
recipecache = self.cooker.recipecaches[mc]
if sort:
recipes = sorted(recipecache.pkg_pn.items())
else:
recipes = recipecache.pkg_pn.items()
for pn, fns in recipes:
prov = self.find_best_provider(pn)
recipe = TinfoilRecipeInfo(recipecache,
self.config_data,
pn=pn,
fn=prov[3],
fns=fns)
yield recipe
def all_recipe_files(self, mc='', variants=True, preferred_only=False):
"""
Enable iterating over all recipe files in the current configuration.
Returns an iterator over file paths.
Parameters:
mc: The multiconfig, default of '' uses the main configuration.
variants: True to include variants of recipes created through
BBCLASSEXTEND (default) or False to exclude them
preferred_only: True to include only the preferred recipe where
multiple exist providing the same PN, False to list
all recipes
"""
recipecache = self.cooker.recipecaches[mc]
if preferred_only:
files = []
for pn in recipecache.pkg_pn.keys():
prov = self.find_best_provider(pn)
files.append(prov[3])
else:
files = recipecache.pkg_fn.keys()
for fn in sorted(files):
if not variants and fn.startswith('virtual:'):
continue
yield fn
def get_recipe_info(self, pn, mc=''):
"""
Get information on a specific recipe in the current configuration by name (PN).
Returns a TinfoilRecipeInfo object created on demand.
Parameters:
mc: The multiconfig, default of '' uses the main configuration.
"""
recipecache = self.cooker.recipecaches[mc]
prov = self.find_best_provider(pn)
fn = prov[3]
actual_pn = recipecache.pkg_fn[fn]
recipe = TinfoilRecipeInfo(recipecache,
self.config_data,
pn=actual_pn,
fn=fn,
fns=recipecache.pkg_pn[actual_pn])
return recipe
def parse_recipe(self, pn):
"""
Parse the specified recipe and return a datastore object
@@ -415,14 +637,173 @@ class Tinfoil:
else:
return None
def build_file(self, buildfile, task):
def build_file(self, buildfile, task, internal=True):
"""
Runs the specified task for just a single recipe (i.e. no dependencies).
This is equivalent to bitbake -b, except no warning will be printed.
This is equivalent to bitbake -b, except with the default internal=True
no warning about dependencies will be produced, normal info messages
from the runqueue will be silenced and BuildInit, BuildStarted and
BuildCompleted events will not be fired.
"""
return self.run_command('buildFile', buildfile, task, True)
return self.run_command('buildFile', buildfile, task, internal)
def build_targets(self, targets, task=None, handle_events=True, extra_events=None, event_callback=None):
"""
Builds the specified targets. This is equivalent to a normal invocation
of bitbake. Has built-in event handling which is enabled by default and
can be extended if needed.
Parameters:
targets:
One or more targets to build. Can be a list or a
space-separated string.
task:
The task to run; if None then the value of BB_DEFAULT_TASK
will be used. Default None.
handle_events:
True to handle events in a similar way to normal bitbake
invocation with knotty; False to return immediately (on the
assumption that the caller will handle the events instead).
Default True.
extra_events:
An optional list of events to add to the event mask (if
handle_events=True). If you add events here you also need
to specify a callback function in event_callback that will
handle the additional events. Default None.
event_callback:
An optional function taking a single parameter which
will be called first upon receiving any event (if
handle_events=True) so that the caller can override or
extend the event handling. Default None.
"""
if isinstance(targets, str):
targets = targets.split()
if not task:
task = self.config_data.getVar('BB_DEFAULT_TASK')
if handle_events:
# A reasonable set of default events matching up with those we handle below
eventmask = [
'bb.event.BuildStarted',
'bb.event.BuildCompleted',
'logging.LogRecord',
'bb.event.NoProvider',
'bb.command.CommandCompleted',
'bb.command.CommandFailed',
'bb.build.TaskStarted',
'bb.build.TaskFailed',
'bb.build.TaskSucceeded',
'bb.build.TaskFailedSilent',
'bb.build.TaskProgress',
'bb.runqueue.runQueueTaskStarted',
'bb.runqueue.sceneQueueTaskStarted',
'bb.event.ProcessStarted',
'bb.event.ProcessProgress',
'bb.event.ProcessFinished',
]
if extra_events:
eventmask.extend(extra_events)
ret = self.set_event_mask(eventmask)
ret = self.run_command('buildTargets', targets, task)
if handle_events:
result = False
# Borrowed from knotty, instead somewhat hackily we use the helper
# as the object to store "shutdown" on
helper = bb.ui.uihelper.BBUIHelper()
# We set up logging optionally in the constructor so now we need to
# grab the handlers to pass to TerminalFilter
console = None
errconsole = None
for handler in self.logger.handlers:
if isinstance(handler, logging.StreamHandler):
if handler.stream == sys.stdout:
console = handler
elif handler.stream == sys.stderr:
errconsole = handler
format_str = "%(levelname)s: %(message)s"
format = bb.msg.BBLogFormatter(format_str)
helper.shutdown = 0
parseprogress = None
termfilter = bb.ui.knotty.TerminalFilter(helper, helper, console, errconsole, format, quiet=self.quiet)
try:
while True:
try:
event = self.wait_event(0.25)
if event:
if event_callback and event_callback(event):
continue
if helper.eventHandler(event):
continue
if isinstance(event, bb.event.ProcessStarted):
if self.quiet > 1:
continue
parseprogress = bb.ui.knotty.new_progress(event.processname, event.total)
parseprogress.start(False)
continue
if isinstance(event, bb.event.ProcessProgress):
if self.quiet > 1:
continue
if parseprogress:
parseprogress.update(event.progress)
else:
bb.warn("Got ProcessProgress event for someting that never started?")
continue
if isinstance(event, bb.event.ProcessFinished):
if self.quiet > 1:
continue
if parseprogress:
parseprogress.finish()
parseprogress = None
continue
if isinstance(event, bb.command.CommandCompleted):
result = True
break
if isinstance(event, bb.command.CommandFailed):
self.logger.error(str(event))
result = False
break
if isinstance(event, logging.LogRecord):
if event.taskpid == 0 or event.levelno > logging.INFO:
self.logger.handle(event)
continue
if isinstance(event, bb.event.NoProvider):
self.logger.error(str(event))
result = False
break
elif helper.shutdown > 1:
break
termfilter.updateFooter()
except KeyboardInterrupt:
termfilter.clearFooter()
if helper.shutdown == 1:
print("\nSecond Keyboard Interrupt, stopping...\n")
ret = self.run_command("stateForceShutdown")
if ret and ret[2]:
self.logger.error("Unable to cleanly stop: %s" % ret[2])
elif helper.shutdown == 0:
print("\nKeyboard Interrupt, closing down...\n")
interrupted = True
ret = self.run_command("stateShutdown")
if ret and ret[2]:
self.logger.error("Unable to cleanly shutdown: %s" % ret[2])
helper.shutdown = helper.shutdown + 1
termfilter.clearFooter()
finally:
termfilter.finish()
if helper.failed_tasks:
result = False
return result
else:
return ret
def shutdown(self):
"""
Shut down tinfoil. Disconnects from the server and gracefully
releases any associated resources. You must call this function if
prepare() has been called, or use a with... block when you create
the tinfoil object which will ensure that it gets called.
"""
if self.server_connection:
self.run_command('clientComplete')
_server_connections.remove(self.server_connection)

View File

@@ -858,6 +858,12 @@ class MockEvent(object):
self.pathname = None
self.lineno = None
def getMessage(self):
"""
Simulate LogRecord message return
"""
return self.msg
class BuildInfoHelper(object):
""" This class gathers the build information from the server and sends it
@@ -981,6 +987,7 @@ class BuildInfoHelper(object):
pathRE = pathRE[:-1]
p = re.compile(pathRE)
path=re.sub(r'[$^]',r'',pathRE)
# Heuristics: we always match recipe to the deepest layer path in
# the discovered layers
for lvo in sorted(self.orm_wrapper.layer_version_objects,
@@ -990,12 +997,16 @@ class BuildInfoHelper(object):
if lvo.layer.local_source_dir:
if p.fullmatch(os.path.abspath(lvo.layer.local_source_dir)):
return lvo
if 0 == path.find(lvo.local_path):
# sub-layer path inside existing layer
return lvo
# if we get here, we didn't read layers correctly;
# dump whatever information we have on the error log
logger.warning("Could not match layer dependency for path %s : %s",
pathRE,
self.orm_wrapper.layer_version_objects)
return None
def _get_layer_version_for_path(self, path):
self._ensure_build()
@@ -1396,9 +1407,9 @@ class BuildInfoHelper(object):
for lv in event._depgraph['layer-priorities']:
(_, path, _, priority) = lv
layer_version_obj = self._get_layer_version_for_dependency(path)
assert layer_version_obj is not None
layer_version_obj.priority = priority
layer_version_obj.save()
if layer_version_obj:
layer_version_obj.priority = priority
layer_version_obj.save()
# save recipe information
self.internal_state['recipes'] = {}

View File

@@ -207,8 +207,10 @@ class TerminalFilter(object):
self.interactive = False
bb.note("Unable to use interactive mode for this terminal, using fallback")
return
console.addFilter(InteractConsoleLogFilter(self, format))
errconsole.addFilter(InteractConsoleLogFilter(self, format))
if console:
console.addFilter(InteractConsoleLogFilter(self, format))
if errconsole:
errconsole.addFilter(InteractConsoleLogFilter(self, format))
self.main_progress = None
@@ -472,11 +474,11 @@ def main(server, eventHandler, params, tf = TerminalFilter):
continue
# Prefix task messages with recipe/task
if event.taskpid in helper.running_tasks:
if event.taskpid in helper.running_tasks and event.levelno != format.PLAIN:
taskinfo = helper.running_tasks[event.taskpid]
event.msg = taskinfo['title'] + ': ' + event.msg
if hasattr(event, 'fn'):
event.msg = event.fn + ': ' + event.msg
event.msg = event.fn + ': ' + event.msg
logger.handle(event)
continue
@@ -560,7 +562,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
return_value = event.exitcode
if event.error:
errors = errors + 1
logger.error("Command execution failed: %s", event.error)
logger.error(str(event))
main.shutdown = 2
continue
if isinstance(event, bb.command.CommandExit):
@@ -571,39 +573,16 @@ def main(server, eventHandler, params, tf = TerminalFilter):
main.shutdown = 2
continue
if isinstance(event, bb.event.MultipleProviders):
logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
event._item,
", ".join(event._candidates))
rtime = ""
if event._is_runtime:
rtime = "R"
logger.info("consider defining a PREFERRED_%sPROVIDER entry to match %s" % (rtime, event._item))
logger.info(str(event))
continue
if isinstance(event, bb.event.NoProvider):
if event._runtime:
r = "R"
else:
r = ""
extra = ''
if not event._reasons:
if event._close_matches:
extra = ". Close matches:\n %s" % '\n '.join(event._close_matches)
# For universe builds, only show these as warnings, not errors
h = logger.warning
if not universe:
return_value = 1
errors = errors + 1
h = logger.error
if event._dependees:
h("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra)
logger.error(str(event))
else:
h("Nothing %sPROVIDES '%s'%s", r, event._item, extra)
if event._reasons:
for reason in event._reasons:
h("%s", reason)
logger.warning(str(event))
continue
if isinstance(event, bb.runqueue.sceneQueueTaskStarted):
@@ -625,13 +604,11 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if isinstance(event, bb.runqueue.runQueueTaskFailed):
return_value = 1
taskfailures.append(event.taskstring)
logger.error("Task (%s) failed with exit code '%s'",
event.taskstring, event.exitcode)
logger.error(str(event))
continue
if isinstance(event, bb.runqueue.sceneQueueTaskFailed):
logger.warning("Setscene task (%s) failed with exit code '%s' - real task will be run instead",
event.taskstring, event.exitcode)
logger.warning(str(event))
continue
if isinstance(event, bb.event.DepTreeGenerated):
@@ -664,6 +641,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
bb.event.MetadataEvent,
bb.event.StampUpdate,
bb.event.ConfigParsed,
bb.event.MultiConfigParsed,
bb.event.RecipeParsed,
bb.event.RecipePreFinalise,
bb.runqueue.runQueueEvent,

View File

@@ -315,7 +315,7 @@ class NCursesUI:
# also allow them to now exit with a single ^C
shutdown = 2
if isinstance(event, bb.command.CommandFailed):
mw.appendText("Command execution failed: %s" % event.error)
mw.appendText(str(event))
time.sleep(2)
exitflag = True
if isinstance(event, bb.command.CommandExit):

View File

@@ -286,23 +286,7 @@ def main(server, eventHandler, params):
continue
if isinstance(event, bb.event.NoProvider):
if event._runtime:
r = "R"
else:
r = ""
extra = ''
if not event._reasons:
if event._close_matches:
extra = ". Close matches:\n %s" % '\n '.join(event._close_matches)
if event._dependees:
print("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s" % (r, event._item, ", ".join(event._dependees), r, extra))
else:
print("Nothing %sPROVIDES '%s'%s" % (r, event._item, extra))
if event._reasons:
for reason in event._reasons:
print(reason)
print(str(event))
_, error = server.runCommand(["stateShutdown"])
if error:
@@ -310,7 +294,7 @@ def main(server, eventHandler, params):
break
if isinstance(event, bb.command.CommandFailed):
print("Command execution failed: %s" % event.error)
print(str(event))
return event.exitcode
if isinstance(event, bb.command.CommandExit):

View File

@@ -320,29 +320,13 @@ def main(server, eventHandler, params):
if isinstance(event, bb.event.CacheLoadCompleted):
continue
if isinstance(event, bb.event.MultipleProviders):
logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
event._item,
", ".join(event._candidates))
logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
logger.info(str(event))
continue
if isinstance(event, bb.event.NoProvider):
errors = errors + 1
if event._runtime:
r = "R"
else:
r = ""
if event._dependees:
text = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
else:
text = "Nothing %sPROVIDES '%s'" % (r, event._item)
text = str(event)
logger.error(text)
if event._reasons:
for reason in event._reasons:
logger.error("%s", reason)
text += reason
buildinfohelper.store_log_error(text)
continue
@@ -364,8 +348,7 @@ def main(server, eventHandler, params):
if isinstance(event, bb.runqueue.runQueueTaskFailed):
buildinfohelper.update_and_store_task(event)
taskfailures.append(event.taskstring)
logger.error("Task (%s) failed with exit code '%s'",
event.taskstring, event.exitcode)
logger.error(str(event))
continue
if isinstance(event, (bb.runqueue.sceneQueueTaskCompleted, bb.runqueue.sceneQueueTaskFailed)):
@@ -382,7 +365,7 @@ def main(server, eventHandler, params):
if isinstance(event, bb.command.CommandFailed):
errors += 1
errorcode = 1
logger.error("Command execution failed: %s", event.error)
logger.error(str(event))
elif isinstance(event, bb.event.BuildCompleted):
buildinfohelper.scan_image_artifacts()
buildinfohelper.clone_required_sdk_artifacts()

View File

@@ -61,6 +61,9 @@ class BBUIHelper:
self.running_tasks[event.pid]['progress'] = event.progress
self.running_tasks[event.pid]['rate'] = event.rate
self.needUpdate = True
else:
return False
return True
def getTasks(self):
self.needUpdate = False

View File

@@ -1502,7 +1502,7 @@ def export_proxies(d):
def load_plugins(logger, plugins, pluginpath):
def load_plugin(name):
logger.debug('Loading plugin %s' % name)
logger.debug(1, 'Loading plugin %s' % name)
fp, pathname, description = imp.find_module(name, [pluginpath])
try:
return imp.load_module(name, fp, pathname, description)
@@ -1510,7 +1510,7 @@ def load_plugins(logger, plugins, pluginpath):
if fp:
fp.close()
logger.debug('Loading plugins from %s...' % pluginpath)
logger.debug(1, 'Loading plugins from %s...' % pluginpath)
expanded = (glob.glob(os.path.join(pluginpath, '*' + ext))
for ext in python_extensions)

View File

@@ -6,10 +6,11 @@ import queue
import socket
import io
import sqlite3
import bb.server.xmlrpc
import bb.server.xmlrpcclient
import prserv
import prserv.db
import errno
import select
logger = logging.getLogger("BitBake.PRserv")
@@ -59,6 +60,8 @@ class PRServer(SimpleXMLRPCServer):
self.register_function(self.importone, "importone")
self.register_introspection_functions()
self.quitpipein, self.quitpipeout = os.pipe()
self.requestqueue = queue.Queue()
self.handlerthread = threading.Thread(target = self.process_request_thread)
self.handlerthread.daemon = False
@@ -153,11 +156,16 @@ class PRServer(SimpleXMLRPCServer):
def quit(self):
self.quit=True
os.write(self.quitpipeout, b"q")
os.close(self.quitpipeout)
return
def work_forever(self,):
self.quit = False
self.timeout = 0.5
# This timeout applies to the poll in TCPServer, we need the select
# below to wake on our quit pipe closing. We only ever call into handle_request
# if there is data there.
self.timeout = 0.01
bb.utils.set_process_name("PRServ")
@@ -170,11 +178,16 @@ class PRServer(SimpleXMLRPCServer):
self.handlerthread.start()
while not self.quit:
self.handle_request()
ready = select.select([self.fileno(), self.quitpipein], [], [], 30)
if self.quit:
break
if self.fileno() in ready[0]:
self.handle_request()
self.handlerthread.join()
self.db.disconnect()
logger.info("PRServer: stopping...")
self.server_close()
os.close(self.quitpipein)
return
def start(self):
@@ -182,6 +195,7 @@ class PRServer(SimpleXMLRPCServer):
pid = self.daemonize()
else:
pid = self.fork()
self.pid = pid
# Ensure both the parent sees this and the child from the work_forever log entry above
logger.info("Started PRServer with DBfile: %s, IP: %s, PORT: %s, PID: %s" %
@@ -300,7 +314,7 @@ class PRServerConnection(object):
host, port = singleton.getinfo()
self.host = host
self.port = port
self.connection, self.transport = bb.server.xmlrpc._create_server(self.host, self.port)
self.connection, self.transport = bb.server.xmlrpcclient._create_server(self.host, self.port)
def terminate(self):
try:
@@ -472,6 +486,7 @@ def auto_shutdown(d=None):
PRServerConnection(host, port).terminate()
except:
logger.critical("Stop PRService %s:%d failed" % (host,port))
os.waitpid(singleton.prserv.pid, 0)
singleton = None
def ping(host, port):

View File

@@ -1,7 +1,7 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2014 Intel Corporation
# Copyright (C) 2014-2017 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -19,7 +19,9 @@
from django.conf.urls import patterns, include, url
urlpatterns = patterns('bldcollector.views',
import bldcollector.views
urlpatterns = [
# landing point for pushing a bitbake_eventlog.json file to this toaster instace
url(r'^eventfile$', 'eventfile', name='eventfile'),
)
url(r'^eventfile$', bldcollector.views.eventfile, name='eventfile'),
]

View File

@@ -37,8 +37,8 @@ class BitbakeController(object):
"""
def __init__(self, be):
import bb.server.xmlrpc
self.connection = bb.server.xmlrpc._create_server(be.bbaddress,
import bb.server.xmlrpcclient
self.connection = bb.server.xmlrpcclient._create_server(be.bbaddress,
int(be.bbport))[0]
def _runCommand(self, command):

View File

@@ -24,6 +24,7 @@ import os
import sys
import re
import shutil
import time
from django.db import transaction
from django.db.models import Q
from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake
@@ -85,6 +86,11 @@ class LocalhostBEController(BuildEnvironmentController):
return local_checkout_path
def setCloneStatus(self,bitbake,status,total,current):
bitbake.req.build.repos_cloned=current
bitbake.req.build.repos_to_clone=total
bitbake.req.build.save()
def setLayers(self, bitbake, layers, targets):
""" a word of attention: by convention, the first layer for any build will be poky! """
@@ -147,7 +153,13 @@ class LocalhostBEController(BuildEnvironmentController):
logger.info("Using pre-checked out source for layer %s", cached_layers)
# 3. checkout the repositories
clone_count=0
clone_total=len(gitrepos.keys())
self.setCloneStatus(bitbake,'Started',clone_total,clone_count)
for giturl, commit in gitrepos.keys():
self.setCloneStatus(bitbake,'progress',clone_total,clone_count)
clone_count += 1
localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit))
logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname))
@@ -198,6 +210,7 @@ class LocalhostBEController(BuildEnvironmentController):
if name != "bitbake":
layerlist.append(localdirpath.rstrip("/"))
self.setCloneStatus(bitbake,'complete',clone_total,clone_count)
logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
# 5. create custom layer and add custom recipes to it
@@ -319,12 +332,22 @@ class LocalhostBEController(BuildEnvironmentController):
bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake')
toasterlayers = os.path.join(builddir,"conf/toaster-bblayers.conf")
self._shellcmd('bash -c \"source %s %s; BITBAKE_UI="knotty" %s --read %s --read %s '
'--server-only -t xmlrpc -B 0.0.0.0:0\"' % (oe_init,
'--server-only -B 0.0.0.0:0\"' % (oe_init,
builddir, bitbake, confpath, toasterlayers), self.be.sourcedir)
# read port number from bitbake.lock
self.be.bbport = ""
bblock = os.path.join(builddir, 'bitbake.lock')
# allow 10 seconds for bb lock file to appear but also be populated
for lock_check in range(10):
if not os.path.exists(bblock):
logger.debug("localhostbecontroller: waiting for bblock file to appear")
time.sleep(1)
continue
if 10 < os.stat(bblock).st_size:
break
logger.debug("localhostbecontroller: waiting for bblock content to appear")
time.sleep(1)
with open(bblock) as fplock:
for line in fplock:
if ":" in line:
@@ -353,10 +376,10 @@ class LocalhostBEController(BuildEnvironmentController):
log = os.path.join(builddir, 'toaster_ui.log')
local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')),
'bitbake')
self._shellcmd(['bash -c \"(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" '
self._shellcmd(['bash -c \"(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:%s" '
'%s %s -u toasterui --token="" >>%s 2>&1;'
'BITBAKE_UI="knotty" BBSERVER=0.0.0.0:-1 %s -m)&\"' \
% (brbe, local_bitbake, bbtargets, log, bitbake)],
'BITBAKE_UI="knotty" BBSERVER=0.0.0.0:%s %s -m)&\"' \
% (brbe, self.be.bbport, local_bitbake, bbtargets, log, self.be.bbport, bitbake)],
builddir, nowait=True)
logger.debug('localhostbecontroller: Build launched, exiting. '

View File

@@ -1,4 +1,4 @@
from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.core.management import call_command
@@ -18,7 +18,7 @@ def DN(path):
return os.path.dirname(path)
class Command(NoArgsCommand):
class Command(BaseCommand):
args = ""
help = "Verifies that the configured settings are valid and usable, or prompts the user to fix the settings."
@@ -152,7 +152,7 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
def handle(self, **options):
retval = 0
retval += self._verify_build_environment()
retval += self._verify_default_settings()

View File

@@ -1,4 +1,4 @@
from django.core.management.base import NoArgsCommand
from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.models import Q
@@ -16,7 +16,7 @@ import os
logger = logging.getLogger("toaster")
class Command(NoArgsCommand):
class Command(BaseCommand):
args = ""
help = "Schedules and executes build requests as possible. "\
"Does not return (interrupt with Ctrl-C)"
@@ -168,7 +168,7 @@ class Command(NoArgsCommand):
except Exception as e:
logger.warn("runbuilds: schedule exception %s" % str(e))
def handle_noargs(self, **options):
def handle(self, **options):
pidfile_path = os.path.join(os.environ.get("BUILDDIR", "."),
".runbuilds.pid")

View File

@@ -4,7 +4,7 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2016 Intel Corporation
# Copyright (C) 2016-2017 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -19,10 +19,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.core.management.base import NoArgsCommand
from django.core.management.base import BaseCommand
from orm.models import LayerSource, Layer, Release, Layer_Version
from orm.models import LayerVersionDependency, Machine, Recipe
from orm.models import Distro
import os
import sys
@@ -56,7 +57,7 @@ class Spinner(threading.Thread):
self.signal = False
class Command(NoArgsCommand):
class Command(BaseCommand):
args = ""
help = "Updates locally cached information from a layerindex server"
@@ -249,6 +250,24 @@ class Command(NoArgsCommand):
depends_on=lvd)
self.mini_progress("Layer version dependencies", i, total)
# update Distros
logger.info("Fetching distro information")
distros_info = _get_json_response(
apilinks['distros'] + "?filter=layerbranch__branch__name:%s" %
"OR".join(whitelist_branch_names))
total = len(distros_info)
for i, di in enumerate(distros_info):
distro, created = Distro.objects.get_or_create(
name=di['name'],
layer_version=Layer_Version.objects.get(
pk=li_layer_branch_id_to_toaster_lv_id[di['layerbranch']]))
distro.up_date = di['updated']
distro.name = di['name']
distro.description = di['description']
distro.save()
self.mini_progress("distros", i, total)
# update machines
logger.info("Fetching machine information")
machines_info = _get_json_response(
@@ -307,5 +326,5 @@ class Command(NoArgsCommand):
os.system('setterm -cursor on')
def handle_noargs(self, **options):
def handle(self, **options):
self.update()

View File

@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orm', '0015_layer_local_source_dir'),
]
operations = [
migrations.AddField(
model_name='build',
name='repos_cloned',
field=models.IntegerField(default=1),
),
migrations.AddField(
model_name='build',
name='repos_to_clone',
field=models.IntegerField(default=1), # (default off)
),
]

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orm', '0016_clone_progress'),
]
operations = [
migrations.CreateModel(
name='Distro',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('up_id', models.IntegerField(default=None, null=True)),
('up_date', models.DateTimeField(default=None, null=True)),
('name', models.CharField(max_length=255)),
('description', models.CharField(max_length=255)),
('layer_version', models.ForeignKey(to='orm.Layer_Version')),
],
),
]

View File

@@ -225,16 +225,16 @@ class Project(models.Model):
return( -1 )
def get_last_outcome(self):
build_id = self.get_last_build_id
build_id = self.get_last_build_id()
if (-1 == build_id):
return( "" )
try:
return Build.objects.filter( id = self.get_last_build_id )[ 0 ].outcome
return Build.objects.filter( id = build_id )[ 0 ].outcome
except (Build.DoesNotExist,IndexError):
return( "not_found" )
def get_last_target(self):
build_id = self.get_last_build_id
build_id = self.get_last_build_id()
if (-1 == build_id):
return( "" )
try:
@@ -243,7 +243,7 @@ class Project(models.Model):
return( "not_found" )
def get_last_errors(self):
build_id = self.get_last_build_id
build_id = self.get_last_build_id()
if (-1 == build_id):
return( 0 )
try:
@@ -252,7 +252,7 @@ class Project(models.Model):
return( "not_found" )
def get_last_warnings(self):
build_id = self.get_last_build_id
build_id = self.get_last_build_id()
if (-1 == build_id):
return( 0 )
try:
@@ -269,7 +269,7 @@ class Project(models.Model):
return last_build.get_image_file_extensions()
def get_last_imgfiles(self):
build_id = self.get_last_build_id
build_id = self.get_last_build_id()
if (-1 == build_id):
return( "" )
try:
@@ -321,6 +321,22 @@ class Project(models.Model):
return queryset
def get_available_distros(self):
""" Returns QuerySet of all Distros which are provided by the
Layers currently added to the Project """
queryset = Distro.objects.filter(
layer_version__in=self.get_project_layer_versions())
return queryset
def get_all_compatible_distros(self):
""" Returns QuerySet of all the compatible Wind River distros available to the
project including ones from Layers not currently added """
queryset = Distro.objects.filter(
layer_version__in=self.get_all_compatible_layer_versions())
return queryset
def get_available_recipes(self):
""" Returns QuerySet of all the recipes that are provided by layers
added to this project """
@@ -435,7 +451,13 @@ class Build(models.Model):
recipes_to_parse = models.IntegerField(default=1)
# number of recipes parsed so far for this build
recipes_parsed = models.IntegerField(default=0)
recipes_parsed = models.IntegerField(default=1)
# number of repos to clone for this build
repos_to_clone = models.IntegerField(default=1)
# number of repos cloned so far for this build (default off)
repos_cloned = models.IntegerField(default=1)
@staticmethod
def get_recent(project=None):
@@ -486,7 +508,7 @@ class Build(models.Model):
tf = Task.objects.filter(build = self)
tfc = tf.count()
if tfc > 0:
completeper = tf.exclude(order__isnull=True).count()*100 // tfc
completeper = tf.exclude(outcome=Task.OUTCOME_NA).count()*100 // tfc
else:
completeper = 0
return completeper
@@ -667,6 +689,13 @@ class Build(models.Model):
else:
return False
def is_cloning(self):
"""
True if the build is still cloning repos
"""
return self.outcome == Build.IN_PROGRESS and \
self.repos_cloned < self.repos_to_clone
def is_parsing(self):
"""
True if the build is still parsing recipes
@@ -680,10 +709,11 @@ class Build(models.Model):
tasks.
Note that the mechanism for testing whether a Task is "done" is whether
its order field is set, as per the completeper() method.
its outcome field is set, as per the completeper() method.
"""
return self.outcome == Build.IN_PROGRESS and \
self.task_build.filter(order__isnull=False).count() == 0
self.task_build.exclude(outcome=Task.OUTCOME_NA).count() == 0
def get_state(self):
"""
@@ -698,6 +728,8 @@ class Build(models.Model):
return 'Cancelling';
elif self.is_queued():
return 'Queued'
elif self.is_cloning():
return 'Cloning'
elif self.is_parsing():
return 'Parsing'
elif self.is_starting():
@@ -1485,12 +1517,12 @@ class Layer_Version(models.Model):
return self._handle_url_path(self.layer.vcs_web_tree_base_url, '')
def get_vcs_reference(self):
if self.commit is not None and len(self.commit) > 0:
return self.commit
if self.branch is not None and len(self.branch) > 0:
return self.branch
if self.release is not None:
return self.release.name
if self.commit is not None and len(self.commit) > 0:
return self.commit
return 'N/A'
def get_detailspage_url(self, project_id=None):
@@ -1780,6 +1812,21 @@ def signal_runbuilds():
except FileNotFoundError:
logger.info("Stopping existing runbuilds: no current process found")
class Distro(models.Model):
search_allowed_fields = ["name", "description", "layer_version__layer__name"]
up_date = models.DateTimeField(null = True, default = None)
layer_version = models.ForeignKey('Layer_Version')
name = models.CharField(max_length=255)
description = models.CharField(max_length=255)
def get_vcs_distro_file_link_url(self):
path = self.name+'.conf'
return self.layer_version.get_vcs_file_link_url(path)
def __unicode__(self):
return "Distro " + self.name + "(" + self.description + ")"
django.db.models.signals.post_save.connect(invalidate_cache)
django.db.models.signals.post_delete.connect(invalidate_cache)
django.db.models.signals.m2m_changed.connect(invalidate_cache)

View File

@@ -874,6 +874,12 @@ class XhrProject(View):
machinevar.value = request.POST['machineName']
machinevar.save()
# Distro name change
if 'distroName' in request.POST:
distrovar = prj.projectvariable_set.get(name="DISTRO")
distrovar.value = request.POST['distroName']
distrovar.save()
return JsonResponse({"error": "ok"})
def get(self, request, *args, **kwargs):
@@ -960,10 +966,11 @@ class XhrProject(View):
except ProjectVariable.DoesNotExist:
data["machine"] = None
try:
data["distro"] = project.projectvariable_set.get(
name="DISTRO").value
data["distro"] = {"name":
project.projectvariable_set.get(
name="DISTRO").value}
except ProjectVariable.DoesNotExist:
data["distro"] = "-- not set yet"
data["distro"] = None
data['error'] = "ok"

View File

@@ -61,6 +61,12 @@ function mrbSectionInit(ctx){
return (cached.recipes_parsed_percentage !== build.recipes_parsed_percentage);
}
// returns true if the number of repos cloned/to clone changed
function cloneProgressChanged(build) {
var cached = getCached(build);
return (cached.repos_cloned_percentage !== build.repos_cloned_percentage);
}
function refreshMostRecentBuilds(){
libtoaster.getMostRecentBuilds(
libtoaster.ctx.mostRecentBuildsUrl,
@@ -100,6 +106,15 @@ function mrbSectionInit(ctx){
container.html(html);
}
else if (cloneProgressChanged(build)) {
// update the clone progress text
selector = '#repos-cloned-percentage-' + build.id;
$(selector).html(build.repos_cloned_percentage);
// update the recipe progress bar
selector = '#repos-cloned-percentage-bar-' + build.id;
$(selector).width(build.repos_cloned_percentage + '%');
}
else if (tasksProgressChanged(build)) {
// update the task progress text
selector = '#build-pc-done-' + build.id;

View File

@@ -15,6 +15,13 @@ function projectPageInit(ctx) {
var machineInputForm = $("#machine-input-form");
var invalidMachineNameHelp = $("#invalid-machine-name-help");
var distroChangeInput = $("#distro-change-input");
var distroChangeBtn = $("#distro-change-btn");
var distroForm = $("#select-distro-form");
var distroChangeFormToggle = $("#change-distro-toggle");
var distroNameTitle = $("#project-distro-name");
var distroChangeCancel = $("#cancel-distro-change");
var freqBuildBtn = $("#freq-build-btn");
var freqBuildList = $("#freq-build-list");
@@ -26,6 +33,7 @@ function projectPageInit(ctx) {
var currentLayerAddSelection;
var currentMachineAddSelection = "";
var currentDistroAddSelection = "";
var urlParams = libtoaster.parseUrlParams();
@@ -45,6 +53,17 @@ function projectPageInit(ctx) {
updateMachineName(prjInfo.machine.name);
}
/* If we're receiving a distro set from the url and it's different from
* our current distro then activate set machine sequence.
*/
if (urlParams.hasOwnProperty('setDistro') &&
urlParams.setDistro !== prjInfo.distro.name){
distroChangeInput.val(urlParams.setDistro);
distroChangeBtn.click();
} else {
updateDistroName(prjInfo.distro.name);
}
/* Now we're really ready show the page */
$("#project-page").show();
@@ -278,6 +297,60 @@ function projectPageInit(ctx) {
});
/* Change distro functionality */
distroChangeFormToggle.click(function(){
distroForm.slideDown();
distroNameTitle.hide();
$(this).hide();
});
distroChangeCancel.click(function(){
distroForm.slideUp(function(){
distroNameTitle.show();
distroChangeFormToggle.show();
});
});
function updateDistroName(distroName){
distroChangeInput.val(distroName);
distroNameTitle.text(distroName);
}
libtoaster.makeTypeahead(distroChangeInput,
libtoaster.ctx.distrosTypeAheadUrl,
{ }, function(item){
currentDistroAddSelection = item.name;
distroChangeBtn.removeAttr("disabled");
});
distroChangeBtn.click(function(e){
e.preventDefault();
/* We accept any value regardless of typeahead selection or not */
if (distroChangeInput.val().length === 0)
return;
currentDistroAddSelection = distroChangeInput.val();
libtoaster.editCurrentProject(
{ distroName : currentDistroAddSelection },
function(){
/* Success machine changed */
updateDistroName(currentDistroAddSelection);
distroChangeCancel.click();
/* Show the alert message */
var message = $('<span>You have changed the distro to: <strong><span id="notify-machine-name"></span></strong></span>');
message.find("#notify-machine-name").text(currentDistroAddSelection);
libtoaster.showChangeNotification(message);
},
function(){
/* Failed machine changed */
console.warn("Failed to change distro");
});
});
/* Change release functionality */
function updateProjectRelease(release){
releaseTitle.text(release.description);

View File

@@ -73,14 +73,14 @@ function projectTopBarInit(ctx) {
newBuildTargetBuildBtn.click(function (e) {
e.preventDefault();
if (!newBuildTargetInput.val()) {
if (!newBuildTargetInput.val().trim()) {
return;
}
/* We use the value of the input field so as to maintain any command also
* added e.g. core-image-minimal:clean and because we can build targets
* that toaster doesn't yet know about
*/
selectedTarget = { name: newBuildTargetInput.val() };
selectedTarget = { name: newBuildTargetInput.val().trim() };
/* Fire off the build */
libtoaster.startABuild(null, selectedTarget.name,

View File

@@ -23,6 +23,7 @@ from toastergui.widgets import ToasterTable
from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project
from orm.models import CustomImageRecipe, Package, Target, Build, LogMessage, Task
from orm.models import CustomImagePackage, Package_DependencyManager
from orm.models import Distro
from django.db.models import Q, Max, Sum, Count, When, Case, Value, IntegerField
from django.conf.urls import url
from django.core.urlresolvers import reverse, resolve
@@ -1536,3 +1537,93 @@ class ProjectBuildsTable(BuildsTable):
context['build_in_progress_none_completed'] = False
return context
class DistrosTable(ToasterTable):
"""Table of Distros in Toaster"""
def __init__(self, *args, **kwargs):
super(DistrosTable, self).__init__(*args, **kwargs)
self.empty_state = "Toaster has no distro information for this project. Sadly, distro information cannot be obtained from builds, so this page will remain empty."
self.title = "Compatible Distros"
self.default_orderby = "name"
def get_context_data(self, **kwargs):
context = super(DistrosTable, self).get_context_data(**kwargs)
context['project'] = Project.objects.get(pk=kwargs['pid'])
return context
def setup_filters(self, *args, **kwargs):
project = Project.objects.get(pk=kwargs['pid'])
in_current_project_filter = TableFilter(
"in_current_project",
"Filter by project Distros"
)
in_project_action = TableFilterActionToggle(
"in_project",
"Distro provided by layers added to this project",
ProjectFilters.in_project(self.project_layers)
)
not_in_project_action = TableFilterActionToggle(
"not_in_project",
"Distros provided by layers not added to this project",
ProjectFilters.not_in_project(self.project_layers)
)
in_current_project_filter.add_action(in_project_action)
in_current_project_filter.add_action(not_in_project_action)
self.add_filter(in_current_project_filter)
def setup_queryset(self, *args, **kwargs):
prj = Project.objects.get(pk = kwargs['pid'])
self.queryset = prj.get_all_compatible_distros()
self.queryset = self.queryset.order_by(self.default_orderby)
self.static_context_extra['current_layers'] = \
self.project_layers = \
prj.get_project_layer_versions(pk=True)
def setup_columns(self, *args, **kwargs):
self.add_column(title="Distro",
hideable=False,
orderable=True,
field_name="name")
self.add_column(title="Description",
field_name="description")
layer_link_template = '''
<a href="{% url 'layerdetails' extra.pid data.layer_version.id %}">
{{data.layer_version.layer.name}}</a>
'''
self.add_column(title="Layer",
static_data_name="layer_version__layer__name",
static_data_template=layer_link_template,
orderable=True)
self.add_column(title="Git revision",
help_text="The Git branch, tag or commit. For the layers from the OpenEmbedded layer source, the revision is always the branch compatible with the Yocto Project version you selected for this project",
hidden=True,
field_name="layer_version__get_vcs_reference")
wrtemplate_file_template = '''<code>conf/machine/{{data.name}}.conf</code>
<a href="{{data.get_vcs_machine_file_link_url}}" target="_blank"><span class="glyphicon glyphicon-new-window"></i></a>'''
self.add_column(title="Distro file",
hidden=True,
static_data_name="templatefile",
static_data_template=wrtemplate_file_template)
self.add_column(title="Select",
help_text="Sets the selected distro to the project",
hideable=False,
filter_name="in_current_project",
static_data_name="add-del-layers",
static_data_template='{% include "distro_btn.html" %}')

View File

@@ -49,6 +49,7 @@
recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
distrosTypeAheadUrl: {% url 'xhr_distrostypeahead' project.id as paturl%}{{paturl|json}},
projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
projectId : {{project.id}},
@@ -100,7 +101,8 @@
<div class="collapse navbar-collapse" id="global-nav">
<ul class="nav navbar-nav">
{% if request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
<li {% if request.resolver_match.url_name == 'all-builds' %}
<li id="navbar-all-builds"
{% if request.resolver_match.url_name == 'all-builds' %}
class="active"
{% endif %}>
<a href="{% url 'all-builds' %}">
@@ -108,7 +110,8 @@
All builds
</a>
</li>
<li {% if request.resolver_match.url_name == 'all-projects' %}
<li id="navbar-all-projects"
{% if request.resolver_match.url_name == 'all-projects' %}
class="active"
{% endif %}>
<a href="{% url 'all-projects' %}">
@@ -117,7 +120,7 @@
</a>
</li>
{% endif %}
<li>
<li id="navbar-docs">
<a target="_blank" href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
<i class="glyphicon glyphicon-book"></i>
Documentation

View File

@@ -132,16 +132,16 @@
{% endif %}
<li class="nav-header">Build</li>
<li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
<li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
<li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
<li><a href="{% url 'packages' build.pk %}">Packages</a></li>
<li id="menu-tasks"><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
<li id="menu-recipes"><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
<li id="menu-packages"><a href="{% url 'packages' build.pk %}">Packages</a></li>
<li class="nav-header">Performance</li>
<li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
<li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
<li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
<li id="menu-time"><a href="{% url 'buildtime' build.pk %}">Time</a></li>
<li id="menu-cpu-time"><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
<li id="menu-disk-io"><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
<li class="nav-header">Actions</li>
<li>
<li id="menu-download-build-log">
<a href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">
<span class="glyphicon glyphicon-download-alt"></span>
Download build log
@@ -151,7 +151,7 @@
{% with build.get_custom_image_recipes as custom_image_recipes %}
{% if custom_image_recipes.count > 0 %}
<!-- edit custom image built during this build -->
<li>
<li id="menu-edit-custom-image">
<a href="#" data-role="edit-custom-image-trigger">
<span class="glyphicon glyphicon-edit"></span>
Edit custom image
@@ -186,7 +186,7 @@
<!-- new custom image from image recipe in this build -->
{% if build.has_image_recipes %}
<li>
<li id="menu-new-custom-image">
<a href="#" data-role="new-custom-image-trigger">
<span class="glyphicon glyphicon-plus"></span>
New custom image
@@ -216,7 +216,7 @@
</script>
{% endif %}
<li>
<li id="menu-delete-build">
<a href="#delete-build-modal" id="delete-build" data-toggle="modal" data-target="#delete-build-modal" class="text-danger">
<span class="glyphicon glyphicon-trash"></span>
Delete build

View File

@@ -32,6 +32,7 @@ $(document).ready(function(){
<li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li>
<li><a href="{% url 'projectmachines' project.id %}">Machines</a></li>
<li><a href="{% url 'projectlayers' project.id %}">Layers</a></li>
<li><a href="{% url 'projectdistros' project.id %}">Distros</a></li>
<li class="nav-header">Extra configuration</li>
<li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li>

View File

@@ -0,0 +1,20 @@
<a href="{% url 'project' extra.pid %}?setDistro={{data.name}}" class="btn btn-default btn-block layer-exists-{{data.layer_version.id}}"
{% if data.layer_version.pk not in extra.current_layers %}
style="display:none;"
{% endif %}>
Set distro</a>
<a class="btn btn-default btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{
"id": {{data.layer_version.id}},
"name": "{{data.layer_version.layer.name}}",
"xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}",
"layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"
}' data-directive="add"
{% if data.layer_version.pk in extra.current_layers %}
style="display:none;"
{% endif %}
>
<span class="glyphicon glyphicon-plus"></span>
Add layer
<span class="glyphicon glyphicon-question-sign get-help" title="To select this distro, you must first add the {{data.layer_version.layer.name}} layer to your project"></i>
</a>

View File

@@ -0,0 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head><title>Toaster Health</title></head>
<body>Ok</body>
</html>

View File

@@ -64,7 +64,9 @@
</div>
<div data-build-state="<%:state%>">
<%if state == 'Parsing'%>
<%if state == 'Cloning'%>
<%include tmpl='#cloning-repos-build-template'/%>
<%else state == 'Parsing'%>
<%include tmpl='#parsing-recipes-build-template'/%>
<%else state == 'Queued'%>
<%include tmpl='#queued-build-template'/%>
@@ -98,6 +100,31 @@
</div>
</script>
<!-- cloning repos build -->
<script id="cloning-repos-build-template" type="text/x-jsrender">
<!-- progress bar and parse completion percentage -->
<div data-role="build-status" class="col-md-4 col-md-offset-1 progress-info">
<!-- progress bar -->
<div class="progress">
<div id="repos-cloned-percentage-bar-<%:id%>"
style="width: <%:repos_cloned_percentage%>%;"
class="progress-bar">
</div>
</div>
</div>
<div class="col-md-4 progress-info">
<!-- parse completion percentage -->
<span class="glyphicon glyphicon-question-sign get-help get-help-blue"
title="Toaster is cloning the repos required for your build">
</span>
Cloning <span id="repos-cloned-percentage-<%:id%>"><%:repos_cloned_percentage%></span>% complete
<%include tmpl='#cancel-template'/%>
</div>
</script>
<!-- parsing recipes build -->
<script id="parsing-recipes-build-template" type="text/x-jsrender">
<!-- progress bar and parse completion percentage -->

View File

@@ -77,6 +77,22 @@
</form>
</div>
<div class="well well-transparent" id="distro-section">
<h3>Distro</h3>
<p class="lead"><span id="project-distro-name"></span> <span class="glyphicon glyphicon-edit" id="change-distro-toggle"></span></p>
<form id="select-distro-form" style="display:none;" class="form-inline">
<span class="help-block">Distro suggestions come from the Layer Index</a></span>
<div class="form-group">
<input class="form-control" id="distro-change-input" autocomplete="off" value="" data-provide="typeahead" data-minlength="1" data-autocomplete="off" type="text">
</div>
<button id="distro-change-btn" class="btn btn-default" type="button">Save</button>
<a href="#" id="cancel-distro-change" class="btn btn-link">Cancel</a>
<p class="form-link"><a href="{% url 'projectdistros' project.id %}">View compatible distros</a></p>
</form>
</div>
<div class="well well-transparent">
<h3>Most built recipes</h3>

View File

@@ -100,6 +100,36 @@ class MachinesTypeAhead(ToasterTypeAhead):
return results
class DistrosTypeAhead(ToasterTypeAhead):
""" Typeahead for all the distros available in the current project's
configuration """
def __init__(self):
super(DistrosTypeAhead, self).__init__()
def apply_search(self, search_term, prj, request):
distros = prj.get_available_distros()
distros = distros.order_by("name")
primary_results = distros.filter(name__istartswith=search_term)
secondary_results = distros.filter(name__icontains=search_term).exclude(pk__in=primary_results)
tertiary_results = distros.filter(layer_version__layer__name__icontains=search_term).exclude(pk__in=primary_results).exclude(pk__in=secondary_results)
results = []
for distro in list(primary_results) + list(secondary_results) + list(tertiary_results):
detail = "[ %s ]" % (distro.layer_version.layer.name)
needed_fields = {
'id' : distro.pk,
'name' : distro.name,
'detail' : detail,
}
results.append(needed_fields)
return results
class RecipesTypeAhead(ToasterTypeAhead):
""" Typeahead for all the recipes available in the current project's
configuration """

View File

@@ -1,7 +1,7 @@
#
# BitBake Toaster Implementation
#
# Copyright (C) 2013 Intel Corporation
# Copyright (C) 2013-2017 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -25,49 +25,50 @@ from toastergui import buildtables
from toastergui import typeaheads
from toastergui import api
from toastergui import widgets
from toastergui import views
urlpatterns = patterns('toastergui.views',
urlpatterns = [
# landing page
url(r'^landing/$', 'landing', name='landing'),
url(r'^landing/$', views.landing, name='landing'),
url(r'^builds/$',
tables.AllBuildsTable.as_view(template_name="builds-toastertable.html"),
name='all-builds'),
# build info navigation
url(r'^build/(?P<build_id>\d+)$', 'builddashboard', name="builddashboard"),
url(r'^build/(?P<build_id>\d+)$', views.builddashboard, name="builddashboard"),
url(r'^build/(?P<build_id>\d+)/tasks/$',
buildtables.BuildTasksTable.as_view(
template_name="buildinfo-toastertable.html"),
name='tasks'),
url(r'^build/(?P<build_id>\d+)/task/(?P<task_id>\d+)$', 'task', name='task'),
url(r'^build/(?P<build_id>\d+)/task/(?P<task_id>\d+)$', views.task, name='task'),
url(r'^build/(?P<build_id>\d+)/recipes/$',
buildtables.BuiltRecipesTable.as_view(
template_name="buildinfo-toastertable.html"),
name='recipes'),
url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)/active_tab/(?P<active_tab>\d{1})$', 'recipe', name='recipe'),
url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)/active_tab/(?P<active_tab>\d{1})$', views.recipe, name='recipe'),
url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)$', 'recipe', name='recipe'),
url(r'^build/(?P<build_id>\d+)/recipe_packages/(?P<recipe_id>\d+)$', 'recipe_packages', name='recipe_packages'),
url(r'^build/(?P<build_id>\d+)/recipe/(?P<recipe_id>\d+)$', views.recipe, name='recipe'),
url(r'^build/(?P<build_id>\d+)/recipe_packages/(?P<recipe_id>\d+)$', views.recipe_packages, name='recipe_packages'),
url(r'^build/(?P<build_id>\d+)/packages/$',
buildtables.BuiltPackagesTable.as_view(
template_name="buildinfo-toastertable.html"),
name='packages'),
url(r'^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)$', 'package_built_detail',
url(r'^build/(?P<build_id>\d+)/package/(?P<package_id>\d+)$', views.package_built_detail,
name='package_built_detail'),
url(r'^build/(?P<build_id>\d+)/package_built_dependencies/(?P<package_id>\d+)$',
'package_built_dependencies', name='package_built_dependencies'),
views.package_built_dependencies, name='package_built_dependencies'),
url(r'^build/(?P<build_id>\d+)/package_included_detail/(?P<target_id>\d+)/(?P<package_id>\d+)$',
'package_included_detail', name='package_included_detail'),
views.package_included_detail, name='package_included_detail'),
url(r'^build/(?P<build_id>\d+)/package_included_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$',
'package_included_dependencies', name='package_included_dependencies'),
views.package_included_dependencies, name='package_included_dependencies'),
url(r'^build/(?P<build_id>\d+)/package_included_reverse_dependencies/(?P<target_id>\d+)/(?P<package_id>\d+)$',
'package_included_reverse_dependencies', name='package_included_reverse_dependencies'),
views.package_included_reverse_dependencies, name='package_included_reverse_dependencies'),
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$',
buildtables.InstalledPackagesTable.as_view(
@@ -75,11 +76,11 @@ urlpatterns = patterns('toastergui.views',
name='target'),
url(r'^dentries/build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$', 'xhr_dirinfo', name='dirinfo_ajax'),
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo$', 'dirinfo', name='dirinfo'),
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo_filepath/_(?P<file_path>(?:/[^/\n]+)*)$', 'dirinfo', name='dirinfo_filepath'),
url(r'^build/(?P<build_id>\d+)/configuration$', 'configuration', name='configuration'),
url(r'^build/(?P<build_id>\d+)/configvars$', 'configvars', name='configvars'),
url(r'^dentries/build/(?P<build_id>\d+)/target/(?P<target_id>\d+)$', views.xhr_dirinfo, name='dirinfo_ajax'),
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo$', views.dirinfo, name='dirinfo'),
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/dirinfo_filepath/_(?P<file_path>(?:/[^/\n]+)*)$', views.dirinfo, name='dirinfo_filepath'),
url(r'^build/(?P<build_id>\d+)/configuration$', views.configuration, name='configuration'),
url(r'^build/(?P<build_id>\d+)/configvars$', views.configvars, name='configvars'),
url(r'^build/(?P<build_id>\d+)/buildtime$',
buildtables.BuildTimeTable.as_view(
template_name="buildinfo-toastertable.html"),
@@ -97,26 +98,26 @@ urlpatterns = patterns('toastergui.views',
# image information dir
url(r'^build/(?P<build_id>\d+)/target/(?P<target_id>\d+)/packagefile/(?P<packagefile_id>\d+)$',
'image_information_dir', name='image_information_dir'),
views.image_information_dir, name='image_information_dir'),
# build download artifact
url(r'^build/(?P<build_id>\d+)/artifact/(?P<artifact_type>\w+)/id/(?P<artifact_id>\w+)', 'build_artifact', name="build_artifact"),
url(r'^build/(?P<build_id>\d+)/artifact/(?P<artifact_type>\w+)/id/(?P<artifact_id>\w+)', views.build_artifact, name="build_artifact"),
# project URLs
url(r'^newproject/$', 'newproject', name='newproject'),
url(r'^newproject/$', views.newproject, name='newproject'),
url(r'^projects/$',
tables.ProjectsTable.as_view(template_name="projects-toastertable.html"),
name='all-projects'),
url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
url(r'^project/(?P<pid>\d+)/$', views.project, name='project'),
url(r'^project/(?P<pid>\d+)/configuration$', views.projectconf, name='projectconf'),
url(r'^project/(?P<pid>\d+)/builds/$',
tables.ProjectBuildsTable.as_view(template_name="projectbuilds-toastertable.html"),
name='projectbuilds'),
# the import layer is a project-specific functionality;
url(r'^project/(?P<pid>\d+)/importlayer$', 'importlayer', name='importlayer'),
url(r'^project/(?P<pid>\d+)/importlayer$', views.importlayer, name='importlayer'),
# the table pages that have been converted to ToasterTable widget
url(r'^project/(?P<pid>\d+)/machines/$',
@@ -142,7 +143,7 @@ urlpatterns = patterns('toastergui.views',
name="projectlayers"),
url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$',
'layerdetails', name='layerdetails'),
views.layerdetails, name='layerdetails'),
url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)/recipes/$',
tables.LayerRecipesTable.as_view(template_name="generic-toastertable-page.html"),
@@ -157,6 +158,11 @@ urlpatterns = patterns('toastergui.views',
name=tables.LayerMachinesTable.__name__.lower()),
url(r'^project/(?P<pid>\d+)/distros/$',
tables.DistrosTable.as_view(template_name="generic-toastertable-page.html"),
name="projectdistros"),
url(r'^project/(?P<pid>\d+)/customrecipe/(?P<custrecipeid>\d+)/selectpackages/$',
tables.SelectPackagesTable.as_view(), name="recipeselectpackages"),
@@ -166,7 +172,7 @@ urlpatterns = patterns('toastergui.views',
name="customrecipe"),
url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipe_id>\d+)/download$',
'customrecipe_download',
views.customrecipe_download,
name="customrecipedownload"),
url(r'^project/(?P<pid>\d+)/recipe/(?P<recipe_id>\d+)$',
@@ -186,9 +192,12 @@ urlpatterns = patterns('toastergui.views',
typeaheads.GitRevisionTypeAhead.as_view(),
name='xhr_gitrevtypeahead'),
url(r'^xhr_testreleasechange/(?P<pid>\d+)$', 'xhr_testreleasechange',
url(r'^xhr_typeahead/(?P<pid>\d+)/distros$',
typeaheads.DistrosTypeAhead.as_view(), name='xhr_distrostypeahead'),
url(r'^xhr_testreleasechange/(?P<pid>\d+)$', views.xhr_testreleasechange,
name='xhr_testreleasechange'),
url(r'^xhr_configvaredit/(?P<pid>\d+)$', 'xhr_configvaredit',
url(r'^xhr_configvaredit/(?P<pid>\d+)$', views.xhr_configvaredit,
name='xhr_configvaredit'),
url(r'^xhr_layer/(?P<pid>\d+)/(?P<layerversion_id>\d+)$',
@@ -200,7 +209,7 @@ urlpatterns = patterns('toastergui.views',
name='xhr_layer'),
# JS Unit tests
url(r'^js-unit-tests/$', 'jsunittests', name='js-unit-tests'),
url(r'^js-unit-tests/$', views.jsunittests, name='js-unit-tests'),
# image customisation functionality
url(r'^xhr_customrecipe/(?P<recipe_id>\d+)'
@@ -235,6 +244,11 @@ urlpatterns = patterns('toastergui.views',
url(r'^mostrecentbuilds$', widgets.MostRecentBuildsView.as_view(),
name='most_recent_builds'),
# default redirection
# JSON data for aggregators
url(r'^api/builds$', views.json_builds, name='json_builds'),
url(r'^api/building$', views.json_building, name='json_building'),
url(r'^api/build/(?P<build_id>\d+)$', views.json_build, name='json_build'),
# default redirection
url(r'^$', RedirectView.as_view(url='landing', permanent=True)),
)
]

View File

@@ -35,7 +35,7 @@ from orm.models import BitbakeVersion, CustomImageRecipe
from django.core.urlresolvers import reverse, resolve
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponseNotFound
from django.http import HttpResponseNotFound, JsonResponse
from django.utils import timezone
from datetime import timedelta, datetime
from toastergui.templatetags.projecttags import json as jsonfilter
@@ -457,10 +457,15 @@ def builddashboard( request, build_id ):
npkg = 0
pkgsz = 0
package = None
for package in Package.objects.filter(id__in = [x.package_id for x in t.target_installed_package_set.all()]):
pkgsz = pkgsz + package.size
if package.installed_name:
npkg = npkg + 1
# Chunk the query to avoid "too many SQL variables" error
package_set = t.target_installed_package_set.all()
package_set_len = len(package_set)
for ps_start in range(0,package_set_len,500):
ps_stop = min(ps_start+500,package_set_len)
for package in Package.objects.filter(id__in = [x.package_id for x in package_set[ps_start:ps_stop]]):
pkgsz = pkgsz + package.size
if package.installed_name:
npkg = npkg + 1
elem['npkg'] = npkg
elem['pkgsz'] = pkgsz
ti = Target_Image_File.objects.filter(target_id = t.id)
@@ -1251,6 +1256,89 @@ def managedcontextprocessor(request):
}
return ret
# REST-based API calls to return build/building status to external Toaster
# managers and aggregators via JSON
def _json_build_status(build_id,extend):
build_stat = None
try:
build = Build.objects.get( pk = build_id )
build_stat = {}
build_stat['id'] = build.id
build_stat['name'] = build.build_name
build_stat['machine'] = build.machine
build_stat['distro'] = build.distro
build_stat['start'] = build.started_on
# look up target name
target= Target.objects.get( build = build )
if target:
if target.task:
build_stat['target'] = '%s:%s' % (target.target,target.task)
else:
build_stat['target'] = '%s' % (target.target)
else:
build_stat['target'] = ''
# look up project name
project = Project.objects.get( build = build )
if project:
build_stat['project'] = project.name
else:
build_stat['project'] = ''
if Build.IN_PROGRESS == build.outcome:
now = timezone.now()
timediff = now - build.started_on
build_stat['seconds']='%.3f' % timediff.total_seconds()
build_stat['clone']='%d:%d' % (build.repos_cloned,build.repos_to_clone)
build_stat['parse']='%d:%d' % (build.recipes_parsed,build.recipes_to_parse)
tf = Task.objects.filter(build = build)
tfc = tf.count()
if tfc > 0:
tfd = tf.exclude(order__isnull=True).count()
else:
tfd = 0
build_stat['task']='%d:%d' % (tfd,tfc)
else:
build_stat['outcome'] = build.get_outcome_text()
timediff = build.completed_on - build.started_on
build_stat['seconds']='%.3f' % timediff.total_seconds()
build_stat['stop'] = build.completed_on
messages = LogMessage.objects.all().filter(build = build)
errors = len(messages.filter(level=LogMessage.ERROR) |
messages.filter(level=LogMessage.EXCEPTION) |
messages.filter(level=LogMessage.CRITICAL))
build_stat['errors'] = errors
warnings = len(messages.filter(level=LogMessage.WARNING))
build_stat['warnings'] = warnings
if extend:
build_stat['cooker_log'] = build.cooker_log_path
except Exception as e:
build_state = str(e)
return build_stat
def json_builds(request):
build_table = []
builds = []
try:
builds = Build.objects.exclude(outcome=Build.IN_PROGRESS).order_by("-started_on")
for build in builds:
build_table.append(_json_build_status(build.id,False))
except Exception as e:
build_table = str(e)
return JsonResponse({'builds' : build_table, 'count' : len(builds)})
def json_building(request):
build_table = []
builds = []
try:
builds = Build.objects.filter(outcome=Build.IN_PROGRESS).order_by("-started_on")
for build in builds:
build_table.append(_json_build_status(build.id,False))
except Exception as e:
build_table = str(e)
return JsonResponse({'building' : build_table, 'count' : len(builds)})
def json_build(request,build_id):
return JsonResponse({'build' : _json_build_status(build_id,True)})
import toastermain.settings
@@ -1689,3 +1777,4 @@ if True:
return render(request, "unavailable_artifact.html")
except (ObjectDoesNotExist, IOError):
return render(request, "unavailable_artifact.html")

View File

@@ -511,6 +511,10 @@ class MostRecentBuildsView(View):
int((build_obj.recipes_parsed /
build_obj.recipes_to_parse) * 100)
build['repos_cloned_percentage'] = \
int((build_obj.repos_cloned /
build_obj.repos_to_clone) * 100)
tasks_complete_percentage = 0
if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):
tasks_complete_percentage = 100

View File

@@ -1,13 +1,13 @@
from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.base import BaseCommand, CommandError
from orm.models import Build
import os
class Command(NoArgsCommand):
class Command(BaseCommand):
args = ""
help = "Lists current builds"
def handle_noargs(self,**options):
def handle(self,**options):
for b in Build.objects.all():
print("%d: %s %s %s" % (b.pk, b.machine, b.distro, ",".join([x.target for x in b.target_set.all()])))

View File

@@ -24,7 +24,6 @@
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# Set to True to see the SQL queries in console
SQL_DEBUG = False
@@ -161,12 +160,47 @@ STATICFILES_FINDERS = (
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
class InvalidString(str):
def __mod__(self, other):
from django.template.base import TemplateSyntaxError
raise TemplateSyntaxError(
"Undefined variable or unknown value for: \"%s\"" % other)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
],
'OPTIONS': {
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
# list if you haven't customized them:
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
# Custom
'django.core.context_processors.request',
'toastergui.views.managedcontextprocessor',
],
'loaders': [
# List of callables that know how to import templates from various sources.
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
#'django.template.loaders.eggs.Loader',
],
'string_if_invalid': InvalidString("%s"),
'debug': DEBUG,
},
},
]
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
@@ -203,22 +237,6 @@ ROOT_URLCONF = 'toastermain.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'toastermain.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
TEMPLATE_CONTEXT_PROCESSORS = ('django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
"django.core.context_processors.request",
'toastergui.views.managedcontextprocessor',
)
INSTALLED_APPS = (
'django.contrib.auth',
@@ -348,10 +366,4 @@ connection_created.connect(activate_synchronous_off)
#
class InvalidString(str):
def __mod__(self, other):
from django.template.base import TemplateSyntaxError
raise TemplateSyntaxError(
"Undefined variable or unknown value for: \"%s\"" % other)
TEMPLATE_STRING_IF_INVALID = InvalidString("%s")

View File

@@ -20,8 +20,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.conf.urls import patterns, include, url
from django.views.generic import RedirectView
from django.views.generic import RedirectView, TemplateView
from django.views.decorators.cache import never_cache
import bldcollector.views
import logging
@@ -31,7 +32,7 @@ logger = logging.getLogger("toaster")
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
urlpatterns = [
# Examples:
# url(r'^toaster/', include('toaster.foo.urls')),
@@ -42,11 +43,13 @@ urlpatterns = patterns('',
# This is here to maintain backward compatibility and will be deprecated
# in the future.
url(r'^orm/eventfile$', 'bldcollector.views.eventfile'),
url(r'^orm/eventfile$', bldcollector.views.eventfile),
url(r'^health$', TemplateView.as_view(template_name="health.html"), name='Toaster Health'),
# if no application is selected, we have the magic toastergui app here
url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/', permanent=True))),
)
]
import toastermain.settings

View File

@@ -1,3 +1,3 @@
Django>1.8,<1.9
Django>1.8,<1.9.9
beautifulsoup4>=4.4.0
pytz

View File

@@ -88,6 +88,7 @@ ifeq ($(DOC),bsp-guide)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
TARFILES = bsp-style.css bsp-guide.html figures/bsp-title.png \
figures/bsp-dev-flow.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
FIGURES = figures
@@ -128,14 +129,8 @@ TARFILES = dev-style.css dev-manual.html \
figures/wip.png
else
TARFILES = dev-style.css dev-manual.html \
figures/bsp-dev-flow.png \
figures/dev-title.png figures/git-workflow.png \
figures/index-downloads.png figures/kernel-dev-flow.png \
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
figures/source-repos.png figures/yp-download.png \
figures/recipe-workflow.png \
figures/devtool-add-flow.png figures/devtool-modify-flow.png \
figures/devtool-upgrade-flow.png \
figures/dev-title.png \
figures/recipe-workflow.png figures/bitbake-build-flow.png \
eclipse
endif
@@ -148,7 +143,7 @@ endif
ifeq ($(DOC),yocto-project-qs)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
TARFILES = yocto-project-qs.html qs-style.css figures/yocto-environment.png \
TARFILES = yocto-project-qs.html qs-style.css \
figures/yocto-project-transp.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
@@ -196,7 +191,7 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/wip.png
else
TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/building-an-image.png \
figures/building-an-image.png figures/YP-flow-diagram.png \
figures/using-a-pre-built-image.png \
figures/poky-title.png figures/buildhistory.png \
figures/buildhistory-web.png \
@@ -206,7 +201,7 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/dev-title.png \
figures/git-workflow.png figures/index-downloads.png \
figures/kernel-dev-flow.png \
figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
figures/kernel-overview-2-generic.png \
figures/source-repos.png figures/yp-download.png \
figures/profile-title.png figures/kernelshark-all.png \
figures/kernelshark-choose-events.png \
@@ -244,13 +239,12 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \
figures/sdk-generation.png figures/recipe-workflow.png \
figures/build-workspace-directory.png figures/mega-title.png \
figures/toaster-title.png figures/hosted-service.png \
figures/simple-configuration.png figures/devtool-add-flow.png \
figures/devtool-modify-flow.png figures/devtool-upgrade-flow.png \
figures/simple-configuration.png \
figures/compatible-layers.png figures/import-layer.png figures/new-project.png \
figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
figures/sdk-devtool-add-flow.png figures/sdk-installed-extensible-sdk-directory.png \
figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \
figures/sdk-devtool-upgrade-flow.png
figures/sdk-devtool-upgrade-flow.png figures/bitbake-build-flow.png
endif
MANUALS = $(DOC)/$(DOC).html
@@ -262,7 +256,7 @@ endif
ifeq ($(DOC),ref-manual)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
TARFILES = ref-manual.html ref-style.css figures/poky-title.png figures/YP-flow-diagram.png \
figures/buildhistory.png figures/buildhistory-web.png eclipse \
figures/cross-development-toolchains.png figures/layer-input.png \
figures/package-feeds.png figures/source-input.png \
@@ -271,7 +265,8 @@ TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
figures/patching.png figures/configuration-compile-autoreconf.png \
figures/analysis-for-package-splitting.png figures/image-generation.png \
figures/sdk-generation.png figures/building-an-image.png \
figures/build-workspace-directory.png
figures/build-workspace-directory.png figures/source-repos.png \
figures/index-downloads.png figures/yp-download.png figures/git-workflow.png
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
FIGURES = figures
STYLESHEET = $(DOC)/*.css
@@ -330,8 +325,8 @@ ifeq ($(DOC),kernel-dev)
XSLTOPTS = --xinclude
ALLPREQ = html eclipse tarball
TARFILES = kernel-dev.html kernel-dev-style.css \
figures/kernel-dev-title.png \
figures/kernel-architecture-overview.png \
figures/kernel-dev-title.png figures/kernel-overview-2-generic \
figures/kernel-architecture-overview.png figures/kernel-dev-flow.png \
eclipse
MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
FIGURES = figures

View File

@@ -55,7 +55,7 @@
To help understand the BSP layer concept, consider the BSPs that the
Yocto Project supports and provides with each release.
You can see the layers in the
<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
through a web interface at
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
If you go to that interface, you will find near the bottom of the list
@@ -83,11 +83,11 @@
<para>
For information on the BSP development workflow, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</ulink>"
section in the Yocto Project Development Manual.
"<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>"
section.
For more information on how to set up a local copy of source files
from a Git repository, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
"<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
section also in the Yocto Project Development Manual.
</para>
@@ -98,7 +98,7 @@
This root is what you add to the
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
variable in the <filename>conf/bblayers.conf</filename> file found in the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
which is established after you run one of the OpenEmbedded build environment
setup scripts (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
@@ -417,7 +417,7 @@
released with the BSP.
The information in the <filename>README.sources</filename>
file also helps you find the
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
used to generate the images that ship with the BSP.
<note>
If the BSP's <filename>binary</filename> directory is
@@ -522,7 +522,7 @@
<para>
This file simply makes
<ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
aware of the recipes and configuration directories.
The file must exist so that the OpenEmbedded build system can recognize the BSP.
</para>
@@ -710,6 +710,220 @@
</section>
</section>
<section id='developing-a-board-support-package-bsp'>
<title>Developing a Board Support Package (BSP)</title>
<para>
This section contains the high-level procedure you can follow
to create a BSP using the Yocto Project's
<link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
Although not required for BSP creation, the
<filename>meta-intel</filename> repository, which contains
many BSPs supported by the Yocto Project, is part of the
example.
</para>
<para>
For an example that shows how to create a new layer using
the tools, see the
"<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>"
section.
</para>
<para>
The following illustration and list summarize the BSP
creation general workflow.
</para>
<para>
<imagedata fileref="figures/bsp-dev-flow.png" width="6in" depth="7in" align="center" scalefit="1" />
</para>
<para>
<orderedlist>
<listitem><para>
<emphasis>Set Up Your Host Development System to Support
Development Using the Yocto Project:</emphasis>
See the
"<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>"
and the
"<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>"
sections both in the Yocto Project Quick Start for
build host requirements.
</para></listitem>
<listitem><para>
<emphasis>Establish a Local Copy of the Project Files on
Your System:</emphasis>
You need this
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
available on your host system.
Having these files on your system gives you access to the
build process and to the tools you need.
For information on how to set up the Source Directory,
see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-yocto-project-source-files'>Working With Yocto Project Source Files</ulink>"
section in the Yocto Project Development Manual.
</para></listitem>
<listitem><para>
<emphasis>Establish the <filename>meta-intel</filename>
Repository on Your System:</emphasis>
Having local copies of these supported BSP layers on
your system gives you access to layers you might be able
to build on or modify to create your BSP.
For information on how to get these files, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-bsp-layers'>Setting Up BSP Layers</ulink>"
section in the Yocto Project Development Manual.
</para></listitem>
<listitem><para>
<emphasis>Create Your Own BSP Layer Using the
<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></link>
script:</emphasis>
Layers are ideal for isolating and storing work for a
given piece of hardware.
A layer is really just a location or area in which you
place the recipes and configurations for your BSP.
In fact, a BSP is, in itself, a special type of layer.
The simplest way to create a new BSP layer that is
compliant with the Yocto Project is to use the
<filename>yocto-bsp</filename> script.
For information about that script, see the
"<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</link>"
section.</para>
<para>Another example that illustrates a layer
is an application.
Suppose you are creating an application that has
library or other dependencies in order for it to
compile and run.
The layer, in this case, would be where all the
recipes that define those dependencies are kept.
The key point for a layer is that it is an isolated
area that contains all the relevant information for
the project that the OpenEmbedded build system knows
about.
For more information on layers, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
section in the Yocto Project Development Manual.
For more information on BSP layers, see the
"<link linkend='bsp-layers'>BSP Layers</link>"
section.
<note><title>Notes</title>
<para>Five BSPs exist that are part of the Yocto
Project release:
<filename>beaglebone</filename> (ARM),
<filename>mpc8315e</filename> (PowerPC),
and <filename>edgerouter</filename> (MIPS).
The recipes and configurations for these five BSPs
are located and dispersed within the
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
</para>
<para>Three core Intel BSPs exist as part of the Yocto
Project release in the
<filename>meta-intel</filename> layer:
<itemizedlist>
<listitem><para>
<filename>intel-core2-32</filename>,
which is a BSP optimized for the Core2 family of CPUs
as well as all CPUs prior to the Silvermont core.
</para></listitem>
<listitem><para>
<filename>intel-corei7-64</filename>,
which is a BSP optimized for Nehalem and later
Core and Xeon CPUs as well as Silvermont and later
Atom CPUs, such as the Baytrail SoCs.
</para></listitem>
<listitem><para>
<filename>intel-quark</filename>,
which is a BSP optimized for the Intel Galileo
gen1 &amp; gen2 development boards.
</para></listitem>
</itemizedlist></para>
</note></para>
<para>When you set up a layer for a new BSP, you should
follow a standard layout.
This layout is described in the
"<link linkend='bsp-filelayout'>Example Filesystem Layout</link>"
section.
In the standard layout, you will notice a suggested
structure for recipes and configuration information.
You can see the standard layout for a BSP by examining
any supported BSP found in the
<filename>meta-intel</filename> layer inside the Source
Directory.
</para></listitem>
<listitem><para>
<emphasis>Make Configuration Changes to Your New BSP
Layer:</emphasis>
The standard BSP layer structure organizes the files
you need to edit in <filename>conf</filename> and
several <filename>recipes-*</filename>
directories within the BSP layer.
Configuration changes identify where your new layer
is on the local system and identify which kernel you
are going to use.
When you run the <filename>yocto-bsp</filename> script,
you are able to interactively configure many things for
the BSP (e.g. keyboard, touchscreen, and so forth).
</para></listitem>
<listitem><para>
<emphasis>Make Recipe Changes to Your New BSP
Layer:</emphasis>
Recipe changes include altering recipes
(<filename>.bb</filename> files), removing recipes you
do not use, and adding new recipes or append files
(<filename>.bbappend</filename>) that you need to
support your hardware.
</para></listitem>
<listitem><para>
<emphasis>Prepare for the Build:</emphasis>
Once you have made all the changes to your BSP layer,
there remains a few things you need to do for the
OpenEmbedded build system in order for it to create
your image.
You need to get the build environment ready by
sourcing an environment setup script
(i.e. <filename>oe-init-build-env</filename> or
<filename>oe-init-build-env-memres</filename>)
and you need to be sure two key configuration
files are configured appropriately: the
<filename>conf/local.conf</filename> and the
<filename>conf/bblayers.conf</filename> file.
You must make the OpenEmbedded build system aware
of your new layer.
See the
"<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
section in the Yocto Project Development Manual
for information on how to let the build system
know about your new layer.</para>
<para>The entire process for building an image is
overviewed in the section
"<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>" section
of the Yocto Project Quick Start.
You might want to reference this information.
</para></listitem>
<listitem><para>
<emphasis>Build the Image:</emphasis>
The OpenEmbedded build system uses the BitBake tool
to build images based on the type of image you want to
create.
You can find more information about BitBake in the
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
</para>
<para>The build process supports several types of
images to satisfy different needs.
See the
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
chapter in the Yocto Project Reference Manual for
information on supported images.
</para></listitem>
</orderedlist>
</para>
</section>
<section id='requirements-and-recommendations-for-released-bsps'>
<title>Requirements and Recommendations for Released BSPs</title>
@@ -832,7 +1046,7 @@
This is the person to whom patches and questions should
be sent.
For information on how to find the right person, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
"<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
section in the Yocto Project Development Manual.
</para></listitem>
<listitem><para>Instructions on how to build the BSP using the BSP
@@ -1144,7 +1358,7 @@
<para>
Designed to have a command interface somewhat like
<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>, each
<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>, each
tool is structured as a set of sub-commands under a
top-level command.
The top-level command (<filename>yocto-bsp</filename>

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -5,101 +5,72 @@
<chapter id='dev-manual-intro'>
<title>The Yocto Project Development Manual</title>
<section id='dev-intro'>
<title>Introduction</title>
<section id='dev-welcome'>
<title>Welcome</title>
<para>
Welcome to the Yocto Project Development Manual!
This manual provides information on how to use the Yocto Project to
develop embedded Linux images and user-space applications that
run on targeted devices.
The manual provides an overview of image, kernel, and
user-space application development using the Yocto Project.
Because much of the information in this manual is general, it
contains many references to other sources where you can find more
detail.
For example, you can find detailed information on Git, repositories,
and open source in general in many places on the Internet.
Another example specific to the Yocto Project is how to quickly
set up your host development system and build an image, which you
find in the
<ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
This manual provides relevant procedures necessary for developing
in the Yocto Project environment (i.e. developing embedded Linux
images and user-space applications that run on targeted devices).
The manual groups related procedures into higher-level sections.
Procedures can consist of high-level steps or low-level steps
depending on the topic.
You can find conceptual information related to a procedure by
following appropriate links to the Yocto Project Reference
Manual.
</para>
<para>
The Yocto Project Development Manual does, however, provide
guidance and examples on how to change the kernel source code,
reconfigure the kernel, and develop an application using
<filename>devtool</filename>.
</para>
<note>
By default, using the Yocto Project creates a Poky distribution.
However, you can create your own distribution by providing key
<link linkend='metadata'>Metadata</link>.
A good example is Angstrom, which has had a distribution
based on the Yocto Project since its inception.
Other examples include commercial distributions like
<ulink url='https://www.yoctoproject.org/organization/wind-river-systems'>Wind River Linux</ulink>,
<ulink url='https://www.yoctoproject.org/organization/mentor-graphics'>Mentor Embedded Linux</ulink>,
<ulink url='https://www.yoctoproject.org/organization/enea-ab'>ENEA Linux</ulink>
and <ulink url='https://www.yoctoproject.org/ecosystem/member-organizations'>others</ulink>.
See the "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
section for more information.
</note>
</section>
<section id='what-this-manual-provides'>
<title>What This Manual Provides</title>
<para>
The following list describes what you can get from this manual:
<itemizedlist>
<listitem><para>Information that lets you get set
up to develop using the Yocto Project.</para></listitem>
<listitem><para>Information to help developers who are new to
the open source environment and to the distributed revision
control system Git, which the Yocto Project uses.
<listitem><para>
<emphasis>Setup Procedures:</emphasis>
Procedures that show you how to set
up a Yocto Project Development environment and how
to accomplish the change workflow through logging
defects and submitting changes.
</para></listitem>
<listitem><para>An understanding of common end-to-end
development models and tasks.</para></listitem>
<listitem><para>Information about common development tasks
generally used during image development for
embedded devices.
<listitem><para>
<emphasis>Emulation Procedures:</emphasis>
Procedures that show you how to use the
Yocto Project integrated QuickEMUlator (QEMU), which lets
you simulate running on hardware an image you have built
using the OpenEmbedded build system.
</para></listitem>
<listitem><para>Information on using the Yocto Project
integration of the QuickEMUlator (QEMU), which lets you
simulate running on hardware an image you have built using
the OpenEmbedded build system.
<listitem><para>
<emphasis>Common Procedures:</emphasis>
Procedures related to "everyday" tasks you perform while
developing images and applications using the Yocto
Project.
</para></listitem>
<listitem><para>Many references to other sources of related
information.</para></listitem>
</itemizedlist>
</para>
</section>
<section id='what-this-manual-does-not-provide'>
<title>What this Manual Does Not Provide</title>
<para>
This manual will not give you the following:
<itemizedlist>
<listitem><para><emphasis>Step-by-step instructions when those instructions exist in other Yocto
Project documentation:</emphasis>
<listitem><para>
<emphasis>Redundant Step-by-step Instructions:</emphasis>
For example, the
<ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
manual contains detailed instructions on how to install an
contains detailed instructions on how to install an
SDK, which is used to develop applications for target
hardware.
</para></listitem>
<listitem><para><emphasis>Reference material:</emphasis>
<listitem><para>
<emphasis>Reference or Conceptual Material:</emphasis>
This type of material resides in an appropriate reference manual.
For example, system variables are documented in the
<ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
</para></listitem>
<listitem><para><emphasis>Detailed public information that is not specific to the Yocto Project:</emphasis>
For example, exhaustive information on how to use Git is covered better through the
Internet than in this manual.
<listitem><para>
<emphasis>Detailed Public Information Not Specific to the
Yocto Project:</emphasis>
For example, exhaustive information on how to use the
Source Control Manager Git is better covered with Internet
searches and official Git Documentation than through the
Yocto Project documentation.
</para></listitem>
</itemizedlist>
</para>
@@ -112,10 +83,22 @@
Because this manual presents information for many different
topics, supplemental information is recommended for full
comprehension.
See the
For introductory information on the Yocto Project, see the
<ulink url='&YOCTO_HOME_URL;/ecosystem/yocto-project-backgrounders'>Yocto Project Backgrounders</ulink>
on the
<ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
You can find an introductory to using the Yocto Project by working
through the
<ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
</para>
<para>
For a comprehensive list of links and other documentation, see the
"<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
section in the Yocto Project Reference Manual for helpful
sources.
section in the Yocto Project Reference Manual.
</para>
<para>
</para>
</section>
</chapter>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6,427 +6,305 @@
<title>Using the Quick EMUlator (QEMU)</title>
<para>
Quick EMUlator (QEMU) is an Open Source project the Yocto Project uses
as part of its development "tool set".
As such, the information in this chapter is limited to the
Yocto Project integration of QEMU and not QEMU in general.
For official information and documentation on QEMU, see the
following references:
<itemizedlist>
<listitem><para><emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
The official website for the QEMU Open Source project.
</para></listitem>
<listitem><para><emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
The QEMU user manual.
</para></listitem>
</itemizedlist>
</para>
<para>
This chapter provides an overview of the Yocto Project's integration of
QEMU, a description of how you use QEMU and its various options, running
under a Network File System (NFS) server, and a few tips and tricks you
might find helpful when using QEMU.
</para>
<section id='qemu-overview'>
<title>Overview</title>
<para>
Within the context of the Yocto Project, QEMU is an
emulator and virtualization machine that allows you to run a complete
image you have built using the Yocto Project as just another task
on your build system.
QEMU is useful for running and testing images and applications on
supported Yocto Project architectures without having actual hardware.
Among other things, the Yocto Project uses QEMU to run automated
Quality Assurance (QA) tests on final images shipped with each
release.
This chapter provides procedures that show you how to use the
Quick EMUlator (QEMU), which is an Open Source project the Yocto
Project uses as part of its development "tool set".
For reference information on the Yocto Project implementation of QEMU,
see the
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-quick-emulator-qemu'>Quick EMUlator (QEMU)</ulink>"
section in the Yocto Project Reference Manual.
</para>
<para>
QEMU is made available with the Yocto Project a number of ways.
One method is to install a Software Development Kit (SDK).
For more information on how to make sure you have
QEMU available, see the
<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
</para>
</section>
<section id='qemu-running-qemu'>
<title>Running QEMU</title>
<para>
Running QEMU involves having your build environment set up, having the
right artifacts available, and understanding how to use the many
options that are available to you when you start QEMU using the
<filename>runqemu</filename> command.
</para>
<section id='qemu-setting-up-the-environment'>
<title>Setting Up the Environment</title>
<section id='qemu-running-qemu'>
<title>Running QEMU</title>
<para>
You run QEMU in the same environment from which you run BitBake.
This means you need to source a build environment script (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
or
<ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
</para>
</section>
To use QEMU, you need to have QEMU installed and initialized as
well as have the proper artifacts (i.e. image files and root
filesystems) available.
Follow these general steps to run QEMU:
<orderedlist>
<listitem><para>
<emphasis>Install QEMU:</emphasis>
See
"<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
section in the Yocto Project Software Development Kit (SDK)
Developer's Guide for information on how to install
QEMU.
</para></listitem>
<listitem><para>
<emphasis>Setting Up the Environment:</emphasis>
How you set up the QEMU environment depends on how you
installed QEMU:
<itemizedlist>
<listitem><para>
If you cloned the <filename>poky</filename>
repository or you downloaded and unpacked a
Yocto Project release tarball, you can source
the build environment script (i.e.
<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
or
<ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>):
<literallayout class='monospaced'>
$ cd ~/poky
$ source oe-init-build-env
</literallayout>
</para></listitem>
<listitem><para>
If you installed a cross-toolchain, you can
run the script that initializes the toolchain.
For example, the following commands run the
initialization script from the default
<filename>poky_sdk</filename> directory:
<literallayout class='monospaced'>
. ~/poky_sdk/environment-setup-core2-64-poky-linux
</literallayout>
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
<emphasis>Ensure the Artifacts are in Place:</emphasis>
You need to be sure you have a pre-built kernel that
will boot in QEMU.
You also need the target root filesystem for your target
machines architecture:
<itemizedlist>
<listitem><para>
If you have previously built an image for QEMU
(e.g. <filename>qemux86</filename>,
<filename>qemuarm</filename>, and so forth),
then the artifacts are in place in your
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
</para></listitem>
<listitem><para>
If you have not built an image, you can go to the
<ulink url='&YOCTO_MACHINES_DL_URL;'>machines/qemu</ulink>
area and download a pre-built image that matches
your architecture and can be run on QEMU.
</para></listitem>
</itemizedlist></para>
<section id='qemu-using-the-runqemu-command'>
<title>Using the <filename>runqemu</filename> Command</title>
<para>
The basic <filename>runqemu</filename> command syntax is as
follows:
<literallayout class='monospaced'>
<para>See the
"<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
section in the Yocto Project Software Development Kit (SDK)
Developer's Guide for information on how to extract a
root filesystem.
</para></listitem>
<listitem><para>
<emphasis>Run QEMU:</emphasis>
The basic <filename>runqemu</filename> command syntax is as
follows:
<literallayout class='monospaced'>
$ runqemu [<replaceable>option</replaceable> ] [...]
</literallayout>
Based on what you provide on the command line,
<filename>runqemu</filename> does a good job of figuring out what
you are trying to do.
For example, by default, QEMU looks for the most recently built
image according to the timestamp when it needs to look for an
image.
Minimally, through the use of options, you must provide either
a machine name, a virtual machine image
(<filename>*.vmdk</filename>), or a kernel image
(<filename>*.bin</filename>).
</para>
</literallayout>
Based on what you provide on the command line,
<filename>runqemu</filename> does a good job of figuring
out what you are trying to do.
For example, by default, QEMU looks for the most recently
built image according to the timestamp when it needs to
look for an image.
Minimally, through the use of options, you must provide
either a machine name, a virtual machine image
(<filename>*.vmdk</filename>), or a kernel image
(<filename>*.bin</filename>).</para>
<para>
Following is a description of <filename>runqemu</filename>
options you can provide on the command line:
<note><title>Tip</title>
If you do provide some "illegal" option combination or perhaps
you do not provide enough in the way of options,
<filename>runqemu</filename> provides appropriate error
messaging to help you correct the problem.
</note>
<itemizedlist>
<listitem><para><replaceable>QEMUARCH</replaceable>:
The QEMU machine architecture, which must be "qemux86",
"qemux86_64", "qemuarm", "qemumips", "qemumipsel",
“qemumips64", "qemush4", "qemuppc", "qemumicroblaze",
or "qemuzynq".
</para></listitem>
<listitem><para><filename><replaceable>VM</replaceable></filename>:
The virtual machine image, which must be a
<filename>.vmdk</filename> file.
Use this option when you want to boot a
<filename>.vmdk</filename> image.
The image filename you provide must contain one of the
following strings: "qemux86-64", "qemux86", "qemuarm",
"qemumips64", "qemumips", "qemuppc", or "qemush4".
</para></listitem>
<listitem><para><replaceable>ROOTFS</replaceable>:
A root filesystem that has one of the following
filetype extensions: "ext2", "ext3", "ext4", "jffs2",
"nfs", or "btrfs".
If the filename you provide for this option uses “nfs”, it
must provide an explicit root filesystem path.
</para></listitem>
<listitem><para><replaceable>KERNEL</replaceable>:
A kernel image, which is a <filename>.bin</filename> file.
When you provide a <filename>.bin</filename> file,
<filename>runqemu</filename> detects it and assumes the
file is a kernel image.
</para></listitem>
<listitem><para><replaceable>MACHINE</replaceable>:
The architecture of the QEMU machine, which must be one
of the following: "qemux86",
"qemux86-64", "qemuarm", "qemumips", "qemumipsel",
“qemumips64", "qemush4", "qemuppc", "qemumicroblaze",
or "qemuzynq".
The <replaceable>MACHINE</replaceable> and
<replaceable>QEMUARCH</replaceable> options are basically
identical.
If you do not provide a <replaceable>MACHINE</replaceable>
option, <filename>runqemu</filename> tries to determine
it based on other options.
</para></listitem>
<listitem><para><filename>ramfs</filename>:
Indicates you are booting an initial RAM disk (initramfs)
image, which means the <filename>FSTYPE</filename> is
<filename>cpio.gz</filename>.
</para></listitem>
<listitem><para><filename>iso</filename>:
Indicates you are booting an ISO image, which means the
<filename>FSTYPE</filename> is
<filename>.iso</filename>.
</para></listitem>
<listitem><para><filename>nographic</filename>:
Disables the video console, which sets the console to
"ttys0".
</para></listitem>
<listitem><para><filename>serial</filename>:
Enables a serial console on
<filename>/dev/ttyS0</filename>.
</para></listitem>
<listitem><para><filename>biosdir</filename>:
Establishes a custom directory for BIOS, VGA BIOS and
keymaps.
</para></listitem>
<listitem><para><filename>biosfilename</filename>:
Establishes a custom BIOS name.
</para></listitem>
<listitem><para><filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
Specifies custom QEMU parameters.
Use this option to pass options other than the simple
"kvm" and "serial" options.
</para></listitem>
<listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
Specifies custom boot parameters for the kernel.
</para></listitem>
<listitem><para><filename>audio</filename>:
Enables audio in QEMU.
The <replaceable>MACHINE</replaceable> option must be
either "qemux86" or "qemux86-64" in order for audio to be
enabled.
Additionally, the <filename>snd_intel8x0</filename>
or <filename>snd_ens1370</filename> driver must be
installed in linux guest.
</para></listitem>
<listitem><para><filename>slirp</filename>:
Enables "slirp" networking, which is a different way
of networking that does not need root access
but also is not as easy to use or comprehensive
as the default.
</para></listitem>
<listitem><para id='kvm-cond'><filename>kvm</filename>:
Enables KVM when running "qemux86" or "qemux86-64"
QEMU architectures.
For KVM to work, all the following conditions must be met:
<para>Here are some additional examples to help illustrate
further QEMU:
<itemizedlist>
<listitem><para>
Your <replaceable>MACHINE</replaceable> must be either
qemux86" or "qemux86-64".
This example starts QEMU with
<replaceable>MACHINE</replaceable> set to "qemux86".
Assuming a standard
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
<filename>runqemu</filename> automatically finds the
<filename>bzImage-qemux86.bin</filename> image file and
the
<filename>core-image-minimal-qemux86-20140707074611.rootfs.ext3</filename>
(assuming the current build created a
<filename>core-image-minimal</filename> image).
<note>
When more than one image with the same name exists, QEMU finds
and uses the most recently built image according to the
timestamp.
</note>
<literallayout class='monospaced'>
$ runqemu qemux86
</literallayout>
</para></listitem>
<listitem><para>
Your build host has to have the KVM modules
installed, which are
<filename>/dev/kvm</filename>.
</para></listitem>
<listitem><para>
The build host <filename>/dev/kvm</filename>
directory has to be both writable and readable.
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para><filename>kvm-vhost</filename>:
Enables KVM with VHOST support when running "qemux86" or "qemux86-64"
QEMU architectures.
For KVM with VHOST to work, the following conditions must
be met:
<itemizedlist>
<listitem><para>
<link linkend='kvm-cond'>kvm</link> option
conditions must be met.
</para></listitem>
<listitem><para>
Your build host has to have virtio net device, which
are <filename>/dev/vhost-net</filename>.
</para></listitem>
<listitem><para>
The build host <filename>/dev/vhost-net</filename>
directory has to be either readable or writable
and “slirp-enabled”.
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para><filename>publicvnc</filename>:
Enables a VNC server open to all hosts.
</para></listitem>
</itemizedlist>
</para>
<para>
For further understanding regarding option use with
<filename>runqemu</filename>, consider some examples.
</para>
<para>
This example starts QEMU with
<replaceable>MACHINE</replaceable> set to "qemux86".
Assuming a standard
<link linkend='build-directory'>Build Directory</link>,
<filename>runqemu</filename> automatically finds the
<filename>bzImage-qemux86.bin</filename> image file and
the
<filename>core-image-minimal-qemux86-20140707074611.rootfs.ext3</filename>
(assuming the current build created a
<filename>core-image-minimal</filename> image).
<note>
When more than one image with the same name exists, QEMU finds
and uses the most recently built image according to the
timestamp.
</note>
<literallayout class='monospaced'>
$ runqemu qemux86
</literallayout>
This example produces the exact same results as the
previous example.
This command, however, specifically provides the image
and root filesystem type.
<literallayout class='monospaced'>
This example produces the exact same results as the
previous example.
This command, however, specifically provides the image
and root filesystem type.
<literallayout class='monospaced'>
$ runqemu qemux86 core-image-minimal ext3
</literallayout>
This example specifies to boot an initial RAM disk image
and to enable audio in QEMU.
For this case, <filename>runqemu</filename> set the
internal variable <filename>FSTYPE</filename> to
"cpio.gz".
Also, for audio to be enabled, an appropriate driver must
be installed (see the previous description for the
<filename>audio</filename> option for more information).
<literallayout class='monospaced'>
</literallayout>
</para></listitem>
<listitem><para>
This example specifies to boot an initial RAM disk image
and to enable audio in QEMU.
For this case, <filename>runqemu</filename> set the
internal variable <filename>FSTYPE</filename> to
"cpio.gz".
Also, for audio to be enabled, an appropriate driver must
be installed (see the previous description for the
<filename>audio</filename> option for more information).
<literallayout class='monospaced'>
$ runqemu qemux86 ramfs audio
</literallayout>
This example does not provide enough information for
QEMU to launch.
While the command does provide a root filesystem type, it
must also minimally provide a
<replaceable>MACHINE</replaceable>,
<replaceable>KERNEL</replaceable>, or
<replaceable>VM</replaceable> option.
<literallayout class='monospaced'>
</literallayout>
</para></listitem>
<listitem><para>
This example does not provide enough information for
QEMU to launch.
While the command does provide a root filesystem type, it
must also minimally provide a
<replaceable>MACHINE</replaceable>,
<replaceable>KERNEL</replaceable>, or
<replaceable>VM</replaceable> option.
<literallayout class='monospaced'>
$ runqemu ext3
</literallayout>
This example specifies to boot a virtual machine image
(<filename>.vmdk</filename> file).
From the <filename>.vmdk</filename>,
<filename>runqemu</filename> determines the QEMU
architecture (<replaceable>MACHINE</replaceable>) to be
"qemux86" and the root filesystem type to be "vmdk".
<literallayout class='monospaced'>
</literallayout>
</para></listitem>
<listitem><para>
This example specifies to boot a virtual machine image
(<filename>.vmdk</filename> file).
From the <filename>.vmdk</filename>,
<filename>runqemu</filename> determines the QEMU
architecture (<replaceable>MACHINE</replaceable>) to be
"qemux86" and the root filesystem type to be "vmdk".
<literallayout class='monospaced'>
$ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86.vmdk
</literallayout>
</literallayout>
</para></listitem>
</itemizedlist>
</para></listitem>
</orderedlist>
</para>
</section>
</section>
<section id='qemu-running-under-a-network-file-system-nfs-server'>
<title>Running Under a Network File System (NFS) Server</title>
<para>
One method for running QEMU is to run it on an NFS server.
This is useful when you need to access the same file system from both
the build and the emulated system at the same time.
It is also worth noting that the system does not need root privileges
to run.
It uses a user space NFS server to avoid that.
This section describes how to set up for running QEMU using an NFS
server and then how you can start and stop the server.
</para>
<section id='qemu-setting-up-to-use-nfs'>
<title>Setting Up to Use NFS</title>
<section id='switching-between-consoles'>
<title>Switching Between Consoles</title>
<para>
Once you are able to run QEMU in your environment, you can use the
<filename>runqemu-extract-sdk</filename> script, which is located
in the <filename>scripts</filename> directory along with
<filename>runqemu</filename> script.
The <filename>runqemu-extract-sdk</filename> takes a root
file system tarball and extracts it into a location that you
specify.
Then, when you run <filename>runqemu</filename>, you can specify
the location that has the file system to pass it to QEMU.
Here is an example that takes a file system and extracts it to
a directory named <filename>test-nfs</filename>:
<literallayout class='monospaced'>
When booting or running QEMU, you can switch between
supported consoles by using
Ctrl+Alt+<replaceable>number</replaceable>.
For example, Ctrl+Alt+3 switches you to the serial console
as long as that console is enabled.
Being able to switch consoles is helpful, for example, if
the main QEMU console breaks for some reason.
<note>
Usually, "2" gets you to the main console and "3"
gets you to the serial console.
</note>
</para>
</section>
<section id='removing-the-splash-screen'>
<title>Removing the Splash Screen</title>
<para>
You can remove the splash screen when QEMU is booting by
using Alt+left.
Removing the splash screen allows you to see what is
happening in the background.
</para>
</section>
<section id='disabling-the-cursor-grab'>
<title>Disabling the Cursor Grab</title>
<para>
The default QEMU integration captures the cursor within the
main window.
It does this since standard mouse devices only provide
relative input and not absolute coordinates.
You then have to break out of the grab using the "Ctrl+Alt"
key combination.
However, the Yocto Project's integration of QEMU enables
the wacom USB touch pad driver by default to allow input
of absolute coordinates.
This default means that the mouse can enter and leave the
main window without the grab taking effect leading to a
better user experience.
</para>
</section>
<section id='qemu-running-under-a-network-file-system-nfs-server'>
<title>Running Under a Network File System (NFS) Server</title>
<para>
One method for running QEMU is to run it on an NFS server.
This is useful when you need to access the same file system
from both the build and the emulated system at the same time.
It is also worth noting that the system does not need root
privileges to run.
It uses a user space NFS server to avoid that.
Follow these steps to set up for running QEMU using an NFS
server.
<orderedlist>
<listitem><para>
<emphasis>Extract a Root Filesystem:</emphasis>
Once you are able to run QEMU in your environment, you can
use the <filename>runqemu-extract-sdk</filename> script,
which is located in the <filename>scripts</filename>
directory along with the <filename>runqemu</filename>
script.</para>
<para>The <filename>runqemu-extract-sdk</filename> takes a
root filesystem tarball and extracts it into a location
that you specify.
Here is an example that takes a file system and
extracts it to a directory named
<filename>test-nfs</filename>:
<literallayout class='monospaced'>
runqemu-extract-sdk ./tmp/deploy/images/qemux86/core-image-sato-qemux86.tar.bz2 test-nfs
</literallayout>
Once you have extracted the file system, you can run
<filename>runqemu</filename> normally with the additional
location of the file system.
You can then also make changes to the files within
<filename>./test-nfs</filename> and see those changes appear in the
image in real time.
Here is an example using the <filename>qemux86</filename> image:
<literallayout class='monospaced'>
</literallayout>
</para></listitem>
<listitem><para>
<emphasis>Start QEMU:</emphasis>
Once you have extracted the file system, you can run
<filename>runqemu</filename> normally with the additional
location of the file system.
You can then also make changes to the files within
<filename>./test-nfs</filename> and see those changes
appear in the image in real time.
Here is an example using the <filename>qemux86</filename>
image:
<literallayout class='monospaced'>
runqemu qemux86 ./test-nfs
</literallayout>
</para>
</section>
<section id='qemu-starting-and-stopping-nfs'>
<title>Starting and Stopping NFS</title>
<para>
You can manually start and stop the NFS share using these
commands:
<itemizedlist>
<listitem><para><emphasis><filename>start</filename>:</emphasis>
Starts the NFS share:
<literallayout class='monospaced'>
</literallayout>
</para></listitem>
</orderedlist>
<note>
<para>
Should you need to start, stop, or restart the NFS share,
you can use the following commands:
<itemizedlist>
<listitem><para>
The following command starts the NFS share:
<literallayout class='monospaced'>
runqemu-export-rootfs start <replaceable>file-system-location</replaceable>
</literallayout>
</para></listitem>
<listitem><para><emphasis><filename>stop</filename>:</emphasis>
Stops the NFS share:
<literallayout class='monospaced'>
runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
</literallayout>
</para></listitem>
<listitem><para><emphasis><filename>restart</filename>:</emphasis>
Restarts the NFS share:
<literallayout class='monospaced'>
</literallayout>
</para></listitem>
<listitem><para>
The following command stops the NFS share:
<literallayout class='monospaced'>
runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
</literallayout>
</para></listitem>
<listitem><para>
The following command restarts the NFS share:
<literallayout class='monospaced'>
runqemu-export-rootfs restart <replaceable>file-system-location</replaceable>
</literallayout>
</para></listitem>
</itemizedlist>
</literallayout>
</para></listitem>
</itemizedlist>
</para>
</note>
</para>
</section>
</section>
<section id='qemu-tips-and-tricks'>
<title>Tips and Tricks</title>
<para>
The following list describes things you can do to make running QEMU
in the context of the Yocto Project a better experience:
<itemizedlist>
<listitem><para><emphasis>Switching Between Consoles:</emphasis>
When booting or running QEMU, you can switch between
supported consoles by using
Ctrl+Alt+<replaceable>number</replaceable>.
For example, Ctrl+Alt+3 switches you to the serial console as
long as that console is enabled.
Being able to switch consoles is helpful, for example, if the
main QEMU console breaks for some reason.
<note>
Usually, "2" gets you to the main console and "3" gets you
to the serial console.
</note>
</para></listitem>
<listitem><para><emphasis>Removing the Splash Screen:</emphasis>
You can remove the splash screen when QEMU is booting by
using Alt+left.
Removing the splash screen allows you to see what is happening
in the background.
</para></listitem>
<listitem><para><emphasis>Disabling the Cursor Grab:</emphasis>
The default QEMU integration captures the cursor within the
main window.
It does this since standard mouse devices only provide relative
input and not absolute coordinates.
You then have to break out of the grab using the "Ctrl+Alt" key
combination.
However, the Yocto Project's integration of QEMU enables the
wacom USB touch pad driver by default to allow input of absolute
coordinates.
This default means that the mouse can enter and leave the
main window without the grab taking effect leading to a better
user experience.
</para></listitem>
</itemizedlist>
</para>
</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@
<author>
<firstname>Scott</firstname> <surname>Rifenbark</surname>
<affiliation>
<orgname>Intel Corporation</orgname>
<orgname>Scotty's Documentation Services, Inc.</orgname>
</affiliation>
<email>srifenbark@gmail.com</email>
</author>
@@ -152,8 +152,6 @@
<xi:include href="dev-manual-newbie.xml"/>
<xi:include href="dev-manual-model.xml"/>
<xi:include href="dev-manual-common-tasks.xml"/>
<xi:include href="dev-manual-qemu.xml"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -11,7 +11,7 @@
<para>
In addition to supporting configuration fragments and patches, the
Yocto Project kernel tools also support rich
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> that you can
<ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> that you can
use to define complex policies and Board Support Package (BSP) support.
The purpose of the Metadata and the tools that manage it, known as
the kern-tools (<filename>kern-tools-native_git.bb</filename>), is
@@ -48,7 +48,7 @@
This variable is typically set to the same value as the
<ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
variable, which is used by
<ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
<ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>.
However, in some cases, the variable might instead refer to the
underlying platform of the <filename>MACHINE</filename>.
</para>
@@ -658,7 +658,7 @@
Consider the Minnow BSP definition from the
<filename>linux-yocto-4.4</filename> in the
Yocto Project
<ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
(i.e.
<filename>yocto-kernel-cache/bsp/minnow</filename>):
<literallayout class='monospaced'>

View File

@@ -26,7 +26,7 @@
that you create and prepare your own layer in which to do your
work.
Your layer contains its own
<ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
append files
(<filename>.bbappend</filename>) and provides a convenient
mechanism to create your own recipe files
@@ -759,7 +759,7 @@
working with your own sources.
When you use your own sources, you will not be able to
leverage the existing kernel
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> and
<ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> and
stabilization work of the linux-yocto sources.
However, you will be able to manage your own Metadata in the same
format as the linux-yocto sources.

View File

@@ -7,245 +7,464 @@
<section id='kernel-big-picture'>
<title>Yocto Project Kernel Development and Maintenance</title>
<para>
Kernels available through the Yocto Project, like other kernels, are based off the Linux
kernel releases from <ulink url='http://www.kernel.org'></ulink>.
At the beginning of a major development cycle, the Yocto Project team
chooses its kernel based on factors such as release timing, the anticipated release
timing of final upstream <filename>kernel.org</filename> versions, and Yocto Project
Kernels available through the Yocto Project (Linux Yocto kernels),
like other kernels, are based off the Linux kernel releases from
<ulink url='http://www.kernel.org'></ulink>.
At the beginning of a major Linux kernel development cycle, the
Yocto Project team chooses a Linux kernel based on factors such as
release timing, the anticipated release timing of final upstream
<filename>kernel.org</filename> versions, and Yocto Project
feature requirements.
Typically, the kernel chosen is in the
final stages of development by the community.
In other words, the kernel is in the release
candidate or "rc" phase and not yet a final release.
But, by being in the final stages of external development, the team knows that the
<filename>kernel.org</filename> final release will clearly be within the early stages of
the Yocto Project development window.
Typically, the Linux kernel chosen is in the final stages of
development by the Linux community.
In other words, the Linux kernel is in the release candidate
or "rc" phase and has yet to reach final release.
But, by being in the final stages of external development, the
team knows that the <filename>kernel.org</filename> final release
will clearly be within the early stages of the Yocto Project
development window.
</para>
<para>
This balance allows the team to deliver the most up-to-date kernel
possible, while still ensuring that the team has a stable official release for
the baseline Linux kernel version.
This balance allows the Yocto Project team to deliver the most
up-to-date Linux Yocto kernel possible, while still ensuring that
the team has a stable official release for the baseline Linux
kernel version.
</para>
<para>
The ultimate source for kernels available through the Yocto Project are released kernels
from <filename>kernel.org</filename>.
In addition to a foundational kernel from <filename>kernel.org</filename>, the
kernels available contain a mix of important new mainline
developments, non-mainline developments (when there is no alternative),
Board Support Package (BSP) developments,
and custom features.
These additions result in a commercially released Yocto Project Linux kernel that caters
to specific embedded designer needs for targeted hardware.
As implied earlier, the ultimate source for Linux Yocto kernels
are released kernels from <filename>kernel.org</filename>.
In addition to a foundational kernel from
<filename>kernel.org</filename>, the available Yocto Linux kernels
contain a mix of important new mainline developments, non-mainline
developments (when there is no alternative), Board Support Package
(BSP) developments, and custom features.
These additions result in a commercially released Yocto
Project Linux kernel that caters to specific embedded designer
needs for targeted hardware.
</para>
<para>
Once a kernel is officially released, the Yocto Project team goes into
their next development cycle, or upward revision (uprev) cycle, while still
continuing maintenance on the released kernel.
You can find a web interface to the Yocto Linux kernels in the
<ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
at
<ulink url='&YOCTO_GIT_URL;'></ulink>.
If you look at the interface, you will see to the left a
grouping of Git repositories titled "Yocto Linux Kernel".
Within this group, you will find several Linux Yocto kernels
developed and included with Yocto Project releases:
<itemizedlist>
<listitem><para>
<emphasis><filename>linux-yocto-4.1</filename>:</emphasis>
The stable Yocto Project kernel to use with the Yocto
Project Release 2.0.
This kernel is based on the Linux 4.1 released kernel.
</para></listitem>
<listitem><para>
<emphasis><filename>linux-yocto-4.4</filename>:</emphasis>
The stable Yocto Project kernel to use with the Yocto
Project Release 2.1.
This kernel is based on the Linux 4.4 released kernel.
</para></listitem>
<listitem><para>
<emphasis><filename>linux-yocto-4.9</filename>:</emphasis>
The stable Yocto Project kernel to use with the Yocto
Project Release 2.3.
This kernel is based on the Linux 4.9 released kernel.
</para></listitem>
<listitem><para>
<emphasis><filename>linux-yocto-4.10</filename>:</emphasis>
The default stable Yocto Project kernel to use with the
Yocto Project Release 2.3.
This kernel is based on the Linux 4.10 released kernel.
</para></listitem>
<listitem><para>
<emphasis><filename>linux-yocto-dev</filename>:</emphasis>
A development kernel based on the latest upstream release
candidate available.
</para></listitem>
</itemizedlist>
<note><title>Notes</title>
Long Term Support Initiative (LTSI) for Yocto Linux
kernels is as follows:
<itemizedlist>
<listitem><para>
For Yocto Project releases 1.7, 1.8, and 2.0,
the LTSI kernel is
<filename>linux-yocto-3.14</filename>.
</para></listitem>
<listitem><para>
For Yocto Project releases 2.1, 2.2, and 2.3,
the LTSI kernel is <filename>linux-yocto-4.1</filename>.
</para></listitem>
<listitem><para>
<filename>linux-yocto-4.1</filename>,
<filename>linux-yocto-4.4</filename>, and
<filename>linux-yocto-4.9</filename> are all LTS
kernels.
</para></listitem>
</itemizedlist>
</note>
</para>
<para>
Once a Yocto Linux kernel is officially released, the Yocto
Project team goes into their next development cycle, or upward
revision (uprev) cycle, while still continuing maintenance on the
released kernel.
It is important to note that the most sustainable and stable way
to include feature development upstream is through a kernel uprev process.
Back-porting hundreds of individual fixes and minor features from various
kernel versions is not sustainable and can easily compromise quality.
to include feature development upstream is through a kernel uprev
process.
Back-porting hundreds of individual fixes and minor features from
various kernel versions is not sustainable and can easily
compromise quality.
</para>
<para>
During the uprev cycle, the Yocto Project team uses an ongoing analysis of
kernel development, BSP support, and release timing to select the best
possible <filename>kernel.org</filename> version.
The team continually monitors community kernel
development to look for significant features of interest.
The team does consider back-porting large features if they have a significant advantage.
User or community demand can also trigger a back-port or creation of new
functionality in the Yocto Project baseline kernel during the uprev cycle.
During the uprev cycle, the Yocto Project team uses an ongoing
analysis of Linux kernel development, BSP support, and release
timing to select the best possible <filename>kernel.org</filename>
Linux kernel version on which to base subsequent Yocto Linux
kernel development.
The team continually monitors Linux community kernel development
to look for significant features of interest.
The team does consider back-porting large features if they have a
significant advantage.
User or community demand can also trigger a back-port or creation
of new functionality in the Yocto Project baseline kernel during
the uprev cycle.
</para>
<para>
Generally speaking, every new kernel both adds features and introduces new bugs.
These consequences are the basic properties of upstream kernel development and are
managed by the Yocto Project team's kernel strategy.
It is the Yocto Project team's policy to not back-port minor features to the released kernel.
They only consider back-porting significant technological jumps - and, that is done
after a complete gap analysis.
The reason for this policy is that back-porting any small to medium sized change
from an evolving kernel can easily create mismatches, incompatibilities and very
subtle errors.
Generally speaking, every new Linux kernel both adds features and
introduces new bugs.
These consequences are the basic properties of upstream
Linux kernel development and are managed by the Yocto Project
team's Linux Yocto kernel development strategy.
It is the Yocto Project team's policy to not back-port minor
features to the released Linux Yocto kernel.
They only consider back-porting significant technological
jumps &dash; and, that is done after a complete gap analysis.
The reason for this policy is that back-porting any small to
medium sized change from an evolving Linux kernel can easily
create mismatches, incompatibilities and very subtle errors.
</para>
<para>
These policies result in both a stable and a cutting
edge kernel that mixes forward ports of existing features and significant and critical
new functionality.
Forward porting functionality in the kernels available through the Yocto Project kernel
can be thought of as a "micro uprev."
The many “micro uprevs” produce a kernel version with a mix of
important new mainline, non-mainline, BSP developments and feature integrations.
This kernel gives insight into new features and allows focused
amounts of testing to be done on the kernel, which prevents
surprises when selecting the next major uprev.
The quality of these cutting edge kernels is evolving and the kernels are used in leading edge
feature and BSP development.
The policies described in this section result in both a stable
and a cutting edge Linux Yocto kernel that mixes forward ports of
existing Linux kernel features and significant and critical new
functionality.
Forward porting Linux kernel functionality into the Linux Yocto
kernels available through the Yocto Project can be thought of as
a "micro uprev."
The many “micro uprevs” produce a Linux Yocto kernel version with
a mix of important new mainline, non-mainline, BSP developments
and feature integrations.
This Yocto Linux kernel gives insight into new features and
allows focused amounts of testing to be done on the kernel,
which prevents surprises when selecting the next major uprev.
The quality of these cutting edge Linux Yocto kernels is evolving
and the kernels are used in leading edge feature and BSP
development.
</para>
</section>
<section id='kernel-architecture'>
<title>Kernel Architecture</title>
<section id='yocto-linux-kernel-architecture-and-branching-strategies'>
<title>Yocto Linux Kernel Architecture and Branching Strategies</title>
<para>
This section describes the architecture of the kernels available through the
Yocto Project and provides information
on the mechanisms used to achieve that architecture.
As mentioned earlier, a key goal of the Yocto Project is
to present the developer with a kernel that has a clear and
continuous history that is visible to the user.
The architecture and mechanisms, in particular the branching
strategies, used achieve that goal in a manner similar to
upstream Linux kernel development in
<filename>kernel.org</filename>.
</para>
<section id='architecture-overview'>
<title>Overview</title>
<para>
As mentioned earlier, a key goal of the Yocto Project is to present the
developer with
a kernel that has a clear and continuous history that is visible to the user.
The architecture and mechanisms used achieve that goal in a manner similar to the
upstream <filename>kernel.org</filename>.
</para>
<para>
You can think of a Yocto Project kernel as consisting of a baseline Linux kernel with
added features logically structured on top of the baseline.
The features are tagged and organized by way of a branching strategy implemented by the
source code manager (SCM) Git.
For information on Git as applied to the Yocto Project, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>" section in the
Yocto Project Development Manual.
</para>
<para>
The result is that the user has the ability to see the added features and
the commits that make up those features.
In addition to being able to see added features, the user can also view the history of what
made up the baseline kernel.
</para>
<para>
The following illustration shows the conceptual Yocto Project kernel.
</para>
<para>
<imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
</para>
<para>
In the illustration, the "Kernel.org Branch Point"
marks the specific spot (or release) from
which the Yocto Project kernel is created.
From this point "up" in the tree, features and differences are organized and tagged.
</para>
<para>
The "Yocto Project Baseline Kernel" contains functionality that is common to every kernel
type and BSP that is organized further up the tree.
Placing these common features in the
tree this way means features do not have to be duplicated along individual branches of the
structure.
</para>
<para>
From the Yocto Project Baseline Kernel, branch points represent specific functionality
for individual BSPs as well as real-time kernels.
The illustration represents this through three BSP-specific branches and a real-time
kernel branch.
Each branch represents some unique functionality for the BSP or a real-time kernel.
</para>
<para>
In this example structure, the real-time kernel branch has common features for all
real-time kernels and contains
more branches for individual BSP-specific real-time kernels.
The illustration shows three branches as an example.
Each branch points the way to specific, unique features for a respective real-time
kernel as they apply to a given BSP.
</para>
<para>
The resulting tree structure presents a clear path of markers (or branches) to the
developer that, for all practical purposes, is the kernel needed for any given set
of requirements.
</para>
</section>
<para>
You can think of a Yocto Linux kernel as consisting of a
baseline Linux kernel with added features logically structured
on top of the baseline.
The features are tagged and organized by way of a branching
strategy implemented by the Yocto Project team using the
Source Code Manager (SCM) Git.
<note><title>Notes</title>
<itemizedlist>
<listitem><para>
Git is the obvious SCM for meeting the Yocto Linux
kernel organizational and structural goals
described in this section.
Not only is Git the SCM for Linux kernel
development in <filename>kernel.org</filename> but,
Git continues to grow in popularity and supports
many different work flows, front-ends and
management techniques.
</para></listitem>
<listitem><para>
You can find documentation on Git at
<ulink url='http://git-scm.com/documentation'></ulink>.
You can also get an introduction to Git as it
applies to the Yocto Project in the
"<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>"
section in the Yocto Project Reference Manual.
The latter reference provides an overview of
Git and presents a minimal set of Git commands
that allows you to be functional using Git.
You can use as much, or as little, of what Git
has to offer to accomplish what you need for your
project.
You do not have to be a "Git Expert" in order to
use it with the Yocto Project.
</para></listitem>
</itemizedlist>
</note>
</para>
<section id='branching-and-workflow'>
<title>Branching Strategy and Workflow</title>
<para>
The Yocto Project team creates kernel branches at points where functionality is
no longer shared and thus, needs to be isolated.
For example, board-specific incompatibilities would require different functionality
and would require a branch to separate the features.
Likewise, for specific kernel features, the same branching strategy is used.
</para>
<para>
This branching strategy results in a tree that has features organized to be specific
for particular functionality, single kernel types, or a subset of kernel types.
This strategy also results in not having to store the same feature twice
internally in the tree.
Rather, the kernel team stores the unique differences required to apply the
feature onto the kernel type in question.
<note>
The Yocto Project team strives to place features in the tree such that they can be
shared by all boards and kernel types where possible.
However, during development cycles or when large features are merged,
the team cannot always follow this practice.
In those cases, the team uses isolated branches to merge features.
</note>
</para>
<para>
BSP-specific code additions are handled in a similar manner to kernel-specific additions.
Some BSPs only make sense given certain kernel types.
So, for these types, the team creates branches off the end of that kernel type for all
of the BSPs that are supported on that kernel type.
From the perspective of the tools that create the BSP branch, the BSP is really no
different than a feature.
Consequently, the same branching strategy applies to BSPs as it does to features.
So again, rather than store the BSP twice, the team only stores the unique
differences for the BSP across the supported multiple kernels.
</para>
<para>
While this strategy can result in a tree with a significant number of branches, it is
important to realize that from the developer's point of view, there is a linear
path that travels from the baseline <filename>kernel.org</filename>, through a select
group of features and ends with their BSP-specific commits.
In other words, the divisions of the kernel are transparent and are not relevant
to the developer on a day-to-day basis.
From the developer's perspective, this path is the "master" branch.
The developer does not need to be aware of the existence of any other branches at all.
Of course, there is value in the existence of these branches
in the tree, should a person decide to explore them.
For example, a comparison between two BSPs at either the commit level or at the line-by-line
code <filename>diff</filename> level is now a trivial operation.
</para>
<para>
Working with the kernel as a structured tree follows recognized community best practices.
In particular, the kernel as shipped with the product, should be
considered an "upstream source" and viewed as a series of
historical and documented modifications (commits).
These modifications represent the development and stabilization done
by the Yocto Project kernel development team.
</para>
<para>
Because commits only change at significant release points in the product life cycle,
developers can work on a branch created
from the last relevant commit in the shipped Yocto Project kernel.
As mentioned previously, the structure is transparent to the developer
because the kernel tree is left in this state after cloning and building the kernel.
</para>
</section>
<para>
Using Git's tagging and branching features, the Yocto Project
team creates kernel branches at points where functionality is
no longer shared and thus, needs to be isolated.
For example, board-specific incompatibilities would require
different functionality and would require a branch to
separate the features.
Likewise, for specific kernel features, the same branching
strategy is used.
</para>
<section id='source-code-manager-git'>
<title>Source Code Manager - Git</title>
<para>
The Source Code Manager (SCM) is Git.
This SCM is the obvious mechanism for meeting the previously mentioned goals.
Not only is it the SCM for <filename>kernel.org</filename> but,
Git continues to grow in popularity and supports many different work flows,
front-ends and management techniques.
</para>
<para>
You can find documentation on Git at <ulink url='http://git-scm.com/documentation'></ulink>.
You can also get an introduction to Git as it applies to the Yocto Project in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>"
section in the Yocto Project Development Manual.
These referenced sections overview Git and describe a minimal set of
commands that allows you to be functional using Git.
<note>
You can use as much, or as little, of what Git has to offer to accomplish what
you need for your project.
You do not have to be a "Git Master" in order to use it with the Yocto Project.
</note>
</para>
</section>
<para>
This "tree-like" architecture results in a tree that has
features organized to be specific for particular
functionality, single kernel types, or a subset of kernel
types.
Thus, the user has the ability to see the added
features and the commits that make up those features.
In addition to being able to see added features, the user
can also view the history of what made up the baseline
Linux kernel.
</para>
<para>
Another consequence of this strategy results in not having to
store the same feature twice internally in the tree.
Rather, the kernel team stores the unique differences required
to apply the feature onto the kernel type in question.
<note>
The Yocto Project team strives to place features in the tree
such that features can be shared by all boards and kernel
types where possible.
However, during development cycles or when large features
are merged, the team cannot always follow this practice.
In those cases, the team uses isolated branches to merge
features.
</note>
</para>
<para>
BSP-specific code additions are handled in a similar manner to
kernel-specific additions.
Some BSPs only make sense given certain kernel types.
So, for these types, the team creates branches off the end
of that kernel type for all of the BSPs that are supported on
that kernel type.
From the perspective of the tools that create the BSP branch,
the BSP is really no different than a feature.
Consequently, the same branching strategy applies to BSPs as
it does to kernel features.
So again, rather than store the BSP twice, the team only
stores the unique differences for the BSP across the supported
multiple kernels.
</para>
<para>
While this strategy can result in a tree with a significant number
of branches, it is important to realize that from the developer's
point of view, there is a linear path that travels from the
baseline <filename>kernel.org</filename>, through a select
group of features and ends with their BSP-specific commits.
In other words, the divisions of the kernel are transparent and
are not relevant to the developer on a day-to-day basis.
From the developer's perspective, this path is the "master" branch
in Git terms.
The developer does not need to be aware of the existence of any
other branches at all.
Of course, value exists in the having these branches in the tree,
should a person decide to explore them.
For example, a comparison between two BSPs at either the commit
level or at the line-by-line code <filename>diff</filename> level
is now a trivial operation.
</para>
<para>
The following illustration shows the conceptual Yocto
Linux kernel.
<imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
</para>
<para>
In the illustration, the "Kernel.org Branch Point" marks the
specific spot (or Linux kernel release) from which the
Yocto Linux kernel is created.
From this point forward in the tree, features and differences
are organized and tagged.
</para>
<para>
The "Yocto Project Baseline Kernel" contains functionality that
is common to every kernel type and BSP that is organized
further along in the tree.
Placing these common features in the tree this way means
features do not have to be duplicated along individual
branches of the tree structure.
</para>
<para>
From the "Yocto Project Baseline Kernel", branch points represent
specific functionality for individual Board Support Packages
(BSPs) as well as real-time kernels.
The illustration represents this through three BSP-specific
branches and a real-time kernel branch.
Each branch represents some unique functionality for the BSP
or for a real-time Yocto Linux kernel.
</para>
<para>
In this example structure, the "Real-time (rt) Kernel" branch has
common features for all real-time Yocto Linux kernels and
contains more branches for individual BSP-specific real-time
kernels.
The illustration shows three branches as an example.
Each branch points the way to specific, unique features for a
respective real-time kernel as they apply to a given BSP.
</para>
<para>
The resulting tree structure presents a clear path of markers
(or branches) to the developer that, for all practical
purposes, is the Yocto Linux kernel needed for any given set of
requirements.
<note>
Keep in mind the figure does not take into account all the
supported Yocto Linux kernels, but rather shows a single
generic kernel just for conceptual purposes.
Also keep in mind that this structure represents the Yocto
Project
<ulink url='&YOCTO_DOCS_REF_URL;#source-repositories'>Source Repositories</ulink>
that are either pulled from during the build or established
on the host development system prior to the build by either
cloning a particular kernel's Git repository or by
downloading and unpacking a tarball.
</note>
</para>
<para>
Working with the kernel as a structured tree follows recognized
community best practices.
In particular, the kernel as shipped with the product, should be
considered an "upstream source" and viewed as a series of
historical and documented modifications (commits).
These modifications represent the development and stabilization
done by the Yocto Project kernel development team.
</para>
<para>
Because commits only change at significant release points in the
product life cycle, developers can work on a branch created
from the last relevant commit in the shipped Yocto Project kernel.
As mentioned previously, the structure is transparent to the
developer because the kernel tree is left in this state after
cloning and building the kernel.
</para>
</section>
<section id='kernel-build-file-hierarchy'>
<title>Kernel Build File Hierarchy</title>
<para>
Upstream storage of all the available kernel source code is
one thing, while representing and using the code on your host
development system is another.
Conceptually, you can think of the kernel source repositories
as all the source files necessary for all the supported
Yocto Linux kernels.
As a developer, you are just interested in the source files
for the kernel on which you are working.
And, furthermore, you need them available on your host system.
</para>
<para>
Kernel source code is available on your host system several
different ways:
<itemizedlist>
<listitem><para>
<emphasis>Files Accessed While using <filename>devtool</filename>:</emphasis>
<filename>devtool</filename>, which is available with the
Yocto Project, is the preferred method by which to
modify the kernel.
See the
"<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
section.
</para></listitem>
<listitem><para>
<emphasis>Cloned Repository:</emphasis>
If you are working in the kernel all the time, you probably
would want to set up your own local Git repository of the
Yocto Linux kernel tree.
For information on how to clone a Yocto Linux kernel
Git repository, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Setting Up to Work On a Kernel</ulink>"
section in the Yocto Project Development Manual.
</para></listitem>
<listitem><para>
<emphasis>Temporary Source Files from a Build:</emphasis>
If you just need to make some patches to the kernel using
a traditional BitBake workflow (i.e. not using the
<filename>devtool</filename>), you can access temporary
kernel source files that were extracted and used during
a kernel build.
</para></listitem>
</itemizedlist>
</para>
<para>
The temporary kernel source files resulting from a build using
BitBake have a particular hierarchy.
When you build the kernel on your development system, all files
needed for the build are taken from the source repositories
pointed to by the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
variable and gathered in a temporary work area where they are
subsequently used to create the unique kernel.
Thus, in a sense, the process constructs a local source tree
specific to your kernel from which to generate the new kernel
image.
</para>
<para>
The following figure shows the temporary file structure
created on your host system when you build the kernel using
Bitbake.
This
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
contains all the source files used during the build.
<imagedata fileref="figures/kernel-overview-2-generic.png"
width="6in" depth="5in" align="center" scale="100" />
</para>
<para>
Again, for additional information on the Yocto Project kernel's
architecture and its branching strategy, see the
"<link linkend='yocto-linux-kernel-architecture-and-branching-strategies'>Yocto Linux Kernel Architecture and Branching Strategies</link>"
section.
You can also reference the
"<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"
section in the Yocto Project Development Manual for a detailed
example that modifies the kernel.
</para>
</section>
</appendix>
<!--

View File

@@ -241,8 +241,8 @@
You can find Git documentation at
<ulink url='http://git-scm.com/documentation'></ulink>.
You can find a simple overview of using Git with the Yocto Project in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>"
section of the Yocto Project Development Manual.
"<ulink url='&YOCTO_DOCS_REF_URL;#git'>Git</ulink>"
section of the Yocto Project Reference Manual.
</para>
<section id='change-inspection-kernel-changes-commits'>
@@ -693,8 +693,8 @@
The messages used to commit changes are a large part of these standards.
Consequently, be sure that the headers for each commit have the required information.
For information on how to follow the Yocto Project commit message standards, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a
Change</ulink>" section in the Yocto Project Development Manual.
"<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
section in the Yocto Project Development Manual.
</para>
<para>

View File

@@ -5,144 +5,282 @@
<chapter id='kernel-dev-intro'>
<title>Introduction</title>
<!--
<para>
<emphasis>AR - Darren Hart:</emphasis> See if the concepts in these
three bullets are adequately covered in somewhere in this manual:
<itemizedlist>
<listitem><para>Do we convey that our kernel Git repositories
have a clear and continuous history, similar to the way the
kernel Git repositories for <filename>kernel.org</filename>
do.
</para></listitem>
<listitem><para>Does the manual note that Yocto Project delivers
a key set of supported kernel types, where
each type is tailored to meet a specific use (e.g. networking,
consumer, devices, and so forth).</para></listitem>
<listitem><para>Do we convey that the Yocto Project uses a
Git branching strategy that, from a
developer's point of view, results in a linear path from the
baseline kernel.org, through a select group of features and
ends with their BSP-specific commits.</para></listitem>
</itemizedlist>
</para>
-->
<section id='kernel-dev-overview'>
<title>Overview</title>
<section id='kernel-dev-overview'>
<title>Overview</title>
<para>
Regardless of how you intend to make use of the Yocto Project,
chances are you will work with the Linux kernel.
This manual introduces the kernel development process and
provides background information on the Yocto Linux kernel
<ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
describes common tasks you can perform using the kernel tools,
and shows you how to use the kernel Metadata needed to work with
the kernel inside the Yocto Project.
</para>
<para>
Regardless of how you intend to make use of the Yocto Project,
chances are you will work with the Linux kernel.
This manual provides background information on the Yocto Linux kernel
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
describes common tasks you can perform using the kernel tools,
and shows you how to use the kernel Metadata needed to work with
the kernel inside the Yocto Project.
</para>
<para>
Each Yocto Project release has a set of Yocto Linux kernel recipes,
whose Git repositories you can view in the Yocto
<ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> under
the "Yocto Linux Kernel" heading.
New recipes for the release track the latest Linux kernel
upstream developments from
<ulink url='http://www.kernel.org'></ulink> and introduce
newly-supported platforms.
Previous recipes in the release are refreshed and supported for at
least one additional Yocto Project release.
As they align, these previous releases are updated to include the
latest from the
<ulink url='&YOCTO_HOME_URL;/organization/long-term-support-initiative-ltsi'>Long Term Support Initiative</ulink>
(LTSI) project.
Also included is a Yocto Linux kernel development recipe
(<filename>linux-yocto-dev.bb</filename>) should you want to work
with the very latest in upstream Yocto Linux kernel development and
kernel Metadata development.
<note>
For more on Yocto Linux kernels, see the
"<link linkend='kernel-big-picture'>Yocto Project Kernel Development and Maintenance</link>
section.
</note>
</para>
<para>
Each Yocto Project release has a set of linux-yocto recipes, whose
Git repositories you can view in the Yocto
<ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> under
the "Yocto Linux Kernel" heading.
New recipes for the release track the latest upstream developments
and introduce newly-supported platforms.
Previous recipes in the release are refreshed and supported for at
least one additional release.
As they align, these previous releases are updated to include the
latest from the
<ulink url='&YOCTO_HOME_URL;/organization/long-term-support-initiative-ltsi'>Long Term Support Initiative</ulink>
(LTSI) project.
Also included is a linux-yocto development recipe
(<filename>linux-yocto-dev.bb</filename>) should you want to work
with the very latest in upstream Linux kernel development and
kernel Metadata development.
</para>
<para>
The Yocto Project also provides a powerful set of kernel
tools for managing Yocto Linux kernel sources and configuration data.
You can use these tools to make a single configuration change,
apply multiple patches, or work with your own kernel sources.
</para>
<para>
The Yocto Project also provides a powerful set of kernel
tools for managing Linux kernel sources and configuration data.
You can use these tools to make a single configuration change,
apply multiple patches, or work with your own kernel sources.
</para>
<para>
In particular, the kernel tools allow you to generate configuration
fragments that specify only what you must, and nothing more.
Configuration fragments only need to contain the highest level
visible <filename>CONFIG</filename> options as presented by the
Yocto Linux kernel <filename>menuconfig</filename> system.
Contrast this against a complete Yocto Linux kernel
<filename>.config</filename> file, which includes all the automatically
selected <filename>CONFIG</filename> options.
This efficiency reduces your maintenance effort and allows you
to further separate your configuration in ways that make sense for
your project.
A common split separates policy and hardware.
For example, all your kernels might support the
<filename>proc</filename> and <filename>sys</filename> filesystems,
but only specific boards require sound, USB, or specific drivers.
Specifying these configurations individually allows you to aggregate
them together as needed, but maintains them in only one place.
Similar logic applies to separating source changes.
</para>
<para>
In particular, the kernel tools allow you to generate configuration
fragments that specify only what you must, and nothing more.
Configuration fragments only need to contain the highest level
visible <filename>CONFIG</filename> options as presented by the Linux
kernel <filename>menuconfig</filename> system.
Contrast this against a complete Linux kernel
<filename>.config</filename>, which includes all the automatically
selected <filename>CONFIG</filename> options.
This efficiency reduces your maintenance effort and allows you
to further separate your configuration in ways that make sense for
your project.
A common split separates policy and hardware.
For example, all your kernels might support
the <filename>proc</filename> and <filename>sys</filename> filesystems,
but only specific boards require sound, USB, or specific drivers.
Specifying these configurations individually allows you to aggregate
them together as needed, but maintains them in only one place.
Similar logic applies to separating source changes.
</para>
<para>
If you do not maintain your own kernel sources and need to make
only minimal changes to the sources, the released recipes provide a
vetted base upon which to layer your changes.
Doing so allows you to benefit from the continual kernel
integration and testing performed during development of the
Yocto Project.
</para>
<para>
If you do not maintain your own kernel sources and need to make
only minimal changes to the sources, the released recipes provide a
vetted base upon which to layer your changes.
Doing so allows you to benefit from the continual kernel
integration and testing performed during development of the
Yocto Project.
</para>
<para>
If, instead, you have a very specific Linux kernel source tree
and are unable to align with one of the official Yocto Linux kernel
recipes, an alternative exists by which you can use the Yocto
Project Linux kernel tools with your own kernel sources.
</para>
</section>
<para>
If, instead, you have a very specific Linux kernel source tree
and are unable to align with one of the official linux-yocto
recipes, an alternative exists by which you can use the Yocto
Project Linux kernel tools with your own kernel sources.
</para>
</section>
<section id='kernel-modification-workflow'>
<title>Kernel Modification Workflow</title>
<section id='kernel-dev-other-resources'>
<title>Other Resources</title>
<para>
Kernel modification involves changing the Yocto Project kernel,
which could involve changing configuration options as well as adding
new kernel recipes.
Configuration changes can be added in the form of configuration
fragments, while recipe modification comes through the kernel's
<filename>recipes-kernel</filename> area in a kernel layer you create.
</para>
<para>
The sections that follow provide instructions for completing
specific Linux kernel development tasks.
These instructions assume you are comfortable working with
<ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink>
recipes and basic open-source development tools.
Understanding these concepts will facilitate the process of working
with the kernel recipes.
If you find you need some additional background, please be sure to
review and understand the following documentation:
<itemizedlist>
<listitem><para><ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
</para></listitem>
<listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-modifying-source-code'>Modifying Source Code</ulink>"
section in the Yocto Project Development Manual
</para></listitem>
<listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" section
in the Yocto Project Development Manual</para></listitem>
<listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#modifying-the-kernel'>Modifying the Kernel</ulink>" section
in the Yocto Project Development Manual.</para></listitem>
</itemizedlist>
</para>
<para>
This section presents a high-level overview of the Yocto Project
kernel modification workflow.
You can find additional information here:
<itemizedlist>
<listitem><para>
"<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"
in the Yocto Project Development Manual.
</para></listitem>
<listitem><para>
"<ulink url='&YOCTO_DOCS_DEV_URL;#configuring-the-kernel'>Configuring the Kernel</ulink>"
in the Yocto Project Development Manual.
</para></listitem>
</itemizedlist>
This illustration and the following list summarizes the kernel
modification general workflow.
<imagedata fileref="figures/kernel-dev-flow.png"
width="6in" depth="5in" align="center" scalefit="1" />
</para>
<para>
<orderedlist>
<listitem><para>
<emphasis>Set up Your Host Development System to Support
Development Using the Yocto Project</emphasis>:
See
"<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>"
and
"<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Build Host Packages</ulink>"
sections both in the Yocto Project Quick Start for
requirements.
</para></listitem>
<listitem><para>
<emphasis>Clone the <filename>poky</filename> Repository</emphasis>:
Having the
<ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
on your system gives you access to the build process and tools
you need.
For information on how to get these files, see the
"<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
section in the Yocto Project Development Manual.
</para></listitem>
<listitem><para>
<emphasis>Establish the Temporary Kernel Source Files</emphasis>:
Temporary kernel source files are kept in the
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
created by the OpenEmbedded build system when you run BitBake.
If you have never built the kernel in which you are
interested, you need to run an initial build to
establish local kernel source files.</para>
<para>If you are building an image for the first time, you
need to get the build environment ready by sourcing an
environment setup script
(i.e. <filename>oe-init-build-env</filename> or
<filename>oe-init-build-env-memres</filename>).
You also need to be sure two key configuration files
(<filename>local.conf</filename> and
<filename>bblayers.conf</filename>) are configured
appropriately.</para>
<para>The entire process for building an image is overviewed
in the
"<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
section of the Yocto Project Quick Start.
You might want to reference this information.
You can find more information on BitBake in the
<ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
</para>
<para>The build process supports several types of images to
satisfy different needs.
See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
chapter in the Yocto Project Reference Manual for information
on supported images.
</para></listitem>
<listitem><para>
<emphasis>Make Changes to the Kernel Source Code if
applicable</emphasis>:
Modifying the kernel does not always mean directly
changing source files.
However, if you have to do this, you make the changes to the
files in the Build Directory.
</para></listitem>
<listitem><para>
<emphasis>Make Kernel Configuration Changes if
Applicable</emphasis>:
If your situation calls for changing the kernel's
configuration, you can use
<link linkend='generating-configuration-files'><filename>menuconfig</filename></link>,
which allows you to interactively develop and test the
configuration changes you are making to the kernel.
Saving changes you make with <filename>menuconfig</filename>
updates the kernel's <filename>.config</filename> file.
<note><title>Warning</title>
Try to resist the temptation to directly edit an
existing <filename>.config</filename> file, which is
found in the Build Directory among the source code
used for the build (e.g. see the workflow illustration
in the
"<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
section).
Doing so, can produce unexpected results when the
OpenEmbedded build system regenerates the configuration
file.
</note>
Once you are satisfied with the configuration
changes made using <filename>menuconfig</filename>
and you have saved them, you can directly compare the
resulting <filename>.config</filename> file against an
existing original and gather those changes into a
<ulink url='&YOCTO_DOCS_DEV_URL;#creating-config-fragments'>configuration fragment file</ulink>
to be referenced from within the kernel's
<filename>.bbappend</filename> file.</para>
<para>Additionally, if you are working in a BSP layer
and need to modify the BSP's kernel's configuration,
you can use the
<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'><filename>yocto-kernel</filename></ulink>
script as well as <filename>menuconfig</filename>.
The <filename>yocto-kernel</filename> script lets
you interactively set up kernel configurations.
</para></listitem>
<listitem><para>
<emphasis>Rebuild the Kernel Image With Your Changes</emphasis>:
Rebuilding the kernel image applies your changes.
</para></listitem>
</orderedlist>
</para>
</section>
<section id='kernel-dev-other-resources'>
<title>Other Resources</title>
<para>
The remainder of this manual provides instructions for completing
specific Linux kernel development tasks.
These instructions assume you are comfortable working with
<ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink>
recipes and basic open-source development tools.
Understanding these concepts will facilitate the process of working
with the kernel recipes.
If you find you need some additional background, please be sure to
review and understand the following documentation:
<itemizedlist>
<listitem><para>
<ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
</para></listitem>
<listitem><para>
<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
as described in the Yocto Project Software Development Kit
(SDK) Developer's Guide.
</para></listitem>
<listitem><para>
The
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" section
in the Yocto Project Development Manual
</para></listitem>
<listitem><para>
The
"<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
section.
</para></listitem>
</itemizedlist>
</para>
<para>
Finally, while this document focuses on the manual creation of
recipes, patches, and configuration files, the Yocto Project
Board Support Package (BSP) tools are available to automate
this process with existing content and work well to create the
initial framework and boilerplate code.
For details on these tools, see the
"<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
section in the Yocto Project Board Support Package (BSP) Developer's
Guide.
</para>
</section>
<para>
Finally, while this document focuses on the manual creation of
recipes, patches, and configuration files, the Yocto Project
Board Support Package (BSP) tools are available to automate
this process with existing content and work well to create the
initial framework and boilerplate code.
For details on these tools, see the
"<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
section in the Yocto Project Board Support Package (BSP) Developer's
Guide.
</para>
</section>
</chapter>
<!--
vim: expandtab tw=80 ts=4

View File

@@ -209,7 +209,7 @@
The files include the final <filename>.config</filename> file, all the <filename>.o</filename>
files, the <filename>.a</filename> files, and so forth.
Since each machine or BSP has its own separate
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
<ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
in its own separate branch
of the Git repository, you can easily switch between different builds.
</para>

View File

@@ -730,6 +730,10 @@ div.navfooter {
border-color: black;
}
.writernotes {
color: red;
}
/*********** /
/ graphics /

View File

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

View File

@@ -130,8 +130,6 @@
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-start.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-newbie.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-model.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-common-tasks.xml"/>
<xi:include
@@ -214,7 +212,7 @@
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/usingpoky.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/closer-look.xml"/>
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-development-environment.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/technical-details.xml"/>

View File

@@ -731,6 +731,11 @@ div.navfooter {
}
.writernotes {
color: red;
}
/*********** /
/ graphics /
/ ***********/

View File

@@ -3,6 +3,9 @@
<!ENTITY DISTRO_NAME_NO_CAP "tbd">
<!ENTITY DISTRO_NAME "Tbd">
<!ENTITY YOCTO_DOC_VERSION "2.4">
<!ENTITY DISTRO_REL_TAG "yocto-2.4">
<!ENTITY METAINTELVERSION "8.0">
<!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-tbd-&YOCTO_DOC_VERSION;">
<!ENTITY POKYVERSION "19.0.0">
<!ENTITY POKYVERSION_COMPRESSED "1900">
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;">
@@ -66,7 +69,7 @@
<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python3 unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum socat \
python3-pexpect findutils which file cpio python python3-pip xz which">
python3-pexpect findutils which file cpio python python3-pip xz">
<!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget python-xml \
diffstat makeinfo python-curses patch socat python3 python3-curses tar python3-pip \
python3-pexpect xz which">
@@ -74,5 +77,5 @@
$ sudo yum makecache
$ sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \
perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python34-pip xz \
perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python3-pip xz \
which">

View File

@@ -17,7 +17,7 @@
refers to the specific reference build system that
the Yocto Project provides.
Poky is based on <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink>
and <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
and <link linkend='bitbake-term'>BitBake</link>.
Thus, the generic term used here for the build system is
the "OpenEmbedded build system."
Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
@@ -416,7 +416,7 @@
<para>
You can find more information on licensing in the
"<ulink url='&YOCTO_DOCS_DEV_URL;#licensing'>Licensing</ulink>"
"<ulink url='&YOCTO_DOCS_REF_URL;#licensing'>Licensing</ulink>"
and "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
sections, both of which are in the Yocto Project Development
Manual.
@@ -702,7 +702,8 @@
<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
or
<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
By default, this
<link linkend='build-directory'>Build Directory</link>
is named <filename>build</filename> but can be named
anything you want.
</para>
@@ -765,7 +766,7 @@
<para>
Meanwhile, <filename>DESTDIR</filename> is a path within the
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
<link linkend='build-directory'>Build Directory</link>.
However, when the recipe builds a native program (i.e. one
that is intended to run on the build machine), that program
is never installed directly to the build machine's root
@@ -810,7 +811,7 @@
<para>
This situation results when a build system does
not recognize the environment variables supplied to it by
<ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
<link linkend='bitbake-term'>BitBake</link>.
The incident that prompted this FAQ entry involved a Makefile
that used an environment variable named
<filename>BINDIR</filename> instead of the more standard

Some files were not shown because too many files have changed in this diff Show More