Compare commits

..

244 Commits

Author SHA1 Message Date
Richard Purdie
bd933a3f29 buildtools/uninative-tarball: Fix deployment overlap issues
We still have problems where deploying SDKMACHINE=i686 can cause removal
of SDKMACHINE=x86_64 artefacts.

The reason is that x86_64 is a BUILD_ARCH as well as an SDK_ARCH and
the manifest namespaces overlap. To fix this, set PACKAGE_ARCH and
the stamp-extra-into to include SDK_OS. SDK_OS may not be entirely correct
but it is what sstate.bbclass uses for nativesdk and fixing that is
a separate issue.

This is confirmed to resolve artefact problems on the AB which have been
delaying a new uninative release.

(From OE-Core rev: 1dbc6ec4ca061570d2482c9abebcf720298db9b7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 18:06:08 +01:00
Richard Purdie
b75ed251a3 toolchain-shar-relocate.sh: Fix typo
(From OE-Core rev: 8d6ee36493800a30e9bd6eacb671fbafe5d61ad7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 18:06:08 +01:00
Scott Rifenbark
cea1d78f1f sdk-manual: Removed two Git tag developer notes.
These notes can't be in the final version of the manual.
Now is the time to get them out.

(From yocto-docs rev: 600b4f2c7360b30d12fdc7ed0f5ba41bc09fc778)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
394b909174 sdk-manual: Removed notes about the BitBake Commander
Fixes [YOCTO #10032]

The fix to remove the BitBake Commander from the tools to install
when dealing with the Eclipse Yocto Plug-in has happened.
Consequently, I removed the developer notes in the manual stating
that the Commander was still showing up there.  The manual set
is now clean of this stuff.

(From yocto-docs rev: fbe169b086faac571de8a2ebd9d32682162cfd31)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
0ac7b1e9df sdk-manual: Updated Passing host options example
Fixes [YOCTO #10267]

The example works better using OECORE_TARGET_SYSROOT for the
aclocal line.  I changed it to that.

(From yocto-docs rev: 362b786e7bf2083c5809e961f61c0ad81b778d71)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
ad1ba190df ref-manual: Updates to PKGDESTWORK and do_packagedata
Fixes [YOCTO #10248]

Provided more accurate descriptions for this variable and task.

(From yocto-docs rev: 422fa705165748230470fffc4fcc543ee38b1f2e)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
5ec03cd359 dev-manual: Updated add and modify flows and text.
Updated the devtool add and devtool modify flow diagrams and
supporting text to exactly match those from the SDK manual.

Also, updated the help output generated from the devtool --help
and devtool add --help commands.

(From yocto-docs rev: 002297a8ed3979f012fe228b7edb77514e7528a2)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
0c823cce36 sdk-manual: Updates to the devtool Finish command flow.
(From yocto-docs rev: f980b7cfa021c3777acd8e26b00cf40ed58f10f4)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
7d208c1c77 ref-manual: Applied review edits to auto added runtime deps
Fixes [YOCTO #10248]

Applied some review changes.  Minor wording tweaks and typo
fixes.

(From yocto-docs rev: a9e99c8b44c48c74448487187cebfe8df331e9e1)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
aba386b92c sdk-manual: Updated SDK workflow
A new command devtool finish has superceded the final commands
in the SDK workflow.  I updated the two figures (add and modify)
to reflect this new flow.  I also updated the ordered number list
to match reality.

(From yocto-docs rev: 0ba31e730cd748d06eab8d46b38764cda5c4e3bd)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
6cecded9ef sdk-manual, ref-manual: New variable for including toolchain
Added a new variable description for SDK_INCLUDE_TOOLCHAIN.
Along with the new glossary entry, I updated a couple places
where it would be relevant to cross-reference the new variable.

(From yocto-docs rev: df99b097595e7488a93354082b8d9f33acd9c229)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
4824bb4fda ref-manual: Added note to PREFERRED_VERSION
fixes [YOCTO #10252]

Added a note to help avoid confusion regarding the version
specification used in PREFERRED_VERSION.

(From yocto-docs rev: 38edc25b04c1a6d673ceb25f5548898d5b63b120)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
8bc6c1c2c8 ref-manual: New section and updates for runtime dep work
fixes [YOCTO #10248]

The bulk of this change is a new section called "Automatically
Added Runtime Dependencies".  Additionally, changes were made
to the RDEPENDS and DEPENDS variables. Some cross-referencing
to the new material was also added in the do_package task entry,
the do_packagedata task entry, the PKGDATA_DIR glossary entry,
and the PRIVATE_LIBS glossary entry.

(From yocto-docs rev: 16504cd0eb23e102322c6c6096c5b52500a04640)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
899ea9cb48 ref-manual: Another edit to the oe-pkgdata-utils description
Fixed the description to match that what is in the code.

(From yocto-docs rev: c099dd0b7c8d205b56009606e61ae359017f5783)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:34 +01:00
Scott Rifenbark
b247baeff2 ref-manual: More wording changes to oe-pkgdata-util section.
(From yocto-docs rev: 63f412dd31ae05dd0abdcc2b97b1c596b6054f18)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
79cb2ed033 ref-manual: Applied some re-writes to oe-pkgdata-util use section.
(From yocto-docs rev: 40175a3e120fd57fcd03fdfd19c84ffd8336595d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
7267910323 sdk-manual: Updated the connection steps for deployment
Provided clearer instruction on how to set up a new SSH
connection when deploying an application to QEMU.

(From yocto-docs rev: 93adc542a40e86377380684e1ce294edd0fd7268)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
8c2172b8be ref-manual: New section on using oe-pkgdata-util
Fixes [YOCTO #10216]

Creted a new section titled "Viewing Package Information with
oe-pkgdata-util".  This section describes how to view information
for already build packages through the use of the
oi-pkgdata-util command.

(From yocto-docs rev: 8d9465f320f973ecaeecb3eae594b29c0d7f4960)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
43b5d140c6 sdk-manual: Fixed spelling error.
(From yocto-docs rev: 46794f1c852a12375764d80c7242312921d8bd20)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
72d1435f20 documentation: Added new description for the PACKAGECONFIG_CONFARGS variable.
Fixes [YOCTO #10183]

Added a new variable entry for the PACKAGECONFIG_CONFARGS variable.

With the introduction of the new PACKAGECONFIG_CONFARGS variable,
many places in the mainstream YP documentation that referenced
how to pass configure arguments using EXTRA_OECONF needed to also
make mention of this new variable.  I added many cross-references
to the new variable.

(From yocto-docs rev: 00f02d45319bab90b72eab89fcb69cbe8bd05bb5)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
066ecf613f mega-manual: Added the new mars appendix to the sdk-manual build section.
(From yocto-docs rev: 5e9e7553260e7c684f30fd2565ba8c03b8cd0462)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
11e9d10d08 ref-manual: Added variable description for PACKAGECONFIG_CONFARGS
Fixes [YOCTO #10183]

(From yocto-docs rev: 8ad71d720e6f1a1d23d5879a14600ade86e2bc46)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
0637314b84 sdk-manual: Updated neon JDK requirements to be 1.8+
(From yocto-docs rev: 796fad8a20ece3ef5fdb0c7c1d325a18e37e676b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
4317c65d4e sdk-manual: Updated legacy mars links to go to neon section.
(From yocto-docs rev: 4c524f3763f676d4f60a8fb383019b6153901b9d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
3277d8d307 sdk-manual: Updates to "Working With Eclips" for Neon
Fixes [YOCTO #7546]

Applied changes throughout this section to move it from Luna to
the Neon version (latest) of Eclipse.  We now provide a single
thread for Eclipse, which is based on the latest version (Neon).
Information for Mars, which is also supported) is in a new Appendix
C.

(From yocto-docs rev: 82995d9c49e4c55707591a1375c5d86874c589b0)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
8a3d542d5c ref-manual: Fixed typo for "debugging".
(From yocto-docs rev: a8a3bdc0bcec938486f533148fc3f6d106e5af94)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
7791b32afd poky.ent: Updated the essentials list variable for Fedora
Fixes [YOCTO #10208]

Apparently, this should be "python3" and not "python" now.

(From yocto-docs rev: d9547b426d9ab8a2d79fac95405a7a371a4a35ac)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
77dee668ba ref-manual: Changed command to install Fedora Python package
Fixes [YOCTO #10208]

The example command was wrong.  Had the wrong package name since
we moved upward with Python.  Using "sudo dnf install python3-GitPython"
now.

(From yocto-docs rev: d94469ac4860841c3955161ce1b67a962c4f3f8d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
0de57677c3 yocto-project-qs, ref-manual: Updated Python requirement to 3.4.0
This is the minimum requirement for YP 2.2 release.

(From yocto-docs rev: 0aebdd8556a6e5a52c0caf28dc97c1872b40e950)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:33 +01:00
Scott Rifenbark
5f5671e03c ref-manual: Removed link to ROOTFS_RO_UNNEEDED.
Fixes [YOCTO #9899]

This variable does not need documented in the glossary.

(From yocto-docs rev: 4082b752239025c8696bb248a20ac1fb5380c7af)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
2a2ccb0436 ref-manual: Added new note item to the DEPENDS note box.
Fixes [YOCTO #10198]

The new note helps clarify runtime dependencies.

(From yocto-docs rev: e9eba1260df4ef5f3245149f0436eae5ca68c78b)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
4b8e7d8cca ref-manual: Updated the MLPREFIX variable description.
Fixes [YOCTO #10197]

Provided better examples and a bit of a historical note.

(From yocto-docs rev: 5845aadcc4e6932abde4ce7c74834c0f2a9fb806)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
2c38cc69bb dev-manual: Updated QEMU known issues for user-mode
Fixes [YOCTO #9285]

Applied some rewording to the last bullet of the "Known
Issues" section in the "Enabling GObject Introspection
Support" section.

(From yocto-docs rev: 6cc0c7925984a29a115819195b800e2ecd8b4757)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
007193cdf2 ref-manual: Added variable description for FORCE_RO_REMOVE.
Fixes [YOCTO #9899]

I put this new variable description in.

(From yocto-docs rev: 32040277a921d0013256bed5aa7e32e14d1220ba)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
c3adec966e ref-manual: Updated CLASSOVERRIDE with a new example.
(From yocto-docs rev: 057e79672769eb1fbec87695a0084f42955f757d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
d4cd787e08 yocto-project-qs, ref-manual: Removed Python 3.0 exclusion
Fixes [YOCTO #10178]

Previously, YP did not support Python 3.0.  We mentioned that
in the manual in several places as a requirement for running YP.
I removed this exclusion in the following areas:

 * yocto-project-qs - the section that tells what version of
   Python you need.

 * ref-manual - the section that tells what version of Python
   you need.

 * ref-manual - the FAQ entry about not having the right version
   of Python.

(From yocto-docs rev: 5a0d3ac1c2a4154b93dc925b8074bc9243a86faf)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
3fa0f9d3ee ref-manual: Updated the DISTROOVERRIDES variable description.
Fixes [YOCTO #10176]

Provided a more complete description of this variable.

(From yocto-docs rev: 164bf11250c965aadd1ee1573267aa31daa8a4e8)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
2233924ee6 ref-manual: Updated the MACHINEOVERRIDES variable description
Fixes [YOCTO #10175]

Provided a more detailed description of this variable.

(From yocto-docs rev: 95a80313dfb276425020a61d199b75d259b47ff1)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
44b0b07a6f ref-manual: Rewrite of the CLASSOVERRIDE variable in the glossary
Fixes [YOCTO #10174]

I applied a more descriptive explanation of this varialbe.

(From yocto-docs rev: 7c6c2645b7e74e1c7de0d43b35307c8917648959)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
43b9962cdd ref-manual: Grammar fix in the OVERRIDES variable description.
(From yocto-docs rev: cae94f6b5595e3674af041110d89f736f833cc88)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
9f0e068baa ref-manual: Grammar fix in "Stamp Files and the Rerunning of Tasks"
(From yocto-docs rev: 0d04e8c226ff9391e14f5b07ee95de4e4b7d3bcf)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
e0347ec2dc ref-manual: Clarified the OVERRIDES glossary description.
Fixes [YOCTO #10173]

I provided a more detailed description of how this variable
works.  Also provided a cross-reference link back to the
variable at the end of the PREFERRED_VERSION variable.

(From yocto-docs rev: 679b205eea541b89e220656f7aa304d0f343c8a6)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
f1879193b9 ref-manual: New section clarifying stamps, input checksums and sstate cache
Fixes [YOCTO #10172]

I added a new section on how BitBake reruns tasks based on the
stamps files.  Also put in some cross-referencing links to that
new section in the stamps entry for the structure chapter and in
the STAMP variable in the glossary.

(From yocto-docs rev: da8779d9eb85473cd6b0f74e9e1371e1d277890f)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:32 +01:00
Scott Rifenbark
ba8bc1ba39 ref-manual: Updated systemd-boot documentation link.
Fixes [YOCTO #9707]

The original link was bogus.  I applied four instances to fix the
link.

(From yocto-docs rev: f03d5af6ddf0430cf98332c5d54f3fe68fb69cf9)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:27:31 +01:00
Paul Eggleton
9173b11f2f bitbake: knotty: ensure progress bar output is accounted for in display
When calculating how many lines we'd printed we weren't properly taking
the progress bars into account, with the result that sometimes if the
last line printed on the terminal wrapped to the next line (which is
possible) we backed up less lines than we should have.

Additionally, we should always print a newline after updating the
progress bar - there's no need to check if there wasn't output (there
always will be courtesy of our overridden _need_update()) and we now
allow the line to wrap so we don't need to check the other condition
either.

Hopefully this will fix [YOCTO #10046].

(Bitbake rev: 326d18d96faf02675ba34ad3c3a20cd424b39b91)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:01:56 +01:00
Richard Purdie
0d76de85bd bitbake: knotty: Show task elapsed time
Its often useful to know how long a task has been running for. This patch
adds that information to the task display, updating every 5s if there
were no other updates so the user can see how long tasks have been running
for.

[YOCTO #9737]

(Bitbake rev: 6c42025e5dd7761213be3f82f3252a7892d2239d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 15:01:56 +01:00
Jose Lamego
c902e7b937 oeqa/selftest/base: backup and restore local configuration files
Selftests' cleanup method during test setup is not capable of
restoring local configuration files that remain modified after
aborting a test through a keyboard interruption.
This change creates backups for local.conf and bblayers.conf at
test setup, restore them when found, and deletes them at cleanup.

[YOCTO #9390]

(From OE-Core rev: 0877278e07e4c2494c4c23199490dc47a5cee69d)

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>
2016-09-23 14:56:39 +01:00
Mariano Lopez
659fab4291 testimage.bbclass: Add package manager dependency
The feature to install packages in the target requires to
build the package manager. It would fail, with very obtuse
errors, if a test requires to install something and the
package manager hasn't been build. This will add the package
manager as dependency for testimage.

[YOCTO #10260]

(From OE-Core rev: cf548fd85297585cc5688eda45ee332200bbd4b7)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Nathan Rossi
0156812271 scripts/runqemu: Using a cpio* rootfs has no special network
When booting a system with the rootfs being of cpio* type the networking
setup should still work the same as for all other root filesystem types.
This change removes the clearing of the NETWORK_CMD variable allowing
for the slirp/tap setup to be provided to QEMU.

(From OE-Core rev: 7d01a9c80de0cdbac3831301dd996c7b61754c74)

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>
2016-09-23 14:56:39 +01:00
Nathan Rossi
deba7cac00 runqemu: Move virtio RNG to machine configuration
Not all QEMU machines (outside of those available in OE-Core) are
capable of using the virtio-rng-pci device due to various machine models
not having a pci/virtio bus. This makes it such that the use of the
'-device virtio-rng-pci' flag to QEMU is machine specific.

This patch removes the general addition of the flag to all runqemu
targets and adds the flag into the QB_OPT_APPEND for all the qemu*
machines in OE-Core that support its use (which is all of them).

(From OE-Core rev: e890c05e66a21702e9e8ccce794b74cb7f5518ed)

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>
2016-09-23 14:56:39 +01:00
Ross Burton
8aa8d14592 cmake-native: prefer native sysroot libraries over host
Explicitly set CMAKE_LIBRARY_PATH so that find_library() looks in the native
sysroot before the host.

Also pass --verbose to configure which sets CMAKE_VERBOSE_MAKEFILE for detailed
compile logs.

(From OE-Core rev: 89b28990ff3ef8ac7a33a0a3f9177b9bd0e1530b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Otavio Salvador
49d4477d53 gstreamer1.0-libav: Add 'valgrind' config option
This fixes following error:

,----
| src/libavutil/log.c:51:31: fatal error: valgrind/valgrind.h: No such file or directory
|  #include <valgrind/valgrind.h>
`----

(From OE-Core rev: 262f8180c9037b7e82efe08ce3bb1880fee22ea8)

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>
2016-09-23 14:56:39 +01:00
Zhixiong Chi
8381125e53 wpa_supplicant: Security Advisory-CVE-2016-4477
Add CVE-2016-4477 patch for avoiding \n and \r characters in passphrase
parameters, which allows remote attackers to cause a denial of service
(daemon outage) via a crafted WPS operation.
Patches came from http://w1.fi/security/2016-1/

(From OE-Core rev: d4d4ed5f31c687b2b2b716ff0fb8ca6c7aa29853)

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Zhixiong Chi
9b78237363 wpa_supplicant: Security Advisory-CVE-2016-4476
Add CVE-2016-4476 patch for avoiding \n and \r characters in passphrase
parameters, which allows remote attackers to cause a denial of service
(daemon outage) via a crafted WPS operation.
Patches came from http://w1.fi/security/2016-1/

(From OE-Core rev: ed610b68f7e19644c89d7131e34c990a02403c62)

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Gratian Crisan
d2259ac280 encodings: Add dependency to mkfontdir-native
Currently adding a font recipe to an image doesn't have enough
dependencies to cause mkfontdir-native to be included in the native
sysroot. This creates problems with the postinstall scripts for fonts
which call mkfontdir to create font index files: font.dir. The end
result is missing font.dir files in the built image and a malfunctioning
font system.

Dependencies for the relevant recipes currently look like this:

  * <font.bb>   [D ] -> font-util-native
                [R ] -> encodings, font-util
                [RN] -> font-util-native

  * font-util   [D ] -> encodings
                [R ] -> mkfontdir, mkfontscale, encodings
                [RN] -> mkfontdir-native, mkfontscale-native

  * encodings   [D ] -> mkfontscale-native, font-util-native

  * mkfontdir   [R ] -> mkfontscale
                [RN] -> mkfontscale-native

  * mkfontscale [D ] -> libfontenc

  * libfontenc  [D ] -> font-util

Where:
  * D = DEPENDS
  * R = RDEPENDS
  * RN = RDEPENDS_class-native
  * <font.bb> e.g. font-adobe-100dpi*.bb
Some details where omitted for clarity e.g. dependencies on util-macros.

I believe the intent behind the RDEPENDS_class-native chain:
  * <font.bb> -> font-util-native -> mkfontdir-native
was to provide the necessary dependency on mkfontdir. However because
the native sysroot is not built from packages this RDEPENDS_class-native
chain doesn't have the desire effect (i.e. it doesn't pull in
mkfontdir-native).

Changing the RDEPENDS_class-native chain into a DEPENDS_class-native
chain is a non-starter because of the build time dependency loop it
creates:
  * font-util-native -> mkfontscale-native -> libfontenc-native -> font-util-native

Having upstream remove the build time dependency of libfontenc on
font-util is also a non-starter[1] even though it does create problems
in other distributions, for example on Debian see [2], [3].

Instead add a DEPENDS on mkfontdir-native in the encodings recipe in
addition to the mkfontscale-native dependency it already contains. This
solves the missing mkfontdir in the native sysroot problem without
introducing a build dependency loop.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=97631
[2] https://wiki.debian.org/CircularBuildDependencies
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717843

(From OE-Core rev: aa8a7b2962f9a77bdd347843c41f86dc291b783e)

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Ross Burton
65a7b15b44 bitbake.conf: add a lazy default for SDKMACHINE
If the user doesn't set SDKMACHINE in their local.conf then uninative and
buildtools will fail in obscure ways, so ensure that a default value is set.

Also as SDK_ARCH will be overritten then loading the machine-sdk configuration
file, don't bother assigning it.

(From OE-Core rev: 6bd507ef36578ba7bee6ef8b3f8f6465afca4e20)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Joshua Lock
e08640b409 buildtools-tarball: improve stamp independence
buildtools-tarball shouldn't be regenerated when MACHINE changes,
nor should variants for other SDKMACHINE be removed from the deploy
directory when SDKMACHINE changes.

Remove target architecture dependencies so that deploy artefacts
can overlap.

(From OE-Core rev: b7d1a310f6b880e92b124a78af3c948abaab4236)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Joshua Lock
cb1ffb835f toolchain-scripts-base: add base class for toolchain_create_sdk_version
We use toolchain_create_sdk_version() in buildtools-tarball but
don't want the extra classes toolchain-scripts pulls in, therefore
split out a separate base class for this function which both
toolchain-scripts and the buildtools-tarball can inherit.

(From OE-Core rev: a398dfa654dc035c404fc12279fac9edf6403e11)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Kai Kang
8f85911dae xserver-xorg: fix qa warnings
When build lib32-xserver-xorg it has qa warning:

| WARNING: lib32-xserver-xorg-2_1.18.4-r0 do_package_qa: QA Issue:
| Package lib32-xf86-video-modesetting contains Xorg driver
| (modesetting_drv.so) but no xorg-abi- dependencies [xorg-driver-abi]

The qa check xorg-driver-abi has been skipped for xserver-xorg and make
it to skip for multilib package too.

(From OE-Core rev: 5f94d2dd7a16ae9f327c88636822539f79e983eb)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23 14:56:39 +01:00
Richard Purdie
88df0e4d5d bitbake: cooker/providers: Only add target to world build if task exists
A "bitbake world -c unpack" currently breaks as not all tasks have an
unpack task. This change allows addition of world targets only if the
specified task exists which makes certain commands possible when otherwise
you just get errors which can't easily be avoided.

(Bitbake rev: ca4f5e6d01b5c8cf315f59bc86194d63c0d3d042)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:18:11 +01:00
Ross Burton
37d5307db0 bitbake: fetch2: handle absolute paths in subdir
Currently if you use the subdir parameter in a SRC_URI and pass an absolute path
then it gets appended to the unpack directory instead of being used directly.
This is inconvenient as it may be useful to use ${S} when you want to unpack a
file into the source tree.

Change this behaviour so that absolute paths are used directly instead of being
appended to the root directory.  To ensure that recipes cannot write files to an
arbitrary location enforce that the subdir starts with the unpack root.

(Bitbake rev: c3873346c6fa1021a1d63bddd9b898a77c618432)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:18:11 +01:00
Richard Purdie
7358cbf36b base.bbclass: Drop unnecessary dirs setting
${D} is listed in cleandirs so no need to list it in dirs as well.
The default directory is ${B} so this is a cleanup which should have
no changes to the execution.

[YOCTO #10017]

(From OE-Core rev: 7e0f95bf359bc3b5bb1578024a993e184de155cd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Richard Purdie
577ff4e3dd autotools/siteinfo: Tweak CONFIG_SITE handling for determism/races
As things stand there are multiple races in the CONFIG_SITE handling
where checksums can change depending on whether site directories
exist or not when parsing happens. This is bad.

Secondly, there is a build race that occurs if you build virtuals
in parallel with the "main" recipe, since the main recipe is parsed
when the virtual is (since it sets variables like BBCLASSEXTEND)
and with the current code, it may look for files and directories
which could be created/destroyed which the loop is executing. This
is also bad.

The aclocal-copy directory should only ever be accessed by the call
from autotools.bbclass. This changes the parameter name to make it
clear and ensures all callers have the right usage, neatly avoiding
all the problems above. Also added better comments.

(From OE-Core rev: 3207244004c612c1a0e13921251003e5e635d1b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Robert Yang
99284c3c83 asciidoc: set CLEANBROKEN to fix rebuild
The make clean removes doc/a2x.1 and doc/asciidoc.1, then it would cause
build failures since in the second build:
Fixing CONF_DIR in asciidoc.py
Fixing CONF_DIR in a2x.py
python a2x.py -f manpage doc/a2x.1.txt
a2x: ERROR: "xmllint" --nonet --noout --valid "/path/to/asciidoc-native/8.6.9-r0/asciidoc-8.6.9/doc/a2x.1.xml" returned non-zero exit status 4
make: *** [doc/a2x.1] Error 1

The xmllint failed because "--nonext" is used:
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
/buildarea/lyang1/test_arm/tmp/work/x86_64-linux/asciidoc-native/8.6.9-r0/asciidoc-8.6.9/doc/a2x.1.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"

Avoid running make clean will fix the problem.

(From OE-Core rev: f60fc2dc231ffc8cbf5939b0dbfa06c5fe805b86)

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>
2016-09-22 11:13:24 +01:00
Ed Bartosh
d6616a421f directdisk*.wks: add serial console support
Added serial console to kernel command line to to make it
easier to boot wic images on devices without display.

Tested on MinnowBoard MAX.

(From OE-Core rev: 9a774e3bcd5dc4c85d642acc7bf26095b8c620e4)

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>
2016-09-22 11:13:24 +01:00
Christopher Larson
ef942d6025 perf: Fix to obey LD failure on qemux86-64
When built on an i686 host for qemux86-64 without the
fix to obey LD and it fails:

/scratch/dogwood/toolchains/x86_64/bin/i686-pc-linux-gnu-ld:
Relocatable linking with relocations from format elf64-x86-64
(/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/fs.o)
to format elf32-i386 (/scratch/dogwood/perf-ld-test/build/tmp/work/qemux86_64-mel-linux/perf/1.0-r9/perf-1.0/fs/libapi-in.o)
is not supported

This is because LD includes HOST_LD_ARCH, which contains TUNE_LDARGS,
which is -m elf32_x86_64 for x86_64. Without that, direct use of ld will fail.

(From OE-Core rev: 0ce06611068e74e6ea2e226e3f967aaa91fecd25)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Andreas Müller
0f09354396 libunwind: fix build by linking with bfd instead of gold
works around:
<native-sysroot>/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1038: recipe for target 'Gperf-simple' failed
make[1]: *** [Gperf-simple] Error 1
make[1]: *** Waiting for unfinished jobs....
<...>
<native-sysroot>/ld: error: Lperf-simple.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1094: recipe for target 'Lperf-simple' failed
make[1]: *** [Lperf-simple] Error 1
<...>
ERROR: oe_runmake failed
<native-sysroot>/ld: error: Gperf-trace.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1042: recipe for target 'Gperf-trace' failed
make[1]: *** [Gperf-trace] Error 1
<native-sysroot>/ld: error: Lperf-trace.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1098: recipe for target 'Lperf-trace' failed
make[1]: *** [Lperf-trace] Error 1
<...>
<native-sysroot>/ld: error: test-coredump-unwind.o: cannot make copy relocation for protected symbol '_UCD_accessors', defined in ../src/.libs/libunwind-coredump.so
collect2: error: ld returned 1 exit status
Makefile:1186: recipe for target 'test-coredump-unwind' failed

(From OE-Core rev: 482733bae05bdc7b149e515fb209c3266f459a53)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Maciej Borzecki
95da87ece7 systemd: fix indentation
(From OE-Core rev: 170157602932aa454e721ea849fbf1679b573618)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Fahad Usman
aa7f7b6348 x264: add textrel to INSANE_SKIP
Tried by adding CFLAGS_append = " -fpic " to
the recipe. But that couldn't help resolve the
warning message:

x264/r2491+gitAUTOINC+c8a773ebfc-r0/packages-split/x264/usr/lib/libx264.so.144' has relocations in .text [textrel]

It was found that this warning is emitted because of the
assembly files in the source code. And it is not easy to
get rid of TEXTREL's which are coming from the assembly
source files.

Adding textrel to INSANE_SKIP resolves this issue.
This issue was observed in cyclone5 and imx6qsabresd BSP's.
So generalizing the patch.

(From OE-Core rev: 9470e0911838a6f5a23f01c6944906b69aa1317a)

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Mingli Yu
f5b1cd0e82 perl: fix CVE-2015-8607
Backport patch to fix CVE-2015-8607 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/0b6f93036de171c12ba95d415e264d9cf7f4e1fd

(From OE-Core rev: e2289647ace9ef96e6a7e4aae201fd9149e56678)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Mingli Yu
c27660df40 perl: fix CVE-2016-6185
Backport patch to fix CVE-2016-6185 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7

(From OE-Core rev: 81e550d0c23c9842b85207cdfa73bbe9102e01fb)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Mariano Lopez
7a0fbb90a6 toolchain-shar-relocate.sh: Add error-handling
The relocation script of the SDK doesn't have enough
error handling when replacing host perl with SDK perl
or changing the symlinks. This will add those checks
along with a sanity check of xargs.

[YOCTO #10114]

(From OE-Core rev: c9982dab4cfdd5963d2c2dd4aab99dd6a27fcd1c)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:24 +01:00
Andreas Müller
2a0f4e713a libnewt: link whiptail properly with libnewt
Configuration failed to detect gold as GNU linker. It was searching for
'GNU ld' but gold returns 'GNU gold (GNU Binutils 2.27.0.20160806) 1.12' which
does not match. When not linking by GNU linker Makefile did some magic link
target alignment:

ifneq ($(GNU_LD),)
SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver -Wl,-soname,$(LIBNEWTSONAME)
else
SHLIBFLAGS=
endif

which caused:

| WARNING: libnewt-0.52.19-r0 do_package_qa: QA Issue: /usr/bin/whiptail contained in package whiptail requires libnewt.so, but no providers found in RDEPENDS_whiptail? [file-rdeps]

(From OE-Core rev: 3b806c927504e682ddd159c890a5f243e273b23e)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 11:13:23 +01:00
Richard Purdie
3c1807e2d8 uninative-tarball: Make stamp independent
The uninative tarball only contains nativesdk compoents. It should
not get regenerated when MACHINE changes for example. Currently its
sstate arch is also incorrect so changing SDKMACHINE results in other
variants being removed from the deploy directory.

This patch removes the target architecture dependencies so that
deploy artefacts can overlap and it doesn't continually rebuild. This
also fixes various autobuilder/release artefact issues we're having
as a result of these issues.

(From OE-Core rev: 6edd0b8dccc6e1e21f2ef87013e2e0a40d19b0d6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-22 00:24:56 +01:00
Scott Rifenbark
46afeaba5f bitbake: bitbake-user-manual: Added information for using single quotes
Fixes [YOCTO #10293]

In the section about setting variables, I added a paragraph that
explains the use of single quotes when setting a variable.  The
case covers when you must have the double quote charater as part
of your variable's value.

(Bitbake rev: 01e331cd0d612013badfb07df91151907f74903d)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:19:53 +01:00
Scott Rifenbark
39828d3ccc bitbake: bitbake-user-manual: New section on functions you can call from Python
Fixes [YOCTO #10100]

I added a new parent directory named "Functions You Can Call From
Within Python".  This section contains a couple new sub-sections.
One is the existing "Functions for Accessing Datastore Variables".
The other is called "Other Functions", and it is used to point
or reference some commonly used functions that the user can call
from within Python.

(Bitbake rev: ecbcedd74125ef00599f4af384ee303dae8af5b7)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:19:53 +01:00
Christopher Larson
5503ed14ed bitbake: bb.build: in _exec_task, catch BBHandledException
We don't want a traceback for this exception, we need to catch it, fire
TaskFailed, and return failure.

(Bitbake rev: 63966ada459d44d3dc7817ad2a026a22e8f6700f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:17:57 +01:00
Joshua Lock
792c40cbdd buildtools-tarball: add SDKMACHINE to stamps-extra-info
Otherwise the stamps for x86-64 and i686 uninative tarballs match
and we can't deploy both to the DEPLOYDIR.

(From OE-Core rev: fee426ae0c2b27925b05b856ada676958ee10869)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:02:16 +01:00
Joshua Lock
9294261c03 runqemu: don't fail during check_arg_machine()
If DEPLOY_DIR_IMAGE doesn't exist during check_arg_machine() we
will attempt to guess a suitable value later when check_and_set()
calls validate_paths(), therefore this shouldn't raise an exception

(From OE-Core rev: ed8d6f391c567048bd50dc3234804915f8212cef)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:02:16 +01:00
Joshua Lock
5d3c56f2a5 runqemu: don't try and invoke bitbake when running in a toolchain env
If a MACHINE value is passed we can't validate it by running bitbake
as the toolchain environment doesn't include the build system, we
must assume that the passed value for MACHINE is correct.

(From OE-Core rev: 2c569678566c49b3ea237ef2de0fbae782263449)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:02:16 +01:00
Joshua Lock
c97912a17d runqemu: try and guess qemu-system binary when MACHINE isn't set
Emulate some logic from the prior, shell based, version of runqemu
to try and infer the correct setting for MACHINE from the kernel
and rootfs filenames.

(From OE-Core rev: a5adabe1414061d6864c5913dd5e66a4527838f1)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:02:16 +01:00
Joshua Lock
cd47b648af runqemu: validate paths and attempt to infer unset paths
We need to validate and ensure all paths are set regardless of
whether runqemu was invoked with a .qemuboot.conf file or
otherwise. Split this logic out into a separate method called
during check_and_set()

(From OE-Core rev: e843b2d49a151c1fe0d2a7ba00c41d2a35775736)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 22:02:16 +01:00
Alejandro Hernandez
7ab74d8b9a linux-yocto: Updates genericx86* SRCREVs for linux-yocto 4.8
Upgrades to Linux 4.8-rc7

(From meta-yocto rev: 1a36dae24793dd1736e7eaea80c0b470d0be559d)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:07 +01:00
Alejandro Hernandez
7f44dde5f7 linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.4 Upgrades to Linux 4.4.20
(From meta-yocto rev: 6dc826a721d7da1b9c703fc9096591ae9ee8a3b8)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Alejandro Hernandez
ec41b0d69e linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.1 Upgrades to Linux 4.1.32
(From meta-yocto rev: a1c385fd4da293281095a1207e8cd99ef92286f5)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Kevin Hao
66abd36513 meta-yocto-bsp: bump to linux-yocto 4.8 for the non-x86 BSPs
Boot test for all these boards.

(From meta-yocto rev: 3fe3a876710255ad8d16fae84aea92477c144440)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Kevin Hao
3cbf23ac52 meta-yocto-bsp: linux 4.4: bump to the latest stable version for the non-x86 BSPs
Boot test for all these boards.

(From meta-yocto rev: ba5f8d54492d862de5995364e33acfe014281c00)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Kevin Hao
d16b6dd861 meta-yocto-bsp: linux 4.1: bump to the latest stable version for the non-x86 BSPs
Boot test for all these boards.

(From meta-yocto rev: 02239cf4e7d034e1e910b0373fcdc5a9bdd74b6e)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
1fe840a4a0 genericx86-common.inc: produce wic images
Added wic images to the list of default image types for genericx86
and genericx86-64 machines. This is a first step of using wic as a
recommended way of creating images for reference BSPs.

[YOCTO #8719]

(From meta-yocto rev: 384fa3a21d515c53c177ac66f74999276933b214)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Robert Yang
425a38ae1f genericx86-common.inc: support boot by runqemu
(From meta-yocto rev: aac30f9e8e5ec06479750d460e7342bc990e87fe)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Richard Purdie
d3e6e1054c bitbake: runqueue: Handle missing sstate dependencies better
If you "bitbake glibc-locale" then delete the libpcre-native sstate
and "bitbake glibc-locale -C package_write_rpm", it will fail with
rpmbuild missing the libprce library.

The reason is that libpcre-native fails to install from sstate (since
it isn't present) but doesn't get built and hence rpm-native tries to
run without its dependencies.

The simplest fix is not to add "covered" tasks which have failed to
install sstate. I can't help feeling there is more to this issue but
this does fix the current problem and shouldn't have adverse affects.
It is an unusual situation to have missing dependencies in sstate since
they're usually all present or not at all.

I've taken the opportunity to remove some old cruft from when we had
numeric task ids, the code can be simpler now.

(Bitbake rev: ba566b46d530b495f12f3a74f76434717b22a020)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Michael Wood
a884c4307a bitbake: toaster: buildinfohelper local layer don't construct path using git info
When the layer is local source don't try and work out the location of
the layer by using the git information (getGitCloneDirectory)

[YOCTO #10199]

(Bitbake rev: 3dfea5214d4bd006e26630e5024774ecb84ea527)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Michael Wood
6066729797 bitbake: toaster: Add tests to detect if we have missing db migrations
Based on the same test as found in patchwork by Damien Lespiau
https://github.com/dlespiau/patchwork/blob/master/patchwork/tests/test_db.py

(Bitbake rev: 031cb194aaa1b6cc970fed3fa0d0dbd3ebac163f)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
7a3cccbd1a bitbake: toaster: unlock BuildEnvirnoment when build is done
There is no need to lock build environment before changing
build status as this operation is very fast. However, there
is a need to unlock it after changing build status.

Explicitly unlocked BuildEnvironment after build reaches
final status SUCCEEDED, FAILED or CANCELLED. This should
allow runbuilds process to pickup next build faster.

(Bitbake rev: faa88272d656640c039572c5c8f3e6c56535b6f7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
ad04a6324e bitbake: runbuilds: code cleanup - remove unused imports
Fixed pylint warning:  W0611(unused-import): Unused import

(Bitbake rev: 49731a1a2b2b63c1a897d2e33bca4968524e8710)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
5e88c4a6fe bitbake: runbuilds: code cleanup - whitespaces, long lines
Fixed following pylint warnings:
 C0330(bad-continuation): Wrong hanging indentation before block.
 C0326(bad-whitespace): No space allowed around keyword argument assignment
 C0326(bad-whitespace): Exactly one space required before assignment
 C0301(line-too-long): Line too long

(Bitbake rev: 0eecd660e374a4dbcefe4c59f4c8654bf3a0e937)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
323b81a083 bitbake: runbuilds: process builds on start
If Toaster is stopped incorrectly there could be some
build requests and builds in incorrect state left from the previous run.
Running main processing function on start should take care of those.

(Bitbake rev: 6b9f8f6bb51d1aa2ca4effc34e076e331d0cb8d1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
64d284b26c bitbake: runbuilds: process builds on SIGUSR1
Run main processing function 'runbuild' only if SIGUSR1 is
received. This signal is sent by Toaster when build status
is changed (either started, cancelled or finished).

This should stop continuous database polling as run_builds function
will be called only when needed, i.e. after build status is changed.

[YOCTO #8918]

(Bitbake rev: 62d598cc5aa01d23f1e9284e9e926bd55b1d1878)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
e9a12e5d37 bitbake: toaster: notify runbuilds when build status changes
Called signal_runbuilds API when build is scheduled, cancelled or
finished to notify runbuilds process about builds status change.

[YOCTO #8918]

(Bitbake rev: fe08f0fa4b328908e73695ebbceca87bc86a49f9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
2478a6f208 bitbake: toaster: implement signal_runbuilds function
This function reads pid of runbuilds process from
BUILDDIR/.runbuilds.pid and sends SIGUSR1 to it. signal_runbuilds
function will be used in Toaster code to notify runbuilds when
build is scheduled, finished or cancelled.

(Bitbake rev: 62955224a6d99e9f581d2bef924058070bfa4c43)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Ed Bartosh
483c16a7ce bitbake: toaster: fix checking of repository url
Toaster checks gir repository url is the same as locally cloned before
checking it out to existing local clone. This check can be skipped if
commit is 'HEAD' as in this case repository is not hard reset to
commit, so the local clone won't be changed.

[YOCTO #10163]

(Bitbake rev: 7e9a89e3fde5e71cb859799635974ec41790c44d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Mark Hatle
08af663a15 bitbake: cookerdata.py: Catch BBHandledException, preventing a backtrace in an event
The event handling 'Exception' was catching and triggering a backtrace.  This
trace was obscuring any errors from an event handler that had raised the
BBHandledException, which should indicate do not print additional information.

(Bitbake rev: 51ca5193a5674b27d816140b0254f485912177a2)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Joe Slater
f1d8f1e693 bitbake: cooker.py: add LAYERRECOMMENDS processing
Add recommended layers to collection_depends[] so that dynamic
priority assignment will work for both depends and recommends.

Recommended layers do not cause an error or warning
if they are not in the collection list, but debug messages
are output for level 3 and above.

explode_dep_versions2 returns a dictionary, so we
change the variable deplist to depDict.  The dictionary
values are lists which are either empty or contain only one
version specification.

(Bitbake rev: 20cdc3d609f8aea992f97c3db336574d3a549973)

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:06 +01:00
Belen Barros Pena
74acb91a79 bitbake: toaster: Remove duplicate layer information
In the custom recipe details page, the layer information is displayed
twice in the right hand column. Remove one of the layer entries, since
showing the layer information once should be enough.

[YOCTO #10037]

(Bitbake rev: e2b5dc3732781dc933c6bb10482926335720d110)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Belen Barros Pena
07aa966b5b bitbake: toaster: Indicate active navigation element
The left navigation in the build history pages is not showing the active
item when you navigate directly to the errors or warnings information in
the build summary. Add a special case to make sure the "build summary"
item is highlighted.

[YOCTO #9864]

(Bitbake rev: f236d9ca28e45a270f50bb3edcd466b1bc8d2960)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Belen Barros Pena
67ce1ce3cb bitbake: toaster: Fix links to tasks with specific outcome
The build dashboard provides a count of tasks that were executed and not
executed, and of tasks that failed (if any). The number is a link to the
list of tasks.

Fix the links so that they filter the tasks table by the selected
criteria (executed, not executed or failed).

[YOCTO #9832]

(Bitbake rev: a75e70bbc9081f77f1e4aeeee8222b06112e4406)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Ross Burton
ac2ac31206 bitbake: uihelper: use elif instead of repeated if
(Bitbake rev: a1d6f6425cd9ef9e07344869817517172afd6e27)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Bruce Ashfield
cb169d3ada linux-yocto/4.8: introduce preempt-rt
Paul Gortmaker has made the preempt-rt patch available for the
4.8 kernel.

This commit merges his queue to standard/preempt-rt/rebase, which
will be kept up to date with a clean history, and it also makes
it available in standard/preempt-rt/base, which will be kept fast
forward for board support.

(From OE-Core rev: b475bb88cc5d6700b4fadff1b2bb43a376492c7b)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Bruce Ashfield
8692bed57b linux-yocto/4.8: integrate 4.8-rc7
Updating to the latest release candidate.

(From OE-Core rev: f15d5d8c09da9260a59ed396a4d5c9d009e5c751)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Bruce Ashfield
b4cf3f305c linux-yocto/4.1: 4.1.32 content and configuration warning fixes
The LINUX_VERSION was previously updated to 4.1.32, but the
SRCREVs for the actual content were missed. This gets our actual
version and the PV back in sync.

We also update the meta data to fix configuration audit warnings
from the beaglebone builds.

(From OE-Core rev: 255adfaddec0dc44db619bf8726cd7804c09400d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>

squash with 4.1

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
California Sullivan
0eacf03de1 kernel.bbclass: Add kernel_version_sanity_check function
The kernel being built should match what the recipe claims it is
building. This function ensures that happens by comparing the version
information in the kernel's Makefile to the PV the recipe is using.

v2 changes:
* Match against PV instead of LINUX_VERSION
* Match against EXTRAVERSION as well (e.g., -rc4)
* Cleaned up version string building

Fixes [YOCTO #6767].

(From OE-Core rev: ec467cfaea5c8cf22c61daa8845c2e4e96449512)

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Jackie Huang
c2908e1d1f boost: Replace math::static_lcm with integer
Replace math with integer according to the commit upstream:

(From OE-Core rev: 2e2ecd867d47ee24b37f61af6db5338df5059844)

(From OE-Core rev: 4c9fe10f3aaa4ee6e8fee52816298896b18cdb60)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 21:58:05 +01:00
Joshua Lock
b26926c3a8 uninative-tarball: add SDKMACHINE to stamps-extra-info
Otherwise the stamps for x86-64 and i686 uninative tarballs match
and we can't deploy both to the DEPLOYDIR.

(From OE-Core rev: 2a9603759fe87d6326c145f6213ffffeb6afc6ae)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 18:12:09 +01:00
Joshua Lock
e29c4609c9 populate_sdk_base: fix support for changing SDKMACHINE settings
Include SDKMACHINE in the tasks stamp information and the name of
the sstate-inputdirs so that changing SDKMACHINE doesn't result in
valid output of the task being deleted when SDKMACHINE is changed.

Without this patch changing SDKMACHINE and building an SDK resulted
in toolchain installers for other  SDKMACHINE's being deleted from
the deploy directoy.

[YOCTO #10275]

(From OE-Core rev: d7a06b53af0066bd12f5f42e10e82b307fd069ce)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21 18:12:09 +01:00
Ross Burton
a767c78abe oeqa/selftest/lic-checksum: don't report the expected failure to errors.yp
This test has a bitbake invocation that is expected to fail, so inhibit
report-error running.

(From OE-Core rev: b2771e17a5f301423f65be9f93c9c1b1e7f8ab93)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:09 +01:00
Robert Yang
ffdc23ab53 openssl: fix do_configure error when cwd is not in @INC
Fixed when building on Debian-testing:
| Can't locate find.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.2 /usr/local/share/perl/5.22.2 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at perlpath.pl line 7.

(From OE-Core rev: c28065671b582c140d5971c73791d2ac8bdebe69)

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>
2016-09-20 15:11:09 +01:00
Saul Wold
1fe48d03f8 gcc-configure: Enable initfini-array
This adds the correct support for initfini-array which replaces .init
and .fini with .init-array and .fini-array.  There is no appreciable
size difference with this change.

The change is needed since configure will not correctly detect support
when building cross-compilers.

(From OE-Core rev: 9f8a075ab46691534e2b22d0a363b3c847394215)

Signed-off-by: Haitao Huang <haitao.huang@intel.com>
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>
2016-09-20 15:11:09 +01:00
Aníbal Limón
a8cf594bce oeqa/runtime/parselogs.py: Add ignore of tsc calibration fail in x86
We are experimenting failures to calibrate CPU's using TSC in x86
VM's due to usage of nested KVM [1], this is a known issue [2][3]
in virtualization environments, for detail explnation see [4].

Also we already have an ignore for 'TSC Fast calibration fail'.

[1] http://errors.yoctoproject.org/Errors/Details/83684/
[2] https://bugzilla.redhat.com/show_bug.cgi?id=814231
[3] https://lists.nongnu.org/archive/html/qemu-devel/2010-09/msg01547.html
[4] https://www.kernel.org/doc/Documentation/virtual/kvm/timekeeping.txt

(From OE-Core rev: 2271f59a0f506f89f9fea6777701c4b40790ddd9)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:09 +01:00
Martin Jansa
3f3198128c enchant: add PACKAGECONFIG for *spell
* use PACKAGECONFIG for various *spell implementations

* keep aspell enabled by default

* prevent hunspell/myspell being autodetected as reported in "bitbake world status" e-mails:
  WARN: enchant: enchant rdepends on hunspell, but it isn't a build dependency?

(From OE-Core rev: d7df8092c2be4c984d9292749f6cfa7ce41cbb53)

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>
2016-09-20 15:11:08 +01:00
André Draszik
506df09b70 boost: switch to using C++11 atomics when available
The alleviates the need to use and maintain hand-written
assembly, just relying on the compiler to do the right
thing.

(From OE-Core rev: 0e683664dfbe2b71288445a86e31fbea062ed564)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Robert Yang
d8af0f283a runqemu: improve finding of rootfs, kernel and dtb
* Search rootfs in the following order:
  - IMAGE_NAME*.FSTYPE
  - IMAGE_LINK_NAME*.FSTYPE

* Search kernel in the following order:
  - QB_DEFAULT_KERNEL
  - KERNEL_IMAGETYPE
  - KERNEL_IMAGETYPE*

* Search dtb in the following order:
   - QB_DTB
   - QB_DTB*
   - *.dtb

* Fix DTB, it should only work with "-kernel" option.

[YOCTO #10265]

(From OE-Core rev: 32ff0974ed06f797c6b7d9092a8dc9ae50e9a572)

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>
2016-09-20 15:11:08 +01:00
Ioan-Adrian Ratiu
67cb1169f5 linux-firmware: package carl9170 separately
Package the carl9170 binary firmware separately because it is needed
by various usb dongles and installing whole linux-firmware is overkill.

carl9170 is an atheros-based firmware, the succesor of ar9170 which is
deprecated and its driver (ar9170) was removed from the kernel tree.
carl9170 comes both as a binary blob and also with free sources; the
sources are deleted in linux-firmware.bb to avoid depeding on bash/etc.

Also we should keep ar9170 as is because OOT drivers might still use it.

The license for carl9170 is GPLv2 (sources are beside the bin in the
linux-firmware git repo).

(From OE-Core rev: 907e6596275850cc31b143a4c3094029b0cd078e)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Robert Yang
fbb99b22f9 runqemu-gen-tapdevs: remove /etc/runqemu-nosudo when remove taps
It creats /etc/runqemu-nosudo when creats taps, so should remove it when
remove taps.

(From OE-Core rev: 3d4bf5b0ea581e3e9b388328b086d03f9174fd61)

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>
2016-09-20 15:11:08 +01:00
Jackie Huang
fad4caf84e default-distrovars.inc: remove libidn from LGPLv2_WHITELIST_GPL-3.0
The libidn recipe is now buildable in distros which blacklist
GPL-3.0 without needing to be explicitly whitelisted (since it
provides at least one non GPLv3 package).

(From OE-Core rev: 63d6d014a0a3da8bf5689b27d1155492e2fdb0f2)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Yuanjie Huang
b2a6f9a97d openssh: fix potential signed overflow to enable compilation with -ftrapv
Pointer arithmatic results in implementation defined signed integer
type, so that 's - src' in strlcpy and others may trigger signed overflow.
In case of compilation by gcc or clang with -ftrapv option, the overflow
would lead to program abort.

Upstream-status: Submitted [https://bugzilla.mindrot.org/show_bug.cgi?id=2608]

(From OE-Core rev: 2ce02941300aa3e826df0c59fd8d4ce19950028e)

Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Ed Bartosh
69005ae65c image_types: add parted-native to do_image_wic depends
As parted is always used by wic it makes sense to make do_image_wic
dependent on parted-native:do_populate_sysroot. This should help
to avoid adding it to all wic image recipes.

(From OE-Core rev: c687c9fcc010947f52e1cd153ea74ae5f6343ca4)

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>
2016-09-20 15:11:08 +01:00
André Draszik
9ead92a00f gawk-3.1.5: fix non-glibc & gcc >= v4 builds
See commit message of patch added

(From OE-Core rev: bdfce776843bf4287251923c79bc15365c20b4a1)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Mark Hatle
0a04692279 package_manager.py: Change diagnostic messages per IRC
Based on a discussion with IRC user: Ulfalizer

It was suggested that removing the diagnostic list, and replacing it with a
simple hint to what might be causing the problem was a better solution.

(From OE-Core rev: ca78313665b23bd7fee85f034acfe1eb1009bd65)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Mark Hatle
f1e3dc029f package_manager.py: Adjust error message order
Move the debug before the error (as it can take many pages.)  This makes it
much easier for the user to see the actual error message as it is still on
the screen.

(From OE-Core rev: d643fb2a9cb5bd0d8b0105e9d44b989a49ffa963)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
André Draszik
1a8e50e153 qemuboot.bbclass: don't fail on very first build
During the very first build, the DEPLOY_DIR_IMAGE
directory might not have been created yet, causing
the creation of the qemuboot.conf config file to
fail.

This is because write_qemuboot_conf() runs at
rootfs creation time, i.e. before deploy.

So let's create the directory if necessary before
trying to write the config file.

(From OE-Core rev: ee4697350a553a36ca17b9376911e56eee43a465)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Peter Kjellerstedt
dbb76e297b externalsrc.bbclass: Make reparsing work for BBCLASSEXTENDed recipes
To make sure changes to any source files are detected when externalsrc
is used, it sets BB_DONT_CACHE to force the recipe to be reparsed
every time. Previously, this was done conditionally based on whether
EXTERNALSRC was set. This worked fine for building the base recipe.
But if one tried to build, e.g., a native version of it (provided via
BBCLASSEXTEND), the recipe would not be reparsed as expected.

To solve the above problem, BB_DONT_CACHE is now set for the base
recipe if EXTERNALSRC is set for it or any of it derivatives.

(From OE-Core rev: 449a0b21255d895e8620383ce76a9d7ea41b5cc6)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Andre McCurdy
91347edaec kernel.bbclass: assign INITRAMFS_BASE_NAME using ?=
Default values for KERNEL_IMAGE_BASE_NAME and MODULE_IMAGE_BASE_NAME
are already assigned using ?= and anyone wanting to over-ride one is
likely to want to over-ride them all. Make the three consistent with
each other.

(From OE-Core rev: e30c6c93bb70d17244c90c2be12229148f8f6314)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Andre McCurdy
f5062f0dec dropbear: deterministic selection of system -vs- bundled libtom libs
Dropbear will use system versions of libtommath and libtomcrypt if
available. To make builds deterministic, add a PACKAGECONFIG option
to choose system libs or force use of the bundled versions.

Note that currently there are no libtommath or libtomcrypt recipes
in oe-core, so default to using the bundled versions.

(From OE-Core rev: b7c2edd2d6ded287d8b34dd047ae84d3fd69d4c6)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Andre McCurdy
472c245cfe dropbear: fix -ltomcrypt -ltommath order when using system libtom libs
To prevent build failures when using system libtom libraries and
linking with --as-needed, LIBTOM_LIBS should be in the order
-ltomcrypt -ltommath, not the other way around, ie libs should be
prepended to LIBTOM_LIBS as they are found, not appended.

Note that LIBTOM_LIBS is not used when linking with the bundled
libtom libs.

(From OE-Core rev: 62e96283fe77469e24e8df86c6c037c92009b00a)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Robert Yang
5637f8605f runqemu: use OECORE_NATIVE_SYSROOT from sdk
There is no STAGING_DIR_NATIVE or bitbake in a extracted sdk,
so check OECORE_NATIVE_SYSROOT and use it.

(From OE-Core rev: 93649edc034f2540ff55dc9b41638797209cfb9c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Joshua Lock
5060e66c75 runqemu: work even if a *.qemuboot.conf isn't found
A qemuboot conf file is a convenience but it should still be
possible to invoke runqemu without them, especially for examples
such as using the SDK with an extracted rootfs via NFS.

As read_qemuboot() is always called we need to be sure that function
can return cleanly, without throwing Exceptions, even if a qemuboot
conf file isn't found.

(From OE-Core rev: 3541c21f1976b517b79a19882240a8f36b970292)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Joshua Lock
239d1706b0 runqemu: try symlinks when kernel or rootfs can't be found
If the kernel or rootfs names written to the qemuboot.conf can't
be found, try and find the symlinked variant of the filename.

This will help usability of runqemu, for example where a user
downloads an image and associated files as the symlinked names
yet the qemuboot.conf variables point to the full, non-linked,
file names.

(From OE-Core rev: ca5a686c6e165a51f95cb6a834cd53f6f66d42d4)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:08 +01:00
Joshua Lock
52e04cd88b qemuboot: also write the kernel link name to the conf file
This will allow runqemu to fall back to trying the link name when
a file matching the full name can't be found.

(From OE-Core rev: 3ccbaaad75f0a53d8bcf6a5c748ec80c96a383bd)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Joshua Lock
0fd72474e7 runqemu: clarify an INFO message
Make it clearer that we are looking for a file which ends with
qemuboot.conf

(From OE-Core rev: 2579e05269a14b53a54232a8bf4414ac2dfe6472)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Joshua Lock
7352d35d73 qemuboot: write the full kernel filename, not the link name
KERNEL_IMAGETYPE gives the filename of a symlink to the kernel,
which may not be available i.e. if the user downloads some build
artefacts to run on a local machine. It's also possible that the
link will point to a newer kernel than was intended for use with
the rootfs in the qemuboot.conf.

It's much more reliable to read the name of the file
KERNEL_IMAGETYPE is linking to and assign the full filename to
QB_DEFAULT_KERNEL.

[YOCTO #10285]

(From OE-Core rev: d57bdacab13605ada4cd9e9159c18fdcd6eeacbc)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Joshua Lock
2952affc63 runqemu: add guidance to resolve issues with missing files
When a required binary cannot be found print some guidance pointing
to using a sourced OE build environment or a qemuboot.conf file,
based on a similar message from the previous shell-based runqemu.

(From OE-Core rev: 87cfb5165490cd4e7a8c2570ef5a62898db8395e)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
383a4af0e9 devtool: add: drop superfluous validation for recipe name
Now that recipeutils.validate_pn() properly validates characters used in
the name, we can drop this bit checking for '/' since that's not
permitted by validate_pn(). (The FIXME comment here - that I myself
apparently wrote - is questionable since that function was clearly never
intended to allow '/', perhaps I was misled because it was broken and
did so).

(From OE-Core rev: e010d9be3709cf3c607ffc03c3188abe4e1e9eb4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
ce1904a160 lib/oe/recipeutils: fix invalid character detection in validate_pn()
* validate_pn() is supposed to protect against invalid characters, fix
  the function so that it actually does (unanchored regex strikes
  again...)
* However, now that the function is enforcing the restrictions, we do
  still want to allow + in recipe names (e.g. "gtk+")

(From OE-Core rev: c5d5a1baf98a11676537fb5e9f8ec4409e30c1fd)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
90f925cd41 recipetool: create: support git short form URLs
In keeping with making recipetool create / devtool add as easy to use as
possible, users shouldn't have to know how to reformat git short form ssh
URLs for consumption by BitBake's fetcher (for example
user@git.example.com:repo.git should be expressed as
git://user@git.example.com/repo.git;protocol=ssh ) - instead we should
just take care of that automatically. Add some logic in the appropriate
places to do that.

(From OE-Core rev: 78c672a72f49c4b6cfd8c247efcc676b0ba1681a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
147774fc1c recipetool: create: tweak license crunching
Filter out a plain "Licensed under the XXXX license" statement, as seen
in the capnproto project (and no doubt others).

(From OE-Core rev: ba4aa319fd49ee02ce2e30c2db0f3988c0e8833c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
198c6d52c4 recipetool: create: pick up AC_PROG_SWIG
AX_PKG_SWIG is not the only commonly-used macro for detecting swig -
there's also AC_PROG_SWIG. As per AX_PKG_SWIG, add swig-native to
DEPENDS if AC_PROG_SWIG is found in configure.ac.

(From OE-Core rev: 847a1aa7153fc8a7b820353283a6f1e51d64f8de)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
1370edb449 recipetool: create: detect python autoconf macros
If python is required then we need to inherit pythonnative (or
python3native) otherwise do_configure will probably fail since it won't
be able to find python.

(From OE-Core rev: 63234cc45aee91b031657971f36997e1443f80ee)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
541c54e301 recipetool: create: fix error with git tree and no network
When creating a recipe for an existing local git clone, we attempt to
use the fetcher to determine if it supports the SRCREV variable.
Unfortunately running this code does a network check to get the latest
revision as a direct result of us using '${AUTOREV}' as a default value.
If you don't have a network connection this will of course fail. Rather
than have this block creating the recipe, catch the exception and just
guess from the URL.

Ultimately this should probably be fixed in the fetcher but for now this
will at least resolve the issue on this end.

(From OE-Core rev: f7e43f931d7d6019a3b2509b2b2635978fbbae36)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
e30276cb18 recipetool: create: fix name/version extraction from filename
I ran into an example where recipetool was getting the name/version
completely wrong:

https://bitbucket.org/sortsmill/libunicodenames/downloads/libunicodenames-1.1.0_beta1.tar.xz

>From this it would create a libunicodenames-1.1.0-beta1_1.1.0-beta1.bb
file (likely because it couldn't split the file name and therefore took
all of it, then got the version from one of the files inside the
tarball). When this happens it's just irritating because you then have
to delete the recipe / run devtool reset and then run recipetool create
/ devtool add again and specify the version manually.

This patch is the result of systematically running the
determine_from_filename() function over the files on the Yocto Project
source mirror and my local downloads directory and fixing as many of the
generic issues as reasonably practical - it now gets the name and
version correct much more often. There are still cases where it won't,
but they are now in the minority.

(From OE-Core rev: 7b018b1d493a8d10fd02b8cc220990b191c87fe5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
9aa1cf3a28 recipetool: create: improve python recipe license handling
Try to ensure that for Apache, GPL and LGPL where the values extracted
from the "Classifiers" field may not be version-specific, if there is a
versioned license in the free-form license field then use that instead.
Also insert the free-form license field as a comment in the recipe for
the user's reference.

(From OE-Core rev: 237f66042eedd906f654827b53bf9269738267ab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Paul Eggleton
3a8a0bba9b recipetool: create: fix picking up name from local python source tree
Make use of the extravalues dict to send back other variable values from
the python handling plugin, and enable passing back PV and PN. This not
only places variable values in the final recipe a bit more consistently
with other types of source, it also allows the name and version to be
picked up fron a local source tree and not just when the recipe is
fetched from a remote URL that happens to have those in it.

(From OE-Core rev: 3e7029f28c6ea9bb1d283bcdc3fdfee11455af8e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Robert Yang
6a5bd99bfc runqemu: acquire_lock() should fail when failed to open the file
The open(self.lock, 'w') may fail when the lock is created by other
users, return false for this case to let it try other devices.

Fixed:
runqemu - INFO - Running /sbin/ip link...
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
Traceback (most recent call last):
  File "/buildarea/lyang1/poky/scripts/runqemu", line 972, in <module>
    ret = main()
  File "/buildarea/lyang1/poky/scripts/runqemu", line 963, in main
    config.setup_network()
  File "/buildarea/lyang1/poky/scripts/runqemu", line 810, in setup_network
    self.setup_tap()
  File "/buildarea/lyang1/poky/scripts/runqemu", line 761, in setup_tap
    if self.acquire_lock():
  File "/buildarea/lyang1/poky/scripts/runqemu", line 182, in acquire_lock
    lock_descriptor = open(self.lock, 'w')
PermissionError: [Errno 13] Permission denied: '/tmp/qemu-tap-locks/tap0.lock'

(From OE-Core rev: f364f773a0381a75b5992c8c8a1d63a81dbd4422)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Robert Yang
286db044c3 qemuppc.conf: adjust kernel console
Fixed kernel trace when booting:
[   12.825809] random: crng init done
[   13.918323] irq 36: nobody cared (try booting with the "irqpoll" option)
[   13.924821] CPU: 0 PID: 335 Comm: getty Not tainted 4.8.0-rc5-yocto-standard #1
[   13.930492] Call Trace:
[   13.936214] [cff73f20] [c00790f0] __report_bad_irq.isra.0+0x3c/0x128 (unreliable)
[   13.941908] [cff73f40] [c0079518] note_interrupt+0x2b8/0x304
[   13.947265] [cff73f70] [c00766f4] handle_irq_event_percpu+0x5c/0x74
[   13.952503] [cff73f90] [c0076768] handle_irq_event+0x5c/0xdc
[   13.957667] [cff73fa0] [c007a29c] handle_fasteoi_irq+0xdc/0x234
[   13.962984] [cff73fc0] [c007592c] generic_handle_irq+0x3c/0x58
[   13.968288] [cff73fd0] [c0006c74] __do_irq+0x54/0x18c
[   13.973612] [cff73ff0] [c000f9c8] call_do_irq+0x24/0x3c
[   13.978742] [cf0cdb70] [c0006e40] do_IRQ+0x94/0x110
[   13.983992] [cf0cdba0] [c001215c] ret_from_except+0x0/0x14
[   13.989281] --- interrupt: 501 at pmz_set_termios+0x130/0x6d8
[   13.989281]     LR = pmz_set_termios+0xf0/0x6d8
[   13.999353] [cf0cdc90] [c049f130] uart_change_speed.isra.2+0x60/0x168
[   14.004436] [cf0cdcb0] [c049fdbc] uart_startup.part.8+0xec/0x1e0
[   14.009625] [cf0cdce0] [c04a0ab4] uart_open+0x138/0x16c
[   14.014723] [cf0cdd00] [c047e510] tty_open+0x118/0x65c
[   14.019743] [cf0cdd60] [c01894c8] chrdev_open+0xdc/0x1e0
[   14.024616] [cf0cdd90] [c01807d0] do_dentry_open+0x23c/0x358
[   14.029418] [cf0cddc0] [c0194878] path_openat+0x58c/0x1084
[   14.034054] [cf0cde50] [c01965b4] do_filp_open+0xbc/0x10c
[   14.038539] [cf0cdf00] [c01822fc] do_sys_open+0x154/0x224
[   14.043105] [cf0cdf40] [c0011a44] ret_from_syscall+0x0/0x38
[   14.047828] --- interrupt: c01 at 0xfeef5a0
[   14.047828]     LR = 0xfeef544
[   14.056543] handlers:
[   14.060980] [<c04a2b10>] pmz_interrupt
[   14.065468] Disabling IRQ #36

(From OE-Core rev: 7c6d0e4ada6dea6ac994e637b7d5cf007f73e411)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Mingli Yu
2833b4008a groff: not ship /usr/bin/glilypond
Not ship /usr/bin/glilypond and related files such
as man file /usr/share/man/man1/glilypond.1 and other
three files related to glilypond under
/usr/lib/groff/glilypond in embedded system, it is because:

- Remove the confusion about glilypond fails to run
  because it lacks dependency on File::HomeDir perl
  module

- We don't often have need for sheet music conversion
  in groff in embedded or IoT devices (glilypond
  transforms sheet music written in the lilypond language
  into the groff language using the .PSPIC request, such
  that groff can transform it into a format that can be
  displayed directly).

(From OE-Core rev: 9a0bf9567f80f06ea067189bf5c27bb5155a85b0)

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Saul Wold
e5de851697 linux-firmware: Add missing ralink-firmware License
(From OE-Core rev: 57c025ac2328482097bce6913edcd89d0d740a7c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Saul Wold
77a9472a4b linux-firmware: Correct the LICENSE setting of license packages
This change causes the licenses of the linux-firmware-*-license to be the license
that it contains instead of all the licenses of the linux-firmware package.

[YOCTO #10251]

(From OE-Core rev: 3b1423df3369e7239d1969b42e090278df8bbff2)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20 15:11:07 +01:00
Juro Bystricky
49a7839e60 build-appliance-image: Create image in correct location
Due to the recipe now using variable IMGDEPLOYDIR instead of DEPLOY_DIR_IMAGE,
the final Build Appliance image ended up being created in a wrong location.

This patch assures the final ZIP image is created in identical location as before:

   tmp/deploy/images/<machine>/Yocto_Build_Apliance.zip

[YOCTO#10274]

(From OE-Core rev: 5ac0604fdc7d5b783011c43d476210b427b5dae0)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19 08:58:10 +01:00
Ed Bartosh
5414b80e8d bitbake: cooker: check if target contains task
Task name was incorrectly added to the targets that already
contained :task suffix and fired with BuildInit event. This
caused Toaster to create incorrect Target objects and show
them in UI.

[YOCTO #10221]

(Bitbake rev: b7faf1af3bd3110fba347fbe6e432fc4ee66590a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Markus Lehtonen
088d386ddb bitbake: cookerdata: allow multiple passes of config re-parsing
[YOCTO #10188]

(Bitbake rev: 07a03a1290fd206df2b40ffc28381b5b3c10ba4a)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Markus Lehtonen
e3e239ba54 bitbake: cookerdata: fire ConfigParsed event after re-parse
[YOCTO #10188]

(Bitbake rev: ec1c951a4ee0c33acdde29e578f79ad719a34aca)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Ross Burton
359feedfd5 scripts: add tool to scan for bashisms recipe shell scripts
Shell functions in bitbake are executed with /bin/sh so should be POSIX
compliant and not use Bash extensions, or at least only use extensions that are
implemented in both dash and ash (busybox).

This tool will extract all of the shell scripts from all recipes and run them
through checkbashisms (it assumes that checkbashisms is on $PATH).

There is a whitelist to filter out false-positives such as the use of $HOSTNAME
(a bashism) in functions where we have defined it, or using the 'type' builtin
which is supported by ash/dash.

[ YOCTO #8851 ]

(From OE-Core rev: d77fe838ab7631a19e90ff4226f0712e54aa4e22)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Markus Lehtonen
a24b2fa8f8 sanity.bbclass: split out config re-parse check
Split out the functionality doing configuration re-parse check into a
separate event handler that is hooked into ConfigParsed event. This will
make config re-parsing actually work. Re-parsing in bitbake is triggered
by setting BB_INVALIDCONF whose value is checked after configuration has
been parsed (after ConfigParsed event). However, previously
BB_INVALIDCONF was set in SanityCheck event handler which caused
re-parsing never to happen.

[YOCTO #10188]

(From OE-Core rev: 8fda70bb74f7c63d393d5424436d034d2cc6c05e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Ross Burton
5fc455ec9b pulseaudio: add ${S}/LICENSE to LIC_FILES_CHKSUM
The LICENSE file describes how the various pieces are licensed, so add it to the
checksum so we notice when it changes.

(From OE-Core rev: 3309007b423654c1b021d85205f81e68cbd84475)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Peter Kjellerstedt
de154f0289 useradd_base.bbclass: Do not mess with the gshadow file in the sysroot
Previously, if the gshadow file did not exist in the sysroot when
perform_groupmems() was run, it would be temporarily created and
removed again afterwards. This was supposedly due to groupmems failing
if it does not exist.

However, based on empirical testing and examination of the source code
for groupmems, it should not fail if the gshadow file does not exist
when groupmems is started. But it WILL fail if the file is removed
sometime after its existence has been check at the beginning of the
execution, but before it needs to be modified. And this is exactly
what the previous code in perform_groupmems() could cause if multiple
tasks simultaneously modified users or groups. It could cause any of
the useradd, groupadd and groupmems commands to fail as long as at
least one other recipe invoked perform_groupmems().

(From OE-Core rev: 4fcaa484a2e8046cf3277b5d14933cdaa94a4c3f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Patrick Williams
a4f10da74a util-linux: Disable bfs support
Disable building of mkfs.bfs, which is used to create
BFS file-systems used by SCO UnixWare.  This is highly
unlikely to be utilized and there are otherwise no
references to 'bfs' throughout the rest of the tree.

(From OE-Core rev: 3226d89ff743c223181fda90f605c7579337941a)

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Patrick Williams
e88cee8cc3 util-linux: Disable minix support.
Disable building of {mkfs,fsck}.minix, which are used
to support minix file-systems.  Minix predates Linux and
support for its file-systems is unlikely to be needed.

No recipes otherwise reference minix, except in patches
to autotools configuration scripts, so there should be no
impact to other recipes.

(From OE-Core rev: fc66762d7c112fb798c2444dd902ce03baf975c4)

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Saul Wold
8d3f71234f qemuboot-x86: Add task_timeout = -1 to uvesafb
This causes the default timeout to be set to infinity, it will still report out
every 5000 milliseconds

(From OE-Core rev: fd9e1ba8f70402bd3c4b873d349057f96f5bcb19)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Ross Burton
bdb10d8358 cmake-native: rationalise system/internal library dependencies
By default cmake will auto-detect if a library is present on the host and if it
isn't present will use an internal fork.  For some libraries using the internal
fork is preferable as it can be built with less dependencies, but for others
we're either already building it or the impact of building it is comparable to
internal build.

Continue to use the internal fork of libarchive as our libarchive-native has a
large number of build dependencies.  Using the internal libarchive means that
system bzip2 and zlib must be used.

Explicitly use the internal fork of jsoncpp as we don't have this in oe-core.

Explicitly depend on curl-native, expat-native, and xz-native to ensure these
dependencies are not floating.  curl-native is a non-trivial dependency but is
comparable to building the internal fork, so there's no reason to build it
twice.

Change bzip2-native to bzip2-replacement-native as bzip2-native is
ASSUME_PROVIDED.

[ YOCTO #9639 ]

(From OE-Core rev: f9366799aaf4ad2b98345743c7129fa94d092880)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Ross Burton
04cc7ab0fb cmake: use convenience options for clarity
The intention here was "everything but jsoncpp is system provided" so use the
convenience option to ensure this remains true in the future.

(From OE-Core rev: f863b227e22b67ab239ee6124471fdc14de3f017)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Markus Lehtonen
12cd9c01fc scripts: introduce buildstats-diff
New script for comparing buildstats from two separate builds. The script
has two modes: normally it prints the differences in task execution
(cpu) times but using --ver-diff option makes it just print the recipe
version differences without any cpu time data. Other command line
options are provided to alter the sort criteria of the data and to
filter out insignificant differences and/or short tasks.

(From OE-Core rev: e707718374ce1c95769a5f99aa3bfdfc0be685b2)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:03 +01:00
Hongxu Jia
06e56abbd2 package_manager.py: fix bitbake package-index failed
Previously the following commit in oe-core move RPM metadata
from DEPLOY_DIR to WORKDIR.
-----------
commit a92c196449c516fe51786d429078bbb1213bb029
Author: Stephano Cetola <stephano.cetola@linux.intel.com>
Date:   Wed Aug 10 13:03:16 2016 -0700

    Allow for simultaneous do_rootfs tasks with rpm

    Give each rootfs its own RPM channel to use.  This puts the RPM metadata
    in a private subdirectory of $WORKDIR, rather than living in DEPLOY_DIR
    where other tasks may race with it.
-----------

In the modification of 'class RpmIndexer, it should not
directly set arch_dir with WORKDIR. It caused 'bitbake
package-index' could not work correctly.

Assign WORKDIR as input parameter at RpmIndexer initial time
could fix the issue.

(From OE-Core rev: 3c8c8501d0a19b566a94a9e06afe40642b444958)

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>
2016-09-16 15:24:02 +01:00
Shan Hai
55bb15f791 shadow: use relaxed usernames
The groupadd from shadow does not allow upper case group names, the
same is true for the upstream shadow. But distributions like
Debian/Ubuntu/CentOS has their own way to cope with this problem,
this patch is picked up from CentOS release 7.0 to relax the usernames
restrictions to allow the upper case group names, and the relaxation is
POSIX compliant because POSIX indicate that usernames are composed of
characters from the portable filename character set [A-Za-z0-9._-].

(From OE-Core rev: 31c6c8150394de067085be5b0058037077860a8a)

Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Paul Eggleton
7ba62d65d2 oeqa/sdkext/devtool: use a smaller module to test node.js functionality
The "forever" package, despite its innocent description, actually drags
in a surprising number of dependencies and as a result the nodejs test
takes up to 10 minutes as a result. Pick a different example with a much
more reasonable set of dependencies.

Addresses part of [YOCTO #10254].

(From OE-Core rev: 638ee71da967f093071ba25e0ea5c467dab65339)

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>
2016-09-16 15:24:02 +01:00
Andre McCurdy
f9b18c398a makedevs: don't restrict device node paths to 40 characters
40 character paths work OK for device nodes in /dev but not for
device nodes created in a chroot, LXC container, etc.

Since the 'path' array is already a 4k buffer, the sscanf 40
character limit seems to be a typo or historical mis-merge. Update
the sscanf limit and bring the code in sync with the Buildroot
version:

  https://git.buildroot.net/buildroot/commit/?id=8876b6751e0bc19a3754290061808f0f8420708e

(From OE-Core rev: e8022d00c34e37300c1c06f712c7ced5e03d2a57)

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>
2016-09-16 15:24:02 +01:00
bavery
92862c678f qemurunner: print out the runqemu command
This logs the launch command that was used for runqemu while running -c
testimage.  This way, if I'd like to easily launch qemu manually in
order to debug a failed test, I know what commmand was run to create
the qemu instance.

(From OE-Core rev: 34aa20c6f323bbf7ad53beb643126e4e03634708)

Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Mariano Lopez
d0b4ac310b cve-check.bbclass: Add class
This class adds a new task for all the recipes to use
cve-check-tool in order to look for public CVEs affecting
the packages generated.

It is possible to use this class when building an image,
building a recipe, or using the "world" or "universe" cases.

In order to use this class it must be inherited and it will
add the task automatically to every recipe.

[YOCTO #7515]

Co-authored by Ross Burton & Mariano Lopez

(From OE-Core rev: d98338075ec3a66acb8828e74711550d53b4d91b)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Mariano Lopez
189673244b cve-check-tool: Add recipe
cve-check-tool is a program for public CVEs checking.
This tool also seek to determine if a vulnerability has
been addressed by a patch.

The recipe also includes the do_populate_cve_db task
that will populate the database used by the tool.

[YOCTO #7515]

(From OE-Core rev: 5deadfe634638b99420342950bc544547f7121dc)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Ross Burton
08dc55ce84 cmake: don't inherit autotools
cmake doesn't use autotools, the functions get replaced by either cmake.bbclass
(target) or the recipe itself (native) leaving just lots of superfluous
dependencies.

(From OE-Core rev: b8700e9fd30317d0ad583febb4e6f385284bdd51)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Zubair Lutfullah Kakakhel
84e0260e03 openssl: Fix MIPS64be and add MIPS64le
MIPS64 target was being configured for linux-mips which defaults to
MIPS32. Doesn't cause any issue as far as I can see but it would be
wiser to use the correct target configuration.

Also add MIPS64le configuration which is missing.

(From OE-Core rev: 0afec72913bc31d315cba079da317e8b28755ded)

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Ross Burton
a7a6d05579 oeqa/oetest: show stderr when running commands
To help debug failures, redirect stderr to stdout in oeSDKTest.run() and
oeSDKExtTest.run().

(From OE-Core rev: 4cd143e0de7f0082f60f273f442f6255f28ec3e7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Ross Burton
cfe4112347 sanity: make license QA failures fatal again
Previous work to clean up the license QA code (oe-core fbdf977) had the side
effect that failing the license sanity check (bad or missing LIC_FILES_CHKSUM)
would emit an error message but wouldn't actually abort the build.

Solve this by changing populate_lic_qa_checksum() so that it tracks if the
message class was in ERROR_QA and if so, aborts the function.

[ YOCTO #10280 ]

(From OE-Core rev: 5ba1a7505b904a4aa2118fa9614d76df97597af8)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Richard Purdie
2a2634e10d openjade/sgml-common: Add sstate postrm commands
If you bump the PR of sgml-common and openjade-native but not sgml-
common-native, you will see a failure as files were removed from the
sysroot but still referenced by the sgml docbook catalog.

To properly handle this, the clean function needs to run at sstate
removal time, the problem is that this sstate removal can happen when
the metadata isn't present, so the correct removal commands are
unknown.

To avoid this, we need to write the commands into a "postrm" script
when we install the files, this can then be executed at sstate removal
time.

[YOCTO #8273]

(From OE-Core rev: cdae3e76232110903d124195b036e4e70fb28aa4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Richard Purdie
0573dceb7b sstate: Add postrm command support
There are some issues in sstate which can't be handled by file removal
alone. Currently there is no way to execute a command against sstate and
doing so is potentially problematic for things like dependencies. This
patch adds a mechanism where any "postrm" script is executed if its present
allowing some openjade/sgml issues to be resolved.

[YOCTO #8273]

(From OE-Core rev: 2268efd0cd3ddb40870c4c424d10444ba86d2849)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 15:24:02 +01:00
Richard Purdie
0c1b8bf549 bitbake: Add missing file from 'toaster: Allow git information to be null for BRLayer'
(Bitbake rev: 3c762873bb8dc8a3cf89b26579a38d58f6731e04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16 14:36:03 +01:00
Richard Purdie
53b1fa2d3e bitbake: build: Allow dirs/cleandirs to work for empty functions
Users are surprised when dirs/cleandirs aren't acted upon for
empty functions. This reorders the code slightly so that those
flags are acted upon for empty functions as there are cases where
this is expected.

[YOCTO #10256]

(Bitbake rev: 5bf874673d75b5f4ff2b34f0ab8502558ee84d00)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Ulf Magnusson
c3f630df52 bitbake: bitbake: fetch2: Make SRCREV_FORMAT name substitution safer
The implementation of SRCREV_FORMAT has at least two issues:

 1. Given two names "foo" and "foobar" and SRCREV_FORMAT = "foo_foobar",
    "foo" might currently get substituted twice, and "foobar" not at
    all.

 2. If the revision substitued for some name happens to contain another
    name as a substring, then that substring might incorrectly get
    replaced.

Fix both issues by sorting the names with the longest ones first and
replacing all names at once with a regular expression. This was inspired
by
http://stackoverflow.com/questions/6116978/python-replace-multiple-strings.

(Bitbake rev: 8e6a893cb7f13ea14051fc40c6c9baf41aa47fee)

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Paul Eggleton
d5698c0afc bitbake: fetch2/npm: don't download same URL multiple times
If we've already fetched a particular URL then we do not need to do so
again within in the same operation. Maintain an internal list of fetched
URLs to avoid doing that.

(Bitbake rev: b4705c80add1f618c11a9223cdd9578d763b50ec)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Ed Bartosh
d649c64beb bitbake: event.py: output errors and warnings to stderr
All logging messages are printed on stdout when processing
UI event queue. This makes it impossible to distinguish between
errors and normal bitbake output. Output to stderror or stdout
depending on log level should fix this.

(Bitbake rev: 56ac0d4c7a5f47aeb707b15a0c305d9f73aae945)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Aníbal Limón
62c45ffbc7 oeqa/utils/decorators: LogResults fix race condition in linkfile
In order to avoid race condition when test if exists the linkfile
use bb.utils.lock, the best solution is to create a unique name
for the link file.

There is no way to create a unique linkfile name at this decorator
because is needed the machine and image variables, those variables
can't be passed easily in this code.

To avoid broke test export functionality use a try/except because bb
isn't available when use test export

[YOCTO #10225]

(From OE-Core rev: 059d475b6bce1e5414170a4fe2e7989f6b0eacd6)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Humberto Ibarra
b28e6d6039 oe-selftest: check for coverage version before starting tests
python coverage versions lower than 4.x have problems with some distros. Adding the 4.x version as requirement to continue with coverage tracking.

[YOCTO #10207]

(From OE-Core rev: a378b817504986173c4b0984a28aead247589b3f)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Andre McCurdy
405262dbb1 image.bbclass: add IMAGE_DEVICE_TABLE to rootfs[vardeps]
IMAGE_DEVICE_TABLE and IMAGE_DEVICE_TABLES are both referenced by
_create_devfs, therefore ensure that rootfs is rebuilt if changes
are made to either variable.

(From OE-Core rev: 06092cee0dc8c7cd2408ddfa9e9dc43fd9dfea2e)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Ed Bartosh
f7367de2ad create-pull-request: remove output directory
When 'git request-pull' fails it makes sense to remove output
directory. Otherwise create-pull-request will complain that
output directory already exists on the next run.

(From OE-Core rev: 8535784ba84060e0e7ca05e7771a58f9c70c69b9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Christian Schuler
5b5c426225 ptest-runner: allow building from externalsrc
The ${WORKDIR}/git refers to the source folder S which is different in
the case of an external source build.

(From OE-Core rev: fd4f4264a99cb0f8d20e3d87f66102d99cb5b6ad)

Signed-off-by: Christian Schuler <schuler.christian@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Fabio Berton
d03439e0db patchelf: Update to version 0.9
* Remove patch maxsize.patch already applied upstream.

 * Add patch Skip-empty-section-fixes-66.patch to prevent errors like:

  /
  |ERROR: go-cross-1.6.2-r0 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', '/home/user/src/prj/build/tmp/sysroots-uninative/
  |x86_64-linux/lib/ld-linux-x86-64.so.2', '/home/user/src/prj/build/tmp/
  |work/x86_64-linux/go-cross/1.6.2-r0/sstate-install-populate_sysroot/x86_64-
  |linux/usr/bin/aarch64-prj-linux/go')'
  |failed with exit code 1 and the following output:
  |cannot find section .rela.dyn
  \

  * Add patch handle-read-only-files.patch to fix error when building
    eSKD, the following error appears on task do_testsdkext

  /
  |ERROR: db-native-6.0.30-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', 'src/fsl-community-bsp/build/tmp/work/qemuarm-poky-linux-
  |gnueabi/core-image-minimal/1.0-r0/testsdkext/tc/tmp/sysroots-uninative/
  |x86_64-linux/lib/ld-linux-x86-64.so.2', 'src/fsl-community-bsp/build/tmp/work/
  |qemuarm-poky-linux-gnueabi/core-image-minimal/1.0-r0/testsdkext/tc/tmp/work/
  |x86_64-linux/db-native/6.0.30-r1/sstate-install-populate_sysroot/x86_64-linux/
  |usr/bin/db_tuner')' failed with exit code 1 and the following output:
  |b'open: Permission denied\n
  \

  * Add patch Increase-maxSize-to-64MB.patch to fix error described
  bellow, the same issue is discussed here:
    - https://github.com/NixOS/patchelf/issues/47

  /
  |ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
  |'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
  |ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
  |sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
  |failed with exit code 1 and the following output:
  |warning: working around a Linux kernel bug by creating a hole of 36032512
  |bytes in ‘../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
  |sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
  |maximum file size exceeded
  \

(From OE-Core rev: 18efcbcb896239c64fedd009ce57f3f0c668cbc0)

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Juro Bystricky
a6f0bced4c busybox: Avoid race building libbb
When building busybox, an occasional error was observed.
The error is consistently the same:

libbb/appletlib.c:164:13: error: 'NUM_APPLETS' undeclared (first use in this function)
  while (i < NUM_APPLETS) {

The reason is the include file where NUM_APPLETS is defined is not yet generated (or is being modified)
at the time libbb/appletlib.c is compiled.
The attached patchset fixes the problem by assuring libb is compiled as the last directory.

[YOCTO#10116]

(From OE-Core rev: a866a05e2c7d090a77aa6e95339c93e3592703a6)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
Alejandro Hernandez
de915fb7d3 linux-yocto: Adds new bbappend for genericx86 and genericx86-64 BSPs to support kernel 4.8
(From meta-yocto rev: a96837d7bc42b8710ca5ac687191f03540279fad)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:41 +01:00
Richard Purdie
56a4900273 Revert "oeqa.runtime.smart: work around smart race issues"
We have a proper fix now so we can remove the workaround.

This reverts commit 4d268abc2fc892c5d34449f78c8e9f2b1a9d6bac.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:13 +01:00
Jussi Kukkonen
0825fcf700 libdrm: Explicitly disable cunit tests
Add patch to control building cunit-tests explicitly. Disable
them in the recipe.

Fixes [YOCTO #9849].

(From OE-Core rev: cd287235fc5b9d0c174a10a89e31ffd391806113)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:13 +01:00
Jussi Kukkonen
2e8c59d059 piglit: Backport linker flag patch
Use the correct build system patch instead of adding linker flags
in recipe. Also update upstream status for the other build patch.

Fixes [YOCTO #9851].

(From OE-Core rev: cd67959c4794b132cb9fd20a2a37cf862e172bed)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:13 +01:00
Robert Yang
26e46e6d90 runqemu: fix a race issue on lockdir
There might be a race issue when multi runqemu processess are
running at the same time:
| Traceback (most recent call last):
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 920, in <module>
|     ret = main()
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 911, in main
|     config.setup_network()
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 760, in setup_network
|     self.setup_tap()
|   File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 697, in setup_tap
|     os.mkdir(lockdir)
| FileExistsError: [Errno 17] File exists: '/tmp/qemu-tap-locks'

(From OE-Core rev: ec33043477a0b915b0911f7d7eacb24361e4aaa8)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:13 +01:00
Markus Lehtonen
edc92ea8de python-smartpm: use md5 as the digest for rpm_sys channel
Use md5 sum instead of mtime as the "digest" method for rpm_sys channel.
The digest is used to determine if the channel has been updated. It was
found out that mtime was not a reliable digest. On some systems mtime
of the rpm db does not get updated after every transaction if transactions
(smart install / remove commands) are fired in quick succession. As a
consequence smartpm cache and rpm db get out of sync.

[YOCTO #10244]

(From OE-Core rev: e7267b4e78461e71a1175f93e2eb5e90272c2b47)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:13 +01:00
Paul Eggleton
3f95a21c71 lib/oe/copy_buildsystem: fix building eSDK with indirect paths in BBLAYERS
Indirect paths (e.g. ${TOPDIR}/../meta-something) do generally work if
used in BBLAYERS in bblayers.conf. However, if you built an extensible
SDK with this configuration then the creation of the workspace within
the SDK using devtool in do_populate_sdk_ext failed. This is because
the copy_buildsystem code was no longer correctly recognising that the
core layer ("meta") was part of a repository (e.g. openembedded-core /
poky) that should be shipped together - because of the indirection - and
thus it was splitting out the meta directory, and a number of places in
the code assume that the meta directory is next to the scripts
directory. Use os.path.abspath() to flatten out any indirections.

(From OE-Core rev: 7c0788cd2390fd0e1ec84bc9dbebcb67daee429f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:13 +01:00
Paul Eggleton
ca107522eb classes/populate_sdk_ext: ensure we clean the right temporary TMPDIR path
After we run the build system within the eSDK internally as part of the
sstate filtering that happens during do_populate_sdk_ext, we need to
ensure that the TMPDIR created during that process gets deleted. However
we were using the TMPDIR path for the build producing the eSDK which may
not be the same (since that value would typically be filtered out) thus
if the user had set TMPDIR to something other than the default, the
temporary TMPDIR would not be deleted which not only led to extraneous
junk entering the SDK but also failures during install because the
TMPDIR path was different. In order to fix this, force TMPDIR to a known
value during the sstate filtering run so we know what to delete
afterwards.

Fixes [YOCTO #10210].

(From OE-Core rev: 038d9db66e69c9de12eb8581acb28a8facd726b6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Richard Purdie
533315b747 eudev: Add missing pkgconfig dependencies
Building eudev from scratch in an sstate build results in configure errors
since the pkg-config macros can't be found. Add in a missing pkg-config
dependency using the appropriate class to avoid such failures.

(From OE-Core rev: 6b527bbfea5088c20da98cd72abe5caa4b399787)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Richard Purdie
c77f114e24 autotools: Correctly filter m4 files view to setscene dependencies
Currently when you run builds from sstate, you can see warnings like:

WARNING: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_configure: /data/poky-master/tmp-glibc/sstate-control/manifest-intel-corei7-64-glibc-initial.populate_sysroot not found
WARNING: systemd-1_230+gitAUTOINC+3a74d4fc90-r0 do_configure: /data/poky-master/tmp-glibc/sstate-control/manifest-intel-corei7-64-libgcc-initial.populate_sysroot not found

This is due to co_configure wanting to copy a limited number of m4 macros,
only listed in a recipes DEPENDS but that set is still larger than the set of
recipes which get restored from sstate.

For build determinism and to avoid these warnings, we need to make this
function match what the sstate code does. We really don't want to duplicate
the functionality since keeping things in sync would be hard so we create
a data structure which can be passed into the same underlying function,
setscene_depvalid().

[YOCTO #10030]

(From OE-Core rev: 37ffb1f7d812e40d6fa23b44782eaa8436d9ab76)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
André Draszik
1373b52896 kernel-yocto: remove do_shared_workdir from SRCTREECOVEREDTASKS
Various recipes depend on the kernel's do_shared_workdir
task, a quick grep suggests all external kernel modules
(via module.bbclass), but also perf, and potentially any
additional headers as outlined in linux-libc-headers.inc
are affected.

Having do_shared_workdir in SRCTREECOVEREDTASKS means this
task is removed when externalsrc is enabled, making all
those recipes fail as the task they depend on,
virtual/kernel:do_shared_workdir, doesn't exist.

Remove do_shared_workdir from SRCTREECOVEREDTASKS so that
all those recipes work even if externalsrc is activated.

According to the comment in here, the reason for
do_shared_workdir to be removed as a task is because it
modifies the source tree, but that doesn't seem to be
case.

(From OE-Core rev: 29e99d7a57803e450920600b5d35c5b4e58a0ede)

Signed-off-by: Andre Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Bruce Ashfield
55dd3fa425 linux-yocto/4.1: update to 4.1.32
Integrating the korg stable update

(From OE-Core rev: b9502470ec6413f85d76f88ebd121db9796985d2)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Bruce Ashfield
15426896a7 linux-yocto/4.4: update to 4.4.20
Integrating the korg -stable release.

(From OE-Core rev: 85c9fbc70c99611ed8d6d4f23d3a31b4f6fd7e50)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Bruce Ashfield
757671553b linux-yocto/4.8: update to v4.8-rc6
(From OE-Core rev: ed5ac04aa3bf10b9bf5047012d67a38f5ff89cef)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Alexander Kanavin
f08aeff228 gtk-doc: require perl-native only if api-documentation feature is enabled
This should reduce build times.

(From OE-Core rev: 74d9c5eb858bfe1dd16826b74be3af71bb1956d9)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
André Draszik
04e3dc6d3b image.bbclass: also mask debugfs versions of masked images
When IMAGE_GEN_DEBUGFS is enabled, and IMAGE_FSTYPES_DEBUGFS is left
at its default (as suggested by local.conf.sample.extended),
recipe parsing fails:

  bitbake kern-tools-native # or anything else for that matter
  ERROR: <poky.git>/meta/recipes-core/images/build-appliance-image_15.0.0.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'debugfs_vmdk' - possibly invalid type name or missing support class
  ERROR: Failed to parse recipe: <poky.git>/meta/recipes-core/images/build-appliance-image_15.0.0.bb

  Summary: There was 1 WARNING message shown.
  Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

i.e. bitbake doesn't even finish parsing...

Since IMAGE_FSTYPES_DEBUGFS is based on IMAGE_FSTYPES, and
since the build-appliance-image is setting IMAGE_FSTYPES
to vmdk, image.bbclass/image_types.bbclass will be trying
to build a debugfs_vmdk, causing the error, as this is not
implemented.

One solution to solving this problem could be as simple as
adding a line
  IMAGE_FSTYPES_DEBUGFS_remove = "vmdk"
to the build-appliance-image recipe, but that is very
specific to the error encountered and carries the risk of
the error being reintroduced in another recipe.

Another solution could be to add 'debugfs_vmdk' to
IMAGE_TYPES_MASKED in image-vm.bbclass, but again, this
approach doesn't seem generic enough.

None of the live and vm type images have an implementation
for building a debugfs version, it doesn't seem to make
sense to build debugfs versions of any of them anyway, and
given IMAGE_TYPES_MASKED appears to be intended for those
image types exclusively, it seems the right approach is to
unconditionally also mask all debugfs_ flavours from
IMAGE_TYPES_MASKED to achieve a generic solution.

Do that so.

(From OE-Core rev: 9bd682c4f1c19d68c573c11822888ee799809272)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
André Draszik
dd50dec2f4 image.bbclass: do not check size of the debugfs image
The debugfs is supposed to be used in addition to the
normal image for debugging purposes, it doesn't make
sense to artificially limit its maximum size.

(From OE-Core rev: 7cdf3b2444df8cd322d9eff1bdbdc5adddcaf22a)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Zubair Lutfullah Kakakhel
5d13da49de valgrind: MIPS: Make toolchain basename generic
For the hard float case, COMPATIBLE_HOST should be set to ".*-linux"
since OE can support multiple distro layers, not just poky.

(From OE-Core rev: ddcb08c6a8cb2187e98aa225b86777bb52c1d21e)

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Markus Lehtonen
f6030023fc gst-player: specify PV
Define PV in order to avoid package version being plain "git". Use the
version number found from configure.ac plus the git revision.

(From OE-Core rev: 9d4734412c45ef80195707900b1dfdf843f43228)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Max Krummenacher
f5e2dafcb8 sstate.bbclass: normalize whitelisted paths
Without this a whitelisted path containing /../ breaks the test for a file
allowed to be provided by more than one recipe.

Noticed when local.conf contains:
DEPLOY_DIR = "${TOPDIR}/../deploy"

|ERROR: core-image-minimal-1.0-r0 do_image_complete: The recipe
| core-image-minimal is trying to install files into a shared area when those
| files already exist. Those files and their manifest location are:
| .../poky/deploy/images/qemux86/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
| Matched in b'manifest-qemux86-linux-yocto.deploy'

(From OE-Core rev: d82acf20541463b14a811788d28fb1db3539885b)

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:11 +01:00
Carlos Rafael Giani
d115b1277f gstreamer1.0-plugins-good.inc: Fix libv4l2 packageconfig dependency
(From OE-Core rev: 58d6cd369a3316a6ba313a2f1982bde5d47c0608)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:10 +01:00
Amarnath Valluri
05602d9c48 classes/populate_sdk_ext: exclude image tasks from locked signatures
Tasks for image recipes cannot be locked and should be excluded from eSDK
generated locked-sigs.inc. get_sdk_install_targets() was not returning right
image targets to be excluded incase of 'minimal' sdk. This change fixes the issue.

(From OE-Core rev: 46401034f017d234833997d2fb3122190f9029bf)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:09 +01:00
Ross Burton
7c2d197572 classes/gobject-introspecton-data: lazy assign GI_DATA_ENABLED
By letting a recipe assign GI_DATA_ENABLED trivially there is a simple and clear
way to disable gobject-introspection for specific build configurations.

(From OE-Core rev: 75a5297369c7b04cef098e2a76f7f8f4781764aa)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:08 +01:00
Ross Burton
fc9ddc2459 classes/gtk-doc: lazy assign GTKDOC_ENABLED
By letting a recipe assign GTKDOC_ENABLED trivially there is a simple and clear
way to disable gtk-doc for specific build configurations.

(From OE-Core rev: 201e069625e3623ff71864f969664c6d5d3b1801)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:08 +01:00
Robert Yang
02e6c1e520 meta: cleanup d.getVar(var, 0)
(From OE-Core rev: 33b0d940b09a5ce1462476614213a58d3d62e80d)

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>
2016-09-14 22:22:07 +01:00
Robert Yang
b8e2bab119 meta: cleanup d.getVar(var, 1)
(From OE-Core rev: 79fe476be233015c1c90e9c3fb4572267b5551d1)

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>
2016-09-14 22:22:07 +01:00
bavery
32b8267203 testimage: add createrepo-native to testimage depends
The smart tests need createrepo to be in the native sysroot. It needs
to be one of the depends for testimage.

(From OE-Core rev: 2f1a44d33d9ecceef69d11ef92c5369314cb3bf5)

Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Carlos Rafael Giani
564a0d782d gstreamer1.0-plugins-bad: Fix packageconfigs and patches
This reintroduces fixes and changes which were introduced in the original
gstreamer1.0-plugins-bad 1.8.1 upgrade commit.

* packageconfigs changed since GStreamer 1.6.3
  (they often do between minor version increases like 1.6 -> 1.8)
* hls,tinyalsa packageconfigs moved into the .inc file
* vulkan packageconfig dropped since there are no vulkan libraries in OE
  (libxcb alone is not enough)
* reintroduced glimagesink downrank patch (it was removed because it was
  dangling before)
* fixed patch line numbers

(From OE-Core rev: ca3f9fbe21407685ed09c60bc4b991b5c6b448f4)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Maxin B. John
473a47974c gstreamer1.0-omx: inherit upstream-version-is-even
Since gstreamer1.0-omx follows the GStreamer versioning style, inherit
upstream-version-is-even for checking the upstream version of the package.

(From OE-Core rev: d4c40d7fed89435dcf6c883343adeff37153f19e)

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>
2016-09-14 22:22:07 +01:00
Ed Bartosh
32d14e304b bitbake.conf: Add BBSERVER to HASHBASE_WHITELIST
Using BBSERVER variable in checksum calculations causes
unnecessary rebuilds when running memres bitbake.

Whitelisted BBSERVER variable to prevent this unwanted
behaviour.

[YOCTO #10201]

(From OE-Core rev: c9d949053cc0de1d8fbf8be2fa7c2cc30383ea51)

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>
2016-09-14 22:22:07 +01:00
Edwin Plauchu
2c7849fdcb oeqa: Remove linux user utilized for rpm test.
When trying to re-test smart rpm tests. A fail arises
due to a linux user previously created upon the image.
We've added a few lines to delete such user and his home dir
when finishing test.

[YOCTO #9204]

(From OE-Core rev: d1a80ac434bb798634bbb792ff7df59148ec26be)

Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Markus Lehtonen
0736079dc6 oeqa.buildperf: another fix for splitting 'nevr' string
When processing buildstats we determine recipe name, epoch, version and
revision from the per-recipe buildstat directory name.  One previous
patch made an assumption that package version starts with a number.
That might not be true because of a packaging mistake or whatever
reason. Thus, if a version starting with a number is not found, fall
back to the "old" method of just taking the second-last dash-delimited
part (the one before revision).

(From OE-Core rev: 936eb9aac055f1d4f41bb351477a0f5bebf76a0e)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Maxin B. John
6b889ff46e libical: fix build failure after changing machine
libical build QA fails when libical is built for e.g. qemux86-64 already, and
is then built for generic86-64 in a way that install is re-run:

$ MACHINE=qemux86-64 bitbake libical
$ MACHINE=genericx86-64 bitbake -f -Cinstall libical

ERROR: libical-2.0.0-r0 do_populate_sysroot: QA Issue: libical.pc failed
sanity test (tmpdir) in path

[YOCTO #10223]

(From OE-Core rev: 0445e68fdbbba5c4efb6422c89ee864e4273b114)

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>
2016-09-14 22:22:07 +01:00
Jussi Kukkonen
25468b58a5 tiff: Update download URL
remotesensing.org domain has been taken over by someone unrelated.
There does not seem to be an up-to-date tiff homepage, but
osgeo.org is a reliable download site.

(From OE-Core rev: f544e1d10e9dc0f750efdb45a78ce9d5c9603070)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Ross Burton
03fa8209e4 rpm: remove redundant removals
These were noticed by the use of bashisms (rm *.{foo,bar}) and lots of these rm
commands are deleting files which don't exist in the first place.

(From OE-Core rev: 52182efe70a8fb59b5640cd1cf2bdb55e77c0076)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
059c5568a1 glibc: remove hard-coded reference to gcc -E
(From OE-Core rev: 2c0a72d4e7eafee225e702f4c91cd206bc05ec55)

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
d4583c98fa libpcre: explicitely specify CCLD_FOR_BUILD for this recipe
libpcre uses CCLD_FOR_BUILD as the name of the host command to use for
linking. This is not a standard autotools symbol but particular to this
recipe. We need to set it explicitely

(From OE-Core rev: 07023dcf5ab15d69a336b96b73e2b0089300727f)

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
c14dc1a130 rpm: manually cleanup sysck
version 5.4.1 of rpm was not properly distclean before release, which
causes problems when cross-compiling.

The previous version this recipe called make distclean, but that would
trigger a call to ./configure which would fail when no gcc is
available and make the whole do_configure fail further down the line

This patch manually removes the files from the recipe.

(From OE-Core rev: 6c9f61233f64356291a0c42761a833f3b151114c)

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
cc27fa238f sanity: fix hardcoded references to gcc
(From OE-Core rev: 89f55bf8e9d633cfb508a0885a462afb561c7cee)

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
9da9abdd4d busybox: allow overriding compiler name in KConfig
The KConfig infrastructure needs to build HOST binaries in order to
provide its infratstructure. Yocto needs to force the HOSTCC and HOSTCPP
variables to BUILD_CC and BUILD_CPP to make sure that the proper compiler
is used when compiling host binaries

(From OE-Core rev: 50fb24c889b6add053a5638a7367a8896dfebd8a)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
3e6f3e09a3 linux-libc-headers: allow overriding compiler name in KConfig
The KConfig infrastructure needs to build HOST binaries in order to
provide its infratstructure. Yocto needs to force the HOSTCC and HOSTCPP
variables to BUILD_CC and BUILD_CPP to make sure that the proper compiler
is used when compiling host binaries

(From OE-Core rev: 4676525795c565855cadd992e4be68eba6bc8b01)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
270f4232ac linux-yocto: allow overriding compiler name in KConfig
The KConfig infrastructure needs to build HOST binaries in order to
provide its infratstructure. Yocto needs to force the HOSTCC and HOSTCPP
variables to BUILD_CC and BUILD_CPP to make sure that the proper compiler
is used when compiling host binaries

(From OE-Core rev: c710401a2af6488b38565e8ef32b48ed1cd0aa69)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Jérémy Rosen
ddc7bd795b cross: export CC family from BUILD_* for cross compilers
cross-compilers are native recipes that need to be compiled by the host's
compiler. However they do not use native.bbclass

As a consequence, the various CC, CXX etc environment variables are not
correctly set and they will not honor the host compiler name provided
by the BUILD_* variables.

(From OE-Core rev: 110cc22614f92e848bbba9ecaa5e6f089f9a2749)

Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Nicolas Dechesne
a1bcc483d2 gstreamer1.0-plugins-good: enable v4l2-probe
A new mechanism to probe v4l2 M2M devices was implemented in gst 1.8 series, in
order to get such devices probed we now need to enable v4l2-probe compile option
which upstream decided to keep disabled by default (unfortunately), see [1].

With this feature disabled, it is not possible to get v4l2 M2M device to work in
Gstreamer which is a common use case on many embedded platforms. This patch
enables this new option as soon as v4l2 support is enabled in gstreamer -good.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=758085

(From OE-Core rev: c1f08c04a95f6ec089d4a62d90119df01c94cd80)

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>
2016-09-14 22:22:07 +01:00
Marek Vasut
2b92328c5e u-boot: Set u-boot binary permissions to 0644
The U-Boot binary is not an executable, it is a binary file,
set it's permissions to 0644 instead of 0755.

(From OE-Core rev: b75ef17a7cba1791b077968893ebd4a297547fd1)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:07 +01:00
Joe Slater
5f8c1686a8 useradd: do not delete users and groups during configure
If two recipes both create the same users and groups, the
second recipe can delete items created by the first causing
things like "chown" to fail for the first recipe.

(From OE-Core rev: 936150306cb13022edcadf862947c357932e80ee)

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>
2016-09-14 22:22:07 +01:00
Richard Purdie
996aaf93ff oeqa/parselogs: Don't use cwd for file transfers
If you run:

MACHINE=A bitbake <image> -c testimage
MACHINE=B bitbake <image> -c testimage

and A has errors in parselogs, machine B can pick these up and cause
immense confusion. This is because the test transfers the log files
to cwd which is usually TOPDIR. This is clearly bad and this patch
uses a subdir of WORKDIR to ensure machines don't contaminate each
other.

Also ensure any previous logs are cleaned up from any existing
transfer directory.

(From OE-Core rev: ac8f1e58ca3a0945795087cad9443be3e3e6ead8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:06 +01:00
Joshua Lock
4359f8cce6 poky: add Fedora-24 to SANITY_TESTED_DISTROS
We've had a builder in the Yocto Project Autobuilder cluster
using Fedora 24 for some time now, I think it's safe to say it's
tested.

(From meta-yocto rev: 8774ecd08f36858db3f047b41d91113ed20aa6be)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-13 15:16:15 +01:00
Alexander Kanavin
ece1156d3e maintainers.inc: add missing recipes
(From meta-yocto rev: 34e7bda499e870601cec044e6a63c83ceca4050c)

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>
2016-09-13 15:16:15 +01:00
224 changed files with 5192 additions and 1522 deletions

View File

@@ -44,6 +44,21 @@
VARIABLE = " "
</literallayout>
</para>
<para>
You can use single quotes instead of double quotes
when setting a variable's value.
Doing so allows you to use values that contain the double
character:
<literallayout class='monospaced'>
VARIABLE = 'I have a " in my value'
</literallayout>
<note>
Unlike in Bourne shells, single quotes work identically
to double quotes in all other ways.
They do not suppress variable expansions.
</note>
</para>
</section>
<section id='variable-expansion'>
@@ -1228,7 +1243,7 @@
</literallayout>
For methods you can use with anonymous Python functions,
see the
"<link linkend='accessing-datastore-variables-using-python'>Accessing Datastore Variables Using Python</link>"
"<link linkend='functions-you-can-call-from-within-python'>Functions You Can Call From Within Python</link>"
section.
For a different method to run Python code during parsing,
see the
@@ -2082,102 +2097,130 @@
</section>
</section>
<section id='accessing-datastore-variables-using-python'>
<title>Accessing Datastore Variables Using Python</title>
<section id='functions-you-can-call-from-within-python'>
<title>Functions You Can Call From Within Python</title>
<para>
It is often necessary to access variables in the
BitBake datastore using Python functions.
The Bitbake datastore has an API that allows you this
access.
Here is a list of available operations:
BitBake provides many functions you can call from
within Python functions.
This section lists the most commonly used functions,
and mentions where to find others.
</para>
<para>
<informaltable frame='none'>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname='c1' colwidth='1*'/>
<colspec colname='c2' colwidth='1*'/>
<thead>
<row>
<entry align="left"><emphasis>Operation</emphasis></entry>
<entry align="left"><emphasis>Description</emphasis></entry>
</row>
</thead>
<tbody>
<row>
<entry align="left"><filename>d.getVar("X", expand)</filename></entry>
<entry align="left">Returns the value of variable "X".
Using "expand=True" expands the value.</entry>
</row>
<row>
<entry align="left"><filename>d.setVar("X", "value")</filename></entry>
<entry align="left">Sets the variable "X" to "value".</entry>
</row>
<row>
<entry align="left"><filename>d.appendVar("X", "value")</filename></entry>
<entry align="left">Adds "value" to the end of the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.prependVar("X", "value")</filename></entry>
<entry align="left">Adds "value" to the start of the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.delVar("X")</filename></entry>
<entry align="left">Deletes the variable "X" from the datastore.</entry>
</row>
<row>
<entry align="left"><filename>d.renameVar("X", "Y")</filename></entry>
<entry align="left">Renames the variable "X" to "Y".</entry>
</row>
<row>
<entry align="left"><filename>d.getVarFlag("X", flag, expand)</filename></entry>
<entry align="left">Returns the value of variable "X".
<section id='functions-for-accessing-datastore-variables'>
<title>Functions for Accessing Datastore Variables</title>
<para>
It is often necessary to access variables in the
BitBake datastore using Python functions.
The Bitbake datastore has an API that allows you this
access.
Here is a list of available operations:
</para>
<para>
<informaltable frame='none'>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname='c1' colwidth='1*'/>
<colspec colname='c2' colwidth='1*'/>
<thead>
<row>
<entry align="left"><emphasis>Operation</emphasis></entry>
<entry align="left"><emphasis>Description</emphasis></entry>
</row>
</thead>
<tbody>
<row>
<entry align="left"><filename>d.getVar("X", expand)</filename></entry>
<entry align="left">Returns the value of variable "X".
Using "expand=True" expands the value.</entry>
</row>
<row>
<entry align="left"><filename>d.setVarFlag("X", flag, "value")</filename></entry>
<entry align="left">Sets the named flag for variable "X" to "value".</entry>
</row>
<row>
<entry align="left"><filename>d.appendVarFlag("X", flag, "value")</filename></entry>
<entry align="left">Appends "value" to the named flag on the
variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.prependVarFlag("X", flag, "value")</filename></entry>
<entry align="left">Prepends "value" to the named flag on
the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.delVarFlag("X", flag)</filename></entry>
<entry align="left">Deletes the named flag on the variable
"X" from the datastore.</entry>
</row>
<row>
<entry align="left"><filename>d.setVarFlags("X", flagsdict)</filename></entry>
<entry align="left">Sets the flags specified in
the <filename>flagsdict()</filename> parameter.
<filename>setVarFlags</filename> does not clear previous flags.
Think of this operation as <filename>addVarFlags</filename>.</entry>
</row>
<row>
<entry align="left"><filename>d.getVarFlags("X")</filename></entry>
<entry align="left">Returns a <filename>flagsdict</filename> of the flags for
the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.delVarFlags("X")</filename></entry>
<entry align="left">Deletes all the flags for the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.expand(expression)</filename></entry>
<entry align="left">Expands variable references in the specified string expression.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</row>
<row>
<entry align="left"><filename>d.setVar("X", "value")</filename></entry>
<entry align="left">Sets the variable "X" to "value".</entry>
</row>
<row>
<entry align="left"><filename>d.appendVar("X", "value")</filename></entry>
<entry align="left">Adds "value" to the end of the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.prependVar("X", "value")</filename></entry>
<entry align="left">Adds "value" to the start of the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.delVar("X")</filename></entry>
<entry align="left">Deletes the variable "X" from the datastore.</entry>
</row>
<row>
<entry align="left"><filename>d.renameVar("X", "Y")</filename></entry>
<entry align="left">Renames the variable "X" to "Y".</entry>
</row>
<row>
<entry align="left"><filename>d.getVarFlag("X", flag, expand)</filename></entry>
<entry align="left">Returns the value of variable "X".
Using "expand=True" expands the value.</entry>
</row>
<row>
<entry align="left"><filename>d.setVarFlag("X", flag, "value")</filename></entry>
<entry align="left">Sets the named flag for variable "X" to "value".</entry>
</row>
<row>
<entry align="left"><filename>d.appendVarFlag("X", flag, "value")</filename></entry>
<entry align="left">Appends "value" to the named flag on the
variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.prependVarFlag("X", flag, "value")</filename></entry>
<entry align="left">Prepends "value" to the named flag on
the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.delVarFlag("X", flag)</filename></entry>
<entry align="left">Deletes the named flag on the variable
"X" from the datastore.</entry>
</row>
<row>
<entry align="left"><filename>d.setVarFlags("X", flagsdict)</filename></entry>
<entry align="left">Sets the flags specified in
the <filename>flagsdict()</filename> parameter.
<filename>setVarFlags</filename> does not clear previous flags.
Think of this operation as <filename>addVarFlags</filename>.</entry>
</row>
<row>
<entry align="left"><filename>d.getVarFlags("X")</filename></entry>
<entry align="left">Returns a <filename>flagsdict</filename> of the flags for
the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.delVarFlags("X")</filename></entry>
<entry align="left">Deletes all the flags for the variable "X".</entry>
</row>
<row>
<entry align="left"><filename>d.expand(expression)</filename></entry>
<entry align="left">Expands variable references in the specified string expression.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</section>
<section id='other-functions'>
<title>Other Functions</title>
<para>
You can find many other functions that can be called
from Python by looking at the source code of the
<filename>bb</filename> module, which is in
<filename>bitbake/lib/bb</filename>.
For example,
<filename>bitbake/lib/bb/utils.py</filename> includes
the commonly used functions
<filename>bb.utils.contains()</filename> and
<filename>bb.utils.mkdirhier()</filename>, which come
with docstrings.
</para>
</section>
</section>
<section id='task-checksums-and-setscene'>

View File

@@ -193,12 +193,6 @@ def exec_func(func, d, dirs = None, pythonexception=False):
except:
oldcwd = None
body = d.getVar(func, False)
if not body:
if body is None:
logger.warning("Function %s doesn't exist", func)
return
flags = d.getVarFlags(func)
cleandirs = flags.get('cleandirs')
if cleandirs:
@@ -217,6 +211,13 @@ def exec_func(func, d, dirs = None, pythonexception=False):
adir = dirs[-1]
else:
adir = None
body = d.getVar(func, False)
if not body:
if body is None:
logger.warning("Function %s doesn't exist", func)
return
ispython = flags.get('python')
lockflag = flags.get('lockfiles')
@@ -574,6 +575,9 @@ def _exec_task(fn, task, d, quieterr):
logger.error(str(exc))
event.fire(TaskFailed(task, logfn, localdata, errprinted), localdata)
return 1
except bb.BBHandledException:
event.fire(TaskFailed(task, logfn, localdata, True), localdata)
return 1
finally:
sys.stdout.flush()
sys.stderr.flush()

View File

@@ -658,7 +658,7 @@ class BBCooker:
if task is None:
task = self.configuration.cmd
fulltargetlist = self.checkPackages(pkgs_to_build)
fulltargetlist = self.checkPackages(pkgs_to_build, task)
taskdata = {}
localdata = {}
@@ -1147,6 +1147,8 @@ class BBCooker:
collection_list = collections.split()
min_prio = 0
for c in collection_list:
bb.debug(1,'Processing %s in collection list' % (c))
# Get collection priority if defined explicitly
priority = self.data.getVar("BBFILE_PRIORITY_%s" % c, True)
if priority:
@@ -1165,10 +1167,10 @@ class BBCooker:
deps = self.data.getVar("LAYERDEPENDS_%s" % c, True)
if deps:
try:
deplist = bb.utils.explode_dep_versions2(deps)
depDict = bb.utils.explode_dep_versions2(deps)
except bb.utils.VersionStringException as vse:
bb.fatal('Error parsing LAYERDEPENDS_%s: %s' % (c, str(vse)))
for dep, oplist in list(deplist.items()):
for dep, oplist in list(depDict.items()):
if dep in collection_list:
for opstr in oplist:
layerver = self.data.getVar("LAYERVERSION_%s" % dep, True)
@@ -1187,10 +1189,39 @@ class BBCooker:
else:
parselog.error("Layer '%s' depends on layer '%s', but this layer is not enabled in your configuration", c, dep)
errors = True
collection_depends[c] = deplist.keys()
collection_depends[c] = list(depDict.keys())
else:
collection_depends[c] = []
# Check recommends and store information for priority calculation
recs = self.data.getVar("LAYERRECOMMENDS_%s" % c, True)
if recs:
try:
recDict = bb.utils.explode_dep_versions2(recs)
except bb.utils.VersionStringException as vse:
bb.fatal('Error parsing LAYERRECOMMENDS_%s: %s' % (c, str(vse)))
for rec, oplist in list(recDict.items()):
if rec in collection_list:
if oplist:
opstr = oplist[0]
layerver = self.data.getVar("LAYERVERSION_%s" % rec, True)
if layerver:
(op, recver) = opstr.split()
try:
res = bb.utils.vercmp_string_op(layerver, recver, op)
except bb.utils.VersionStringException as vse:
bb.fatal('Error parsing LAYERRECOMMENDS_%s: %s' % (c, str(vse)))
if not res:
parselog.debug(3,"Layer '%s' recommends version %s of layer '%s', but version %s is currently enabled in your configuration. Check that you are using the correct matching versions/branches of these two layers.", c, opstr, rec, layerver)
continue
else:
parselog.debug(3,"Layer '%s' recommends version %s of layer '%s', which exists in your configuration but does not specify a version. Check that you are using the correct matching versions/branches of these two layers.", c, opstr, rec)
continue
parselog.debug(3,"Layer '%s' recommends layer '%s', so we are adding it", c, rec)
collection_depends[c].append(rec)
else:
parselog.debug(3,"Layer '%s' recommends layer '%s', but this layer is not enabled in your configuration", c, rec)
# Recursively work out collection priorities based on dependencies
def calc_layer_priority(collection):
if not collection_priorities[collection]:
@@ -1421,7 +1452,8 @@ class BBCooker:
if not task.startswith("do_"):
task = "do_%s" % task
packages = ["%s:%s" % (target, task) for target in targets]
packages = [target if ':' in target else '%s:%s' % (target, task) for target in targets]
bb.event.fire(bb.event.BuildInit(packages), self.expanded_data)
taskdata, runlist = self.buildTaskData(targets, task, self.configuration.abort)
@@ -1586,7 +1618,7 @@ class BBCooker:
return True
def checkPackages(self, pkgs_to_build):
def checkPackages(self, pkgs_to_build, task=None):
# Return a copy, don't modify the original
pkgs_to_build = pkgs_to_build[:]
@@ -1602,7 +1634,7 @@ class BBCooker:
if 'world' in pkgs_to_build:
pkgs_to_build.remove('world')
for mc in self.multiconfigs:
bb.providers.buildWorldTargetList(self.recipecaches[mc])
bb.providers.buildWorldTargetList(self.recipecaches[mc], task)
for t in self.recipecaches[mc].world_target:
if mc:
t = "multiconfig:" + mc + ":" + t

View File

@@ -270,9 +270,17 @@ class CookerDataBuilder(object):
bb.event.fire(bb.event.ConfigParsed(), self.data)
if self.data.getVar("BB_INVALIDCONF", False) is True:
reparse_cnt = 0
while self.data.getVar("BB_INVALIDCONF", False) is True:
if reparse_cnt > 20:
logger.error("Configuration has been re-parsed over 20 times, "
"breaking out of the loop...")
raise Exception("Too deep config re-parse loop. Check locations where "
"BB_INVALIDCONF is being set (ConfigParsed event handlers)")
self.data.setVar("BB_INVALIDCONF", False)
self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
reparse_cnt += 1
bb.event.fire(bb.event.ConfigParsed(), self.data)
bb.parse.init_parser(self.data)
self.data_hash = self.data.get_hash()
@@ -284,7 +292,7 @@ class CookerDataBuilder(object):
bb.event.fire(bb.event.ConfigParsed(), mcdata)
self.mcdata[config] = mcdata
except SyntaxError:
except (SyntaxError, bb.BBHandledException):
raise bb.BBHandledException
except bb.data_smart.ExpansionError as e:
logger.error(str(e))

View File

@@ -119,21 +119,28 @@ def print_ui_queue():
logger = logging.getLogger("BitBake")
if not _uiready:
from bb.msg import BBLogFormatter
console = logging.StreamHandler(sys.stdout)
console.setFormatter(BBLogFormatter("%(levelname)s: %(message)s"))
logger.handlers = [console]
stdout = logging.StreamHandler(sys.stdout)
stderr = logging.StreamHandler(sys.stderr)
formatter = BBLogFormatter("%(levelname)s: %(message)s")
stdout.setFormatter(formatter)
stderr.setFormatter(formatter)
# First check to see if we have any proper messages
msgprint = False
for event in ui_queue:
if isinstance(event, logging.LogRecord):
if event.levelno > logging.DEBUG:
if event.levelno >= logging.WARNING:
logger.handlers = [stderr]
else:
logger.handlers = [stdout]
logger.handle(event)
msgprint = True
if msgprint:
return
# Nope, so just print all of the messages we have (including debug messages)
logger.handlers = [stdout]
for event in ui_queue:
if isinstance(event, logging.LogRecord):
logger.handle(event)

View File

@@ -761,6 +761,7 @@ def get_srcrev(d, method_name='sortable_revision'):
if not format:
raise FetchError("The SRCREV_FORMAT variable must be set when multiple SCMs are used.")
name_to_rev = {}
seenautoinc = False
for scm in scms:
ud = urldata[scm]
@@ -769,7 +770,16 @@ def get_srcrev(d, method_name='sortable_revision'):
seenautoinc = seenautoinc or autoinc
if len(rev) > 10:
rev = rev[:10]
format = format.replace(name, rev)
name_to_rev[name] = rev
# Replace names by revisions in the SRCREV_FORMAT string. The approach used
# here can handle names being prefixes of other names and names appearing
# as substrings in revisions (in which case the name should not be
# expanded). The '|' regular expression operator tries matches from left to
# right, so we need to sort the names with the longest ones first.
names_descending_len = sorted(name_to_rev, key=len, reverse=True)
name_to_rev_re = "|".join(re.escape(name) for name in names_descending_len)
format = re.sub(name_to_rev_re, lambda match: name_to_rev[match.group(0)], format)
if seenautoinc:
format = "AUTOINC+" + format
@@ -1410,7 +1420,13 @@ class FetchMethod(object):
# If 'subdir' param exists, create a dir and use it as destination for unpack cmd
if 'subdir' in urldata.parm:
unpackdir = '%s/%s' % (rootdir, urldata.parm.get('subdir'))
subdir = urldata.parm.get('subdir')
if os.path.isabs(subdir):
if not os.path.realpath(subdir).startswith(os.path.realpath(rootdir)):
raise UnpackError("subdir argument isn't a subdirectory of unpack root %s" % rootdir, urldata.url)
unpackdir = subdir
else:
unpackdir = os.path.join(rootdir, subdir)
bb.utils.mkdirhier(unpackdir)
else:
unpackdir = rootdir

View File

@@ -165,7 +165,9 @@ class Npm(FetchMethod):
pdata = json.loads('\n'.join(datalines))
return pdata
def _getdependencies(self, pkg, data, version, d, ud, optional=False):
def _getdependencies(self, pkg, data, version, d, ud, optional=False, fetchedlist=None):
if fetchedlist is None:
fetchedlist = []
pkgfullname = pkg
if version != '*' and not '/' in version:
pkgfullname += "@'%s'" % version
@@ -187,7 +189,9 @@ class Npm(FetchMethod):
outputurl = pdata['dist']['tarball']
data[pkg] = {}
data[pkg]['tgz'] = os.path.basename(outputurl)
self._runwget(ud, d, "%s --directory-prefix=%s %s" % (self.basecmd, ud.prefixdir, outputurl), False)
if not outputurl in fetchedlist:
self._runwget(ud, d, "%s --directory-prefix=%s %s" % (self.basecmd, ud.prefixdir, outputurl), False)
fetchedlist.append(outputurl)
dependencies = pdata.get('dependencies', {})
optionalDependencies = pdata.get('optionalDependencies', {})
@@ -200,9 +204,9 @@ class Npm(FetchMethod):
else:
depsfound[dep] = dependencies[dep]
for dep, version in optdepsfound.items():
self._getdependencies(dep, data[pkg]['deps'], version, d, ud, optional=True)
self._getdependencies(dep, data[pkg]['deps'], version, d, ud, optional=True, fetchedlist=fetchedlist)
for dep, version in depsfound.items():
self._getdependencies(dep, data[pkg]['deps'], version, d, ud)
self._getdependencies(dep, data[pkg]['deps'], version, d, ud, fetchedlist=fetchedlist)
def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest, toplevel=True):
logger.debug(2, "NPM shrinkwrap file is %s" % data)

View File

@@ -402,7 +402,7 @@ def getRuntimeProviders(dataCache, rdepend):
return rproviders
def buildWorldTargetList(dataCache):
def buildWorldTargetList(dataCache, task=None):
"""
Build package list for "bitbake world"
"""
@@ -413,6 +413,9 @@ def buildWorldTargetList(dataCache):
for f in dataCache.possible_world:
terminal = True
pn = dataCache.pkg_fn[f]
if task and task not in dataCache.task_deps[f]['tasks']:
logger.debug(2, "World build skipping %s as task %s doesn't exist", f, task)
terminal = False
for p in dataCache.pn_provides[pn]:
if p.startswith('virtual/'):

View File

@@ -1555,6 +1555,8 @@ class RunQueueExecuteTasks(RunQueueExecute):
logger.debug(1, 'Considering %s: %s' % (tid, str(self.rqdata.runtaskentries[tid].revdeps)))
if len(self.rqdata.runtaskentries[tid].revdeps) > 0 and self.rqdata.runtaskentries[tid].revdeps.issubset(self.rq.scenequeue_covered):
if tid in self.rq.scenequeue_notcovered:
continue
found = True
self.rq.scenequeue_covered.add(tid)
@@ -2229,11 +2231,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
# revdeps = self.sq_revdeps[tid]
# bb.warn("Found we didn't run %s %s %s" % (tid, buildable, str(revdeps)))
# Convert scenequeue_covered task numbers into full taskgraph ids
oldcovered = self.scenequeue_covered
self.rq.scenequeue_covered = set()
for task in oldcovered:
self.rq.scenequeue_covered.add(task)
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))

View File

@@ -508,6 +508,15 @@ class FetcherLocalTest(FetcherTest):
tree = self.fetchUnpack(['file://dir/subdir/e;subdir=bar'])
self.assertEqual(tree, ['bar/dir/subdir/e'])
def test_local_absolutedir(self):
# Unpacking to an absolute path that is a subdirectory of the root
# should work
tree = self.fetchUnpack(['file://a;subdir=%s' % os.path.join(self.unpackdir, 'bar')])
# Unpacking to an absolute path outside of the root should fail
with self.assertRaises(bb.fetch2.UnpackError):
self.fetchUnpack(['file://a;subdir=/bin/sh'])
class FetcherNetworkTest(FetcherTest):
if os.environ.get("BB_SKIP_NETTESTS") == "yes":

View File

@@ -43,6 +43,7 @@ from orm.models import Package, Package_File, Target_Installed_Package, Target_F
from orm.models import Task_Dependency, Package_Dependency
from orm.models import Recipe_Dependency, Provides
from orm.models import Project, CustomImagePackage, CustomImageRecipe
from orm.models import signal_runbuilds
from bldcontrol.models import BuildEnvironment, BuildRequest
@@ -234,6 +235,7 @@ class ORMWrapper(object):
build.completed_on = timezone.now()
build.outcome = outcome
build.save()
signal_runbuilds()
def update_target_set_license_manifest(self, target, license_manifest_path):
target.license_manifest_path = license_manifest_path
@@ -449,7 +451,11 @@ class ORMWrapper(object):
# note that this is different
buildrequest = BuildRequest.objects.get(pk = br_id)
for brl in buildrequest.brlayer_set.all():
localdirname = os.path.join(bc.getGitCloneDirectory(brl.giturl, brl.commit), brl.dirpath)
if brl.local_source_dir:
localdirname = os.path.join(brl.local_source_dir,
brl.dirpath)
else:
localdirname = os.path.join(bc.getGitCloneDirectory(brl.giturl, brl.commit), brl.dirpath)
# we get a relative path, unless running in HEAD mode where the path is absolute
if not localdirname.startswith("/"):
localdirname = os.path.join(bc.be.sourcedir, localdirname)
@@ -979,8 +985,6 @@ class BuildInfoHelper(object):
def _get_layer_version_for_path(self, path):
self._ensure_build()
assert path.startswith("/")
def _slkey_interactive(layer_version):
assert isinstance(layer_version, Layer_Version)
return len(layer_version.local_path)
@@ -1354,6 +1358,7 @@ class BuildInfoHelper(object):
self._ensure_build()
self.internal_state['build'].outcome = Build.CANCELLED
self.internal_state['build'].save()
signal_runbuilds()
def store_dependency_information(self, event):
assert '_depgraph' in vars(event)
@@ -1521,9 +1526,7 @@ class BuildInfoHelper(object):
return
br_id, be_id = self.brbe.split(":")
be = BuildEnvironment.objects.get(pk = be_id)
be.lock = BuildEnvironment.LOCK_LOCK
be.save()
br = BuildRequest.objects.get(pk = br_id)
# if we're 'done' because we got cancelled update the build outcome
@@ -1541,6 +1544,11 @@ class BuildInfoHelper(object):
br.state = BuildRequest.REQ_FAILED
br.save()
be = BuildEnvironment.objects.get(pk = be_id)
be.lock = BuildEnvironment.LOCK_FREE
be.save()
signal_runbuilds()
def store_log_error(self, text):
mockevent = MockEvent()
mockevent.levelno = formatter.ERROR

View File

@@ -170,6 +170,7 @@ class TerminalFilter(object):
self.interactive = sys.stdout.isatty()
self.footer_present = False
self.lastpids = []
self.lasttime = None
self.quiet = quiet
if not self.interactive:
@@ -226,6 +227,10 @@ class TerminalFilter(object):
activetasks = self.helper.running_tasks
failedtasks = self.helper.failed_tasks
runningpids = self.helper.running_pids
currenttime = time.time()
if not self.lasttime or (currenttime - self.lasttime > 5):
self.helper.needUpdate = True
self.lasttime = currenttime
if self.footer_present and not self.helper.needUpdate:
return
self.helper.needUpdate = False
@@ -250,7 +255,11 @@ class TerminalFilter(object):
activetasks[t]["progressbar"] = pbar
tasks.append((pbar, progress, rate, start_time))
else:
tasks.append("%s (pid %s)" % (activetasks[t]["title"], t))
start_time = activetasks[t].get("starttime", None)
if start_time:
tasks.append("%s - %ds (pid %s)" % (activetasks[t]["title"], currenttime - start_time, t))
else:
tasks.append("%s (pid %s)" % (activetasks[t]["title"], t))
if self.main.shutdown:
content = "Waiting for %s running tasks to finish:" % len(activetasks)
@@ -271,7 +280,7 @@ class TerminalFilter(object):
progress = self.helper.tasknumber_current - 1
if progress < 0:
progress = 0
self.main_progress.update(progress)
content = self.main_progress.update(progress)
print('')
lines = 1 + int(len(content) / (self.columns + 1))
if not self.quiet:
@@ -285,11 +294,10 @@ class TerminalFilter(object):
pbar.setmessage('%s:%s' % (tasknum, pbar.msg.split(':', 1)[1]))
if progress > -1:
pbar.setextra(rate)
output = pbar.update(progress)
content = pbar.update(progress)
else:
output = pbar.update(1)
if not output or (len(output) <= pbar.term_width):
print('')
content = pbar.update(1)
print('')
else:
content = "%s: %s" % (tasknum, task)
print(content)

View File

@@ -35,25 +35,25 @@ class BBUIHelper:
self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task), 'starttime' : time.time() }
self.running_pids.append(event.pid)
self.needUpdate = True
if isinstance(event, bb.build.TaskSucceeded):
elif isinstance(event, bb.build.TaskSucceeded):
del self.running_tasks[event.pid]
self.running_pids.remove(event.pid)
self.needUpdate = True
if isinstance(event, bb.build.TaskFailedSilent):
elif isinstance(event, bb.build.TaskFailedSilent):
del self.running_tasks[event.pid]
self.running_pids.remove(event.pid)
# Don't add to the failed tasks list since this is e.g. a setscene task failure
self.needUpdate = True
if isinstance(event, bb.build.TaskFailed):
elif isinstance(event, bb.build.TaskFailed):
del self.running_tasks[event.pid]
self.running_pids.remove(event.pid)
self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
self.needUpdate = True
if isinstance(event, bb.runqueue.runQueueTaskStarted) or isinstance(event, bb.runqueue.sceneQueueTaskStarted):
elif isinstance(event, bb.runqueue.runQueueTaskStarted) or isinstance(event, bb.runqueue.sceneQueueTaskStarted):
self.tasknumber_current = event.stats.completed + event.stats.active + event.stats.failed + 1
self.tasknumber_total = event.stats.total
self.needUpdate = True
if isinstance(event, bb.build.TaskProgress):
elif isinstance(event, bb.build.TaskProgress):
if event.pid > 0:
self.running_tasks[event.pid]['progress'] = event.progress
self.running_tasks[event.pid]['rate'] = event.rate
@@ -62,4 +62,3 @@ class BBUIHelper:
def getTasks(self):
self.needUpdate = False
return (self.running_tasks, self.failed_tasks)

View File

@@ -156,7 +156,7 @@ class LocalhostBEController(BuildEnvironmentController):
try:
localremotes = self._shellcmd("git remote -v",
localdirname)
if not giturl in localremotes:
if not giturl in localremotes and commit != 'HEAD':
raise BuildSetupException("Existing git repository at %s, but with different remotes ('%s', expected '%s'). Toaster will not continue out of fear of damaging something." % (localdirname, ", ".join(localremotes.split("\n")), giturl))
except ShellCmdException:
# our localdirname might not be a git repository

View File

@@ -1,31 +1,27 @@
from django.core.management.base import NoArgsCommand, CommandError
from django.core.management.base import NoArgsCommand
from django.db import transaction
from django.db.models import Q
from bldcontrol.bbcontroller import getBuildEnvironmentController
from bldcontrol.bbcontroller import ShellCmdException, BuildSetupException
from bldcontrol.models import BuildRequest, BuildEnvironment
from bldcontrol.models import BRError, BRVariable
from orm.models import Build, ToasterSetting, LogMessage, Target
from orm.models import Build, LogMessage, Target
import os
import logging
import time
import sys
import traceback
import signal
logger = logging.getLogger("toaster")
class Command(NoArgsCommand):
args = ""
help = "Schedules and executes build requests as possible."
"Does not return (interrupt with Ctrl-C)"
args = ""
help = "Schedules and executes build requests as possible. "\
"Does not return (interrupt with Ctrl-C)"
@transaction.atomic
def _selectBuildEnvironment(self):
bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE)
bec = getBuildEnvironmentController(lock=BuildEnvironment.LOCK_FREE)
bec.be.lock = BuildEnvironment.LOCK_LOCK
bec.be.save()
return bec
@@ -75,17 +71,15 @@ class Command(NoArgsCommand):
else:
errmsg = str(e)
BRError.objects.create(req = br,
errtype = str(type(e)),
errmsg = errmsg,
traceback = traceback.format_exc())
BRError.objects.create(req=br, errtype=str(type(e)), errmsg=errmsg,
traceback=traceback.format_exc())
br.state = BuildRequest.REQ_FAILED
br.save()
bec.be.lock = BuildEnvironment.LOCK_FREE
bec.be.save()
def archive(self):
for br in BuildRequest.objects.filter(state = BuildRequest.REQ_ARCHIVE):
for br in BuildRequest.objects.filter(state=BuildRequest.REQ_ARCHIVE):
if br.build == None:
br.state = BuildRequest.REQ_FAILED
else:
@@ -102,14 +96,13 @@ class Command(NoArgsCommand):
BuildRequest.REQ_COMPLETED,
BuildRequest.REQ_CANCELLING]) &
Q(lock=BuildEnvironment.LOCK_LOCK) &
Q(updated__lt=timezone.now() - timedelta(seconds = 30))
Q(updated__lt=timezone.now() - timedelta(seconds=30))
).update(lock=BuildEnvironment.LOCK_FREE)
# update all Builds that were in progress and failed to start
for br in BuildRequest.objects.filter(
state=BuildRequest.REQ_FAILED,
build__outcome=Build.IN_PROGRESS):
for br in BuildRequest.objects.filter(state=BuildRequest.REQ_FAILED,
build__outcome=Build.IN_PROGRESS):
# transpose the launch errors in ToasterExceptions
br.build.outcome = Build.FAILED
for brerror in br.brerror_set.all():
@@ -126,7 +119,7 @@ class Command(NoArgsCommand):
# update all BuildRequests without a build created
for br in BuildRequest.objects.filter(build = None):
for br in BuildRequest.objects.filter(build=None):
br.build = Build.objects.create(project=br.project,
completed_on=br.updated,
started_on=br.created)
@@ -151,10 +144,10 @@ class Command(NoArgsCommand):
# Make sure the LOCK is removed for builds which have been fully
# cancelled
for br in BuildRequest.objects.filter(
Q(build__outcome=Build.CANCELLED) &
Q(state=BuildRequest.REQ_CANCELLING) &
~Q(environment=None)):
for br in BuildRequest.objects.filter(\
Q(build__outcome=Build.CANCELLED) &
Q(state=BuildRequest.REQ_CANCELLING) &
~Q(environment=None)):
br.environment.lock = BuildEnvironment.LOCK_FREE
br.environment.save()
@@ -175,6 +168,10 @@ class Command(NoArgsCommand):
logger.warn("runbuilds: schedule exception %s" % str(e))
def handle_noargs(self, **options):
self.runbuild()
signal.signal(signal.SIGUSR1, lambda sig, frame: None)
while True:
signal.pause()
self.runbuild()
time.sleep(1)

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bldcontrol', '0006_brlayer_local_source_dir'),
]
operations = [
migrations.AlterField(
model_name='brlayer',
name='commit',
field=models.CharField(max_length=254, null=True),
),
migrations.AlterField(
model_name='brlayer',
name='dirpath',
field=models.CharField(max_length=254, null=True),
),
migrations.AlterField(
model_name='brlayer',
name='giturl',
field=models.CharField(max_length=254, null=True),
),
]

View File

@@ -33,9 +33,10 @@ from django.conf import settings
import django.db.models.signals
import sys
import os.path
import os
import re
import itertools
from signal import SIGUSR1
import logging
logger = logging.getLogger("toaster")
@@ -376,6 +377,8 @@ class Project(models.Model):
except ProjectVariable.DoesNotExist:
pass
br.save()
signal_runbuilds()
except Exception:
# revert the build request creation since we're not done cleanly
br.delete()
@@ -1736,6 +1739,11 @@ def invalidate_cache(**kwargs):
except Exception as e:
logger.warning("Problem with cache backend: Failed to clear cache: %s" % e)
def signal_runbuilds():
"""Send SIGUSR1 to runbuilds process"""
with open(os.path.join(os.getenv('BUILDDIR'), '.runbuilds.pid')) as pidf:
os.kill(int(pidf.read()), SIGUSR1)
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

View File

@@ -0,0 +1,55 @@
# The MIT License (MIT)
#
# Copyright (c) 2016 Damien Lespiau
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import sys
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from contextlib import contextmanager
from django.core import management
from django.test import TestCase
@contextmanager
def capture(command, *args, **kwargs):
out, sys.stdout = sys.stdout, StringIO()
command(*args, **kwargs)
sys.stdout.seek(0)
yield sys.stdout.read()
sys.stdout = out
def makemigrations():
management.call_command('makemigrations')
class MigrationTest(TestCase):
def testPendingMigration(self):
"""Make sure there's no pending migration."""
with capture(makemigrations) as output:
self.assertEqual(output, "No changes detected\n")

View File

@@ -38,10 +38,13 @@
$(this).parent().addClass("active");
} else {
/* Special case the configvar as this is part of configuration
* page but is a separate url
* page but is a separate url, and the direct links to errors
* and warnings, which are part of the build dashboard
*/
if (window.location.pathname === configVarUrl){
$("#menu-configuration").addClass("active");
} else if (currentUrl.indexOf('error') > 1 || currentUrl.indexOf('warning') > 1){
$("#menu-dashboard").addClass("active");
} else {
$(this).parent().removeClass("active");
}
@@ -57,7 +60,7 @@
<div class="row">
<div id="nav" class="col-md-2">
<ul class="nav nav-pills nav-stacked" id="build-menu">
<li
<li id="menu-dashboard"
{% if request.resolver_match.url_name == 'builddashboard' %}
class="active"
{% endif %} >

View File

@@ -235,7 +235,7 @@
</a>
{% elif exectask.count > 1%}
<a class="text-danger" href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a>
<a class="text-danger" href="{% url "tasks" build.id %}?limit=25&amp;page=1&amp;orderby=order&amp;filter=task_outcome:failed&amp;default_orderby=order&amp;filter_value=on&amp;">{{exectask.count}}</a>
{% endif %}
</dd>
{% endif %}
@@ -244,12 +244,12 @@
Tasks executed
<span class="glyphicon glyphicon-question-sign get-help" title="'Executed' tasks are those that need to be run in order to generate the task output"></span>
</dt>
<dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A1&amp;count=25&amp;search=&amp;page=1&amp;orderby=order%3A%2B">{% query build.task_build task_executed=1 order__gt=0 as exectask%}{{exectask.count}}</a></dd>
<dd><a href="{% url 'tasks' build.pk %}?limit=25&amp;page=1&amp;orderby=order&amp;filter=execution_outcome:executed&amp;default_orderby=order&amp;filter_value=on&amp;">{% query build.task_build task_executed=1 order__gt=0 as exectask%}{{exectask.count}}</a></dd>
<dt>
Tasks not executed
<span class="glyphicon glyphicon-question-sign get-help" title="'Not executed' tasks don't need to run because their outcome is provided by another task"></span>
</dt>
<dd><a href="{% url 'tasks' build.pk %}?filter=task_executed%3A0&amp;count=25&amp;search=&amp;page=1&amp;orderby=order%3A%2B">{% query build.task_build task_executed=0 order__gt=0 as noexectask%}{{noexectask.count}}</a></dd>
<dd><a href="{% url 'tasks' build.pk %}?limit=25&amp;page=1&amp;orderby=order&amp;filter=execution_outcome:not_executed&amp;default_orderby=order&amp;filter_value=on&amp;">{% query build.task_build task_executed=0 order__gt=0 as noexectask%}{{noexectask.count}}</a></dd>
<dt>
Reuse
<span class="glyphicon glyphicon-question-sign get-help" title="The percentage of 'not executed' tasks over the total number of tasks, which is a measure of the efficiency of your build"></span>

View File

@@ -176,8 +176,6 @@
<a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
</dd>
{% endif %}
<dt>Layer</dt>
<dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
<dt>Based on</dt>
<dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd>
{% if recipe.get_last_successful_built_target %}

View File

@@ -2297,6 +2297,8 @@
However, you might still want to make some adjustments.
For example, you can set
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
or
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
to pass any needed configure options that are specific
to the recipe.</para></listitem>
<listitem><para><emphasis>CMake:</emphasis>
@@ -3011,8 +3013,10 @@
You do not need to add a <filename>do_compile</filename> step since by default BitBake
starts the <filename>make</filename> command to compile the application.
If you need additional <filename>make</filename> options, you should store them in the
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'>EXTRA_OEMAKE</ulink></filename>
variable.
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></ulink>
or
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
variables.
BitBake passes these options into the GNU <filename>make</filename> invocation.
Note that a <filename>do_install</filename> task is still required.
Otherwise, BitBake runs an empty <filename>do_install</filename> task by default.
@@ -3946,8 +3950,9 @@
<filename>webkit</filename>).
</para></listitem>
<listitem><para>
Using QEMU in usermode might not work properly when
running 64-bit binaries under 32-bit host machines.
QEMU might not work properly when using QEMU in
usermode and running 64-bit binaries under 32-bit
host machines.
In particular, "qemumips64" is known to not work under
i686.
</para></listitem>

View File

@@ -649,13 +649,13 @@
</para>
<section id='use-devtool-to-integrate-new-code'>
<title>Use <filename>devtool add</filename> to Integrate New Code</title>
<title>Use <filename>devtool add</filename> to Add an Application</title>
<para>
The <filename>devtool add</filename> command generates
a new recipe based on existing source code.
This command takes advantage of the
<link linkend='devtool-the-workspace-layer-structure'>workspace</link>
<ulink url='&YOCTO_DOCS_DEV_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>
layer that many <filename>devtool</filename> commands
use.
The command is flexible enough to allow you to extract source
@@ -721,7 +721,8 @@
and needs to be extracted to some
local area - this time outside of the default
workspace.
As always, if required <filename>devtool</filename> creates
If required, <filename>devtool</filename>
always creates
a Git repository locally during the extraction.
Furthermore, the first positional argument
<replaceable>srctree</replaceable> in this case
@@ -788,10 +789,6 @@
<para>If you need to take the build output and eventually
move it to the target hardware, you would use
<filename>devtool build</filename>:
<note>
You could use <filename>bitbake</filename> to build
the recipe as well.
</note>
<literallayout class='monospaced'>
$ devtool build <replaceable>recipe</replaceable>
</literallayout></para>
@@ -831,49 +828,44 @@
However, <filename>devtool</filename> does not provide a
specific command that allows you to do this.
</para></listitem>
<listitem><para><emphasis>Optionally Update the Recipe With Patch Files</emphasis>:
Once you are satisfied with the recipe, if you have made
any changes to the source tree that you want to have
applied by the recipe, you need to generate patches
from those changes.
You do this before moving the recipe
to its final layer and cleaning up the workspace area
<filename>devtool</filename> uses.
This optional step is especially relevant if you are
using or adding third-party software.</para>
<para>To convert commits created using Git to patch files,
use the <filename>devtool update-recipe</filename> command.
<listitem><para>
<emphasis>Finish Your Work With the Recipe</emphasis>:
The <filename>devtool finish</filename> command creates
any patches corresponding to commits in the local
Git repository, moves the new recipe to a more permanent
layer, and then resets the recipe so that the recipe is
built normally rather than from the workspace.
<literallayout class='monospaced'>
$ devtool finish <replaceable>recipe layer</replaceable>
</literallayout>
<note>
Any changes you want to turn into patches must be
committed to the Git repository in the source tree.
</note></para>
<para>As mentioned, the <filename>devtool finish</filename>
command moves the final recipe to its permanent layer.
</para>
<para>As a final process of the
<filename>devtool finish</filename> command, the state
of the standard layers and the upstream source is
restored so that you can build the recipe from those
areas rather than the workspace.
<note>
You can use the <filename>devtool reset</filename>
command to put things back should you decide you
do not want to proceed with your work.
If you do use this command, realize that the source
tree is preserved.
</note>
<literallayout class='monospaced'>
$ devtool update-recipe <replaceable>recipe</replaceable>
</literallayout>
</para></listitem>
<listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
Before cleaning up the workspace, you need to move the
final recipe to its permanent layer.
You must do this before using the
<filename>devtool reset</filename> command if you want to
retain the recipe.
</para></listitem>
<listitem><para><emphasis>Reset the Recipe</emphasis>:
As a final step, you can restore the state such that
standard layers and the upstream source is used to build
the recipe rather than data in the workspace.
To reset the recipe, use the <filename>devtool reset</filename>
command:
<literallayout class='monospaced'>
$ devtool reset <replaceable>recipe</replaceable>
</literallayout>
</para></listitem>
</orderedlist>
</para>
</section>
<section id='devtool-use-devtool-modify-to-enable-work-on-code-associated-with-an-existing-recipe'>
<title>Use <filename>devtool modify</filename> to Enable Work on Code Associated with an Existing Recipe</title>
<title>Use <filename>devtool modify</filename> to Modify the Source of an Existing Component</title>
<para>
The <filename>devtool modify</filename> command prepares the
@@ -1028,17 +1020,12 @@
<listitem><para><emphasis>Build the Recipe</emphasis>:
Once you have updated the source files, you can build
the recipe.
You can either use <filename>devtool build</filename> or
<filename>bitbake</filename>.
Either method produces build output that is stored
in
<ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>.
</para></listitem>
<listitem><para><emphasis>Deploy the Build Output</emphasis>:
When you use the <filename>devtool build</filename>
command or <filename>bitbake</filename> to build out your
recipe, you probably want to see if the resulting build
output works as expected on target hardware.
command to build out your recipe, you probably want to see
if the resulting build output works as expected on target
hardware.
<note>
This step assumes you have a previously built
image that is already either running in QEMU or
@@ -1062,42 +1049,43 @@
However, <filename>devtool</filename> does not provide a
specific command that allows you to do this.
</para></listitem>
<listitem><para><emphasis>Optionally Create Patch Files for Your Changes</emphasis>:
After you have debugged your changes, you can
use <filename>devtool update-recipe</filename> to
generate patch files for all the commits you have
made.
<note>
Patch files are generated only for changes
you have committed.
</note>
<listitem><para>
<emphasis>Finish Your Work With the Recipe</emphasis>:
The <filename>devtool finish</filename> command creates
any patches corresponding to commits in the local
Git repository, updates the recipe to point to them
(or creates a <filename>.bbappend</filename> file to do
so, depending on the specified destination layer), and
then resets the recipe so that the recipe is built normally
rather than from the workspace.
<literallayout class='monospaced'>
$ devtool update-recipe <replaceable>recipe</replaceable>
$ devtool finish <replaceable>recipe layer</replaceable>
</literallayout>
By default, the
<filename>devtool update-recipe</filename> command
creates the patch files in a folder named the same
as the recipe beneath the folder in which the recipe
resides, and updates the recipe's
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
statement to point to the generated patch files.
<note>
You can use the
"--append <replaceable>LAYERDIR</replaceable>"
option to cause the command to create append files
in a specific layer rather than the default
recipe layer.
Any changes you want to turn into patches must be
committed to the Git repository in the source tree.
</note></para>
<para>Because there is no need to move the recipe,
<filename>devtool finish</filename> either updates the
original recipe in the original layer or the command
creates a <filename>.bbappend</filename> in a different
layer as provided by <replaceable>layer</replaceable>.
</para>
<para>As a final process of the
<filename>devtool finish</filename> command, the state
of the standard layers and the upstream source is
restored so that you can build the recipe from those
areas rather than the workspace.
<note>
You can use the <filename>devtool reset</filename>
command to put things back should you decide you
do not want to proceed with your work.
If you do use this command, realize that the source
tree is preserved.
</note>
</para></listitem>
<listitem><para><emphasis>Restore the Workspace</emphasis>:
The <filename>devtool reset</filename> restores the
state so that standard layers and upstream sources are
used to build the recipe rather than what is in the
workspace.
<literallayout class='monospaced'>
$ devtool reset <replaceable>recipe</replaceable>
</literallayout>
</para></listitem>
</orderedlist>
</para>
</section>
@@ -1297,7 +1285,7 @@
OpenEmbedded development tool
optional arguments:
options:
--basepath BASEPATH Base directory of SDK / build directory
--bbpath BBPATH Explicitly specify the BBPATH, rather than getting it
from the metadata
@@ -1315,11 +1303,12 @@
status Show workspace status
search Search available recipes
Working on a recipe in the workspace:
build Build a recipe
edit-recipe Edit a recipe file in your workspace
configure-help Get help on configure script options
build Build a recipe
update-recipe Apply changes from external source tree to recipe
reset Remove a recipe from your workspace
finish Finish working on a recipe in your workspace
Testing changes on target:
deploy-target Deploy recipe output files to live target machine
undeploy-target Undeploy recipe output files in live target machine
@@ -1339,14 +1328,14 @@
<literallayout class='monospaced'>
$ devtool add --help
usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
[--version VERSION] [--no-git] [--binary] [--also-native]
[--src-subdir SUBDIR]
[--version VERSION] [--no-git] [--autorev] [--binary]
[--also-native] [--src-subdir SUBDIR]
[recipename] [srctree] [fetchuri]
Adds a new recipe to the workspace to build a specified source tree. Can
optionally fetch a remote URI and unpack it to create the source tree.
positional arguments:
arguments:
recipename Name for new recipe to add (just name - no version,
path or extension). If not specified, will attempt to
auto-detect it.
@@ -1357,7 +1346,7 @@
fetchuri Fetch the specified URI and extract it to create the
source tree
optional arguments:
options:
-h, --help show this help message and exit
--same-dir, -s Build in same directory as source
--no-same-dir Force build in a separate build directory
@@ -1368,6 +1357,8 @@
Version to use within recipe (PV)
--no-git, -g If fetching source, do not set up source tree as a git
repository
--autorev, -a When fetching from a git repository, set SRCREV in the
recipe to a floating revision instead of fixed
--binary, -b Treat the source tree as something that should be
installed verbatim (no compilation, same directory
structure). Useful with binary packages e.g. RPMs.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 160 KiB

View File

@@ -123,6 +123,8 @@
xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-obtain.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-customizing.xml"/>
<xi:include
xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-mars.xml"/>
<!-- Includes bsp-guide title image and then bsp-guide chapters -->

View File

@@ -62,7 +62,7 @@
<!ENTITY OE_INIT_FILE "oe-init-build-env">
<!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat">
<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
<!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 \
findutils which">

View File

@@ -888,7 +888,9 @@
class,
you can add additional configuration options by using
the <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
variable.
or
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
variables.
For information on how this variable works within
that class, see the
<filename>meta/classes/autotools.bbclass</filename> file.
@@ -1210,6 +1212,67 @@
</para>
</section>
<section id='stamp-files-and-the-rerunning-of-tasks'>
<title>Stamp Files and the Rerunning of Tasks</title>
<para>
For each task that completes successfully, BitBake writes a
stamp file into the
<link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>
directory.
The beginning of the stamp file's filename is determined by the
<link linkend='var-STAMP'><filename>STAMP</filename></link>
variable, and the end of the name consists of the task's name
and current
<ulink url='&YOCTO_DOCS_BB_URL;#checksums'>input checksum</ulink>.
<note>
This naming scheme assumes that
<ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SIGNATURE_HANDLER'><filename>BB_SIGNATURE_HANDLER</filename></ulink>
is "OEBasicHash", which is almost always the case in
current OpenEmbedded.
</note>
To determine if a task needs to be rerun, BitBake checks if a
stamp file with a matching input checksum exists for the task.
If such a stamp file exists, the task's output is assumed to
exist and still be valid.
If the file does not exist, the task is rerun.
<note>
<para>The stamp mechanism is more general than the shared
state (sstate) cache mechanism described in the
"<link linkend='setscene-tasks-and-shared-state'>Setscene Tasks and Shared State</link>"
section.
BitBake avoids rerunning any task that has a valid
stamp file, not just tasks that can be accelerated through
the sstate cache.</para>
<para>However, you should realize that stamp files only
serve as a marker that some work has been done and that
these files do not record task output.
The actual task output would usually be somewhere in
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
(e.g. in some recipe's
<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.)
What the sstate cache mechanism adds is a way to cache task
output that can then be shared between build machines.
</para>
</note>
Since <filename>STAMPS_DIR</filename> is usually a subdirectory
of <filename>TMPDIR</filename>, removing
<filename>TMPDIR</filename> will also remove
<filename>STAMPS_DIR</filename>, which means tasks will
properly be rerun to repopulate <filename>TMPDIR</filename>.
</para>
<para>
If you want some task to always be considered "out of date",
you can mark it with the
<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink>
varflag.
If some other task depends on such a task, then that task will
also always be considered out of date, which might not be what
you want.
</para>
</section>
<section id='setscene-tasks-and-shared-state'>
<title>Setscene Tasks and Shared State</title>
@@ -1528,6 +1591,10 @@
Specifies whether or not packagedata will be included in
the extensible SDK for all recipes in the "world" target.
</para></listitem>
<listitem><para><link linkend='var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></link>:
Specifies whether or not the toolchain will be included
when building the extensible SDK.
</para></listitem>
<listitem><para><link linkend='var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></link>:
A list of variables allowed through from the build system
configuration into the extensible SDK configuration.

View File

@@ -33,9 +33,7 @@
<para id='faq-not-meeting-requirements'>
My development system does not meet the
required Git, tar, and Python versions.
In particular, I do not have Python 2.7.3 or greater, or
I do have Python 3.x, which is specifically not supported by
the Yocto Project.
In particular, I do not have Python 3.4.0 or greater.
Can I still use the Yocto Project?
</para>
</question>

View File

@@ -47,7 +47,7 @@
<listitem><para><emphasis>
<link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
Provides an overview of the components that make up the Yocto Project
followed by information about debugng images created in the Yocto Project.
followed by information about debugging images created in the Yocto Project.
</para></listitem>
<listitem><para><emphasis>
<link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>:</emphasis>
@@ -306,7 +306,7 @@
Packages needed if you are going to run
<filename>oe-selftest</filename>:
<literallayout class='monospaced'>
$ sudo dnf install GitPython
$ sudo dnf install python3-GitPython
</literallayout>
</para></listitem>
</itemizedlist>
@@ -422,8 +422,7 @@
<itemizedlist>
<listitem><para>Git 1.8.3.1 or greater</para></listitem>
<listitem><para>tar 1.24 or greater</para></listitem>
<listitem><para>Python 2.7.3 or greater not including
Python 3.x, which is not supported.</para></listitem>
<listitem><para>Python 3.4.0 or greater</para></listitem>
</itemizedlist>
</para>

View File

@@ -161,13 +161,17 @@
cross-compilation.
You can pass additional parameters to
<filename>configure</filename> through the
<filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
<filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename>
or
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
variables.
</para></listitem>
<listitem><para><link linkend='ref-tasks-compile'><filename>do_compile</filename></link> -
Runs <filename>make</filename> with arguments that specify the
compiler and linker.
You can pass additional arguments through
the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename>
variable.
</para></listitem>
<listitem><para><link linkend='ref-tasks-install'><filename>do_install</filename></link> -
Runs <filename>make install</filename> and passes in
@@ -3317,7 +3321,7 @@
<para>
You can also see the
<ulink url='https://www.freedesktop.org/wiki/Software/systemd/'>Systemd documentation</ulink>
<ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>
for more information.
</para>
</section>
@@ -3726,7 +3730,9 @@
software that uses the Waf build system.
You can use the
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
variable to specify additional configuration options to be passed on
or
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
variables to specify additional configuration options to be passed on
the Waf command line.
</para>
</section>

View File

@@ -918,7 +918,8 @@ can be found then it should be implemented. I can't find one at the moment.
and the upstream change log or release notes.
Once you have worked out what the appropriate
change is, you can update
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>,
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>,
or the individual
<link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
option values accordingly.

View File

@@ -801,8 +801,9 @@
<title><filename>build/tmp/stamps/</filename></title>
<para>
This directory holds information that BitBake uses for accounting purposes
to track what tasks have run and when they have run.
This directory holds information that BitBake uses for
accounting purposes to track what tasks have run and when they
have run.
The directory is sub-divided by architecture, package name, and
version.
Following is an example:
@@ -812,6 +813,13 @@
Although the files in the directory are empty of data,
BitBake uses the filenames and timestamps for tracking purposes.
</para>
<para>
For information on how BitBake uses stamp files to determine if
a task should be rerun, see the
"<link linkend='stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</link>"
section.
</para>
</section>
<section id='structure-build-tmp-log'>

View File

@@ -334,6 +334,17 @@
<link linkend='var-FILES'><filename>FILES</filename></link>
variables.
</para>
<para>
The <filename>do_package</filename> task, in conjunction with the
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task, also saves some important package metadata.
For additional information, see the
<link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link>
variable and the
"<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
section.
</para>
</section>
<section id='ref-tasks-package_qa'>
@@ -406,8 +417,11 @@
<title><filename>do_packagedata</filename></title>
<para>
Creates package metadata used by the build system to generate the
final packages.
Saves package metadata generated by the
<link linkend='ref-tasks-package'><filename>do_package</filename></link>
task in
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
to make it available globally.
</para>
</section>

View File

@@ -1992,22 +1992,36 @@
An internal variable specifying the special class override
that should currently apply (e.g. "class-target",
"class-native", and so forth).
The classes that use this variable set it to
appropriate values.
The classes that use this variable (e.g.
<link linkend='ref-classes-native'><filename>native</filename></link>,
<link linkend='ref-classes-nativesdk'><filename>nativesdk</filename></link>,
and so forth) set the variable to appropriate values.
<note>
<filename>CLASSOVERRIDE</filename> gets its default
"class-target" value from the
<filename>bitbake.conf</filename> file.
</note>
</para>
<para>
You do not normally directly interact with this variable.
The value for the <filename>CLASSOVERRIDE</filename>
variable goes into
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
and then can be used as an override.
Here is an example where "python-native" is added to
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
only when building for the <filename>-native</filename> case:
As an example, the following override allows you to install
extra files, but only when building for the target:
<literallayout class='monospaced'>
DEPENDS_append_class-native = " python-native"
do_install_append_class-target() {
install my-extra-file ${D}${sysconfdir}
}
</literallayout>
Here is an example where <filename>FOO</filename>
is set to "native" when building for the build host, and
to "other" when not building for the build host:
<literallayout class='monospaced'>
FOO_class-native = "native"
FOO = "other"
</literallayout>
The underlying mechanism behind
<filename>CLASSOVERRIDE</filename> is simply that it is
included in the default value of
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
</para>
</glossdef>
</glossentry>
@@ -2813,6 +2827,18 @@
those from <filename>foo-dev</filename>, into
the sysroot.
</para></listitem>
<listitem><para>
One recipe having another recipe in
<filename>DEPENDS</filename> does not by itself
add any runtime dependencies between the
packages produced by the two recipes.
However, as explained in the
"<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
section, runtime dependencies will often be
added automatically, meaning
<filename>DEPENDS</filename> alone is
sufficient for most recipes.
</para></listitem>
<listitem><para>
Counterintuitively,
<filename>DEPENDS</filename> is often necessary
@@ -3410,20 +3436,28 @@
<glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
<info>
DISTROOVERRIDES[doc] = "Lists overrides specific to the current distribution. By default, the variable list includes the value of the DISTRO variable."
DISTROOVERRIDES[doc] = "A colon-separated list of overrides specific to the current distribution."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
This variable lists overrides specific to the current
distribution.
By default, the variable list includes the value of the
<filename><link linkend='var-DISTRO'>DISTRO</link></filename>
variable.
You can extend the variable to apply any variable overrides
you want as part of the distribution and are not
already in <filename>OVERRIDES</filename> through
some other means.
A colon-separated list of overrides specific to the
current distribution.
By default, this list includes the value of
<link linkend='var-DISTRO'><filename>DISTRO</filename></link>.
</para>
<para>
You can extend <filename>DISTROOVERRIDES</filename>
to add extra overrides that should apply to
the distribution.
</para>
<para>
The underlying mechanism behind
<filename>DISTROOVERRIDES</filename> is simply that it
is included in the default value of
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
</para>
</glossdef>
</glossentry>
@@ -4003,6 +4037,10 @@
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Additional <filename>configure</filename> script options.
See
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
for additional information on passing configure script
options.
</para>
</glossdef>
</glossentry>
@@ -4465,6 +4503,25 @@
</glossdef>
</glossentry>
<glossentry id='var-FORCE_RO_REMOVE'><glossterm>FORCE_RO_REMOVE</glossterm>
<info>
FORCE_RO_REMOVE[doc] = "Forces the removal of the packages listed in ROOTFS_RO_UNNEEDED during the generation of the root filesystem."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Forces the removal of the packages listed in
<filename>ROOTFS_RO_UNNEEDED</filename> during the
generation of the root filesystem.
</para>
<para>
Set the variable to "1" to force the removal of these
packages.
</para>
</glossdef>
</glossentry>
<glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
<info>
FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2'."
@@ -7795,36 +7852,41 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
<info>
MACHINEOVERRIDES[doc] = "Lists overrides specific to the current machine. By default, this list includes the value of MACHINE."
MACHINEOVERRIDES[doc] = "A colon-separated list of overrides that apply to the current machine."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Lists overrides specific to the current machine.
By default, this list includes the value
of <filename><link linkend='var-MACHINE'>MACHINE</link></filename>.
You can extend the list to apply variable overrides for
classes of machines.
For example, all QEMU emulated machines (e.g. qemuarm,
qemux86, and so forth) include a common file named
<filename>meta/conf/machine/include/qemu.inc</filename>
that prepends <filename>MACHINEOVERRIDES</filename> with
the following variable override:
<literallayout class='monospaced'>
MACHINEOVERRIDES =. "qemuall:"
</literallayout>
A colon-separated list of overrides that apply to the
current machine.
By default, this list includes the value of
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>.
</para>
<para>
Applying an override like <filename>qemuall</filename>
affects all QEMU emulated machines elsewhere.
Here is an example from the
<filename>connman-conf</filename> recipe:
You can extend <filename>MACHINEOVERRIDES</filename>
to add extra overrides that should apply to a machine.
For example, all machines emulated in QEMU (e.g.
<filename>qemuarm</filename>, <filename>qemux86</filename>,
and so forth) include a file named
<filename>meta/conf/machine/include/qemu.inc</filename>
that prepends the following override to
<filename>MACHINEOVERRIDES</filename>:
<literallayout class='monospaced'>
SRC_URI_append_qemuall = "file://wired.config \
file://wired-setup \
"
MACHINEOVERRIDES =. "qemuall:"
</literallayout>
This override allows variables to be overriden for all
machines emulated in QEMU, like in the following example
from the <filename>connman-conf</filename> recipe:
<literallayout class='monospaced'>
SRC_URI_append_qemuall = "file://wired.config \
file://wired-setup \
"
</literallayout>
The underlying mechanism behind
<filename>MACHINEOVERRIDES</filename> is simply that it is
included in the default value of
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
</para>
</glossdef>
</glossentry>
@@ -7885,6 +7947,39 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='var-BPN'><filename>BPN</filename></link> variable).
<filename>MLPREFIX</filename> gets set when a prefix has been
added to <filename>PN</filename>.
<note>
The "ML" in <filename>MLPREFIX</filename> stands for
"MultiLib".
This representation is historical and comes from
a time when <filename>nativesdk</filename> was a suffix
rather than a prefix on the recipe name.
When <filename>nativesdk</filename> was turned into a
prefix, it made sense to set
<filename>MLPREFIX</filename> for it as well.
</note>
</para>
<para>
To help understand when <filename>MLPREFIX</filename>
might be needed, consider when
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link>
is used to provide a <filename>nativesdk</filename> version
of a recipe in addition to the target version.
If that recipe declares build-time dependencies on tasks in
other recipes by using
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
then a dependency on "foo" will automatically get rewritten
to a dependency on "nativesdk-foo".
However, dependencies like the following will not get
rewritten automatically:
<literallayout class='monospaced'>
do_foo[depends] += "<replaceable>recipe</replaceable>:do_foo"
</literallayout>
If you want such a dependency to also get transformed,
you can do the following:
<literallayout class='monospaced'>
do_foo[depends] += "${MLPREFIX}<replaceable>recipe</replaceable>:do_foo"
</literallayout>
</para>
</glossdef>
</glossentry>
@@ -8420,18 +8515,60 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
<info>
OVERRIDES[doc] = "BitBake uses OVERRIDES to control what variables are overridden after BitBake parses recipes and configuration files."
OVERRIDES[doc] = "A colon-separated list of overrides that currently apply."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
BitBake uses <filename>OVERRIDES</filename> to control
what variables are overridden after BitBake parses
recipes and configuration files.
You can find more information on how overrides are handled
in the
A colon-separated list of overrides that currently apply.
Overrides are a BitBake mechanism that allows variables to
be selectively overridden at the end of parsing.
The set of overrides in <filename>OVERRIDES</filename>
represents the "state" during building, which includes
the current recipe being built, the machine for which
it is being built, and so forth.
</para>
<para>
As an example, if the string "an-override" appears as an
element in the colon-separated list in
<filename>OVERRIDES</filename>, then the following
assignment will override <filename>FOO</filename> with the
value "overridden" at the end of parsing:
<literallayout class='monospaced'>
FOO_an-override = "overridden"
</literallayout>
See the
"<ulink url='&YOCTO_DOCS_BB_URL;#conditional-syntax-overrides'>Conditional Syntax (Overrides)</ulink>"
section of the BitBake User Manual.
section in the BitBake User Manual for more information on
the overrides mechanism.
</para>
<para>
The default value of <filename>OVERRIDES</filename>
includes the values of the
<link linkend='var-CLASSOVERRIDE'><filename>CLASSOVERRIDE</filename></link>,
<link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>,
and
<link linkend='var-DISTROOVERRIDES'><filename>DISTROOVERRIDES</filename></link>
variables.
Another important override included by default is
<filename>pn-${PN}</filename>.
This override allows variables to be set for a single
recipe within configuration (<filename>.conf</filename>)
files.
Here is an example:
<literallayout class='monospaced'>
FOO_pn-myrecipe = "myrecipe-specific value"
</literallayout>
<note><title>Tip</title>
An easy way to see what overrides apply is to search for
<filename>OVERRIDES</filename> in the output of the
<filename>bitbake -e</filename> command.
See the
"<link linkend='usingpoky-debugging-viewing-variable-values'>Viewing Variable Values</link>"
section for more information.
</note>
</para>
</glossdef>
</glossentry>
@@ -8979,10 +9116,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<listitem><para>Extra arguments
that should be added to the configure script
argument list
(<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>)
(<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
or
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>)
if the feature is enabled.</para></listitem>
<listitem><para>Extra arguments
that should be added to <filename>EXTRA_OECONF</filename>
or <filename>PACKAGECONFIG_CONFARGS</filename>
if the feature is disabled.
</para></listitem>
<listitem><para>Additional build dependencies
@@ -9066,6 +9206,50 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-PACKAGECONFIG_CONFARGS'><glossterm>PACKAGECONFIG_CONFARGS</glossterm>
<info>
PACKAGECONFIG_CONFARGS[doc] = "A space-separated list of configuration options generated from PACKAGECONFIG."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
A space-separated list of configuration options generated
from the
<link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
setting.
This list of options helps other classes and
recipes take advantage of the
<filename>PACKAGECONFIG</filename> mechanism without
having to include options from
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>.
</para>
<para>
To illustrate how to use
<filename>PACKAGECONFIG_CONFARGS</filename>, consider the
following example:
<literallayout class='monospaced'>
PACKAGECONFIG_CONFARGS = " \
-prefix ${prefix} \
-sysroot ${STAGING_DIR_NATIVE} \
-no-gcc-sysroot
"
</literallayout>
In the previous example,
<filename>PACKAGECONFIG_CONFARGS</filename> is set with
three configuration options that can be passed using the
<filename>PACKAGECONFIG</filename> mechanism, thus
avoiding having to use <filename>EXTRA_OECONF</filename>.
</para>
<para>
For additional information, see the
<link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
variable.
</para>
</glossdef>
</glossentry>
<glossentry id='var-PACKAGEGROUP_DISABLE_COMPLEMENTARY'><glossterm>PACKAGEGROUP_DISABLE_COMPLEMENTARY</glossterm>
<info>
PACKAGEGROUP_DISABLE_COMPLEMENTARY[doc] = "Prevents automatic creation of the normal complementary packages such as -dev and -dbg in a packagegroup recipe."
@@ -9467,14 +9651,16 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task packages data for each recipe and installs it into
this temporary, shared area.
This directory defaults to the following:
This directory defaults to the following, which you should
not change:
<literallayout class='monospaced'>
${STAGING_DIR_HOST}/pkgdata
</literallayout>
</para>
<para>
Do not change this default.
For examples of how this data is used, see the
"<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
section and the
"<link linkend='viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></link>"
section.
</para>
</glossdef>
</glossentry>
@@ -9505,33 +9691,30 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
<info>
PKGDESTWORK[doc] = "Points to a temporary work area used by the do_package task to write output from the do_packagedata task."
PKGDESTWORK[doc] = "Points to a temporary work area where the do_package task saves package metadata."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Points to a temporary work area used by the
Points to a temporary work area where the
<link linkend='ref-tasks-package'><filename>do_package</filename></link>
task to write output from the
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task.
task saves package metadata.
The <filename>PKGDESTWORK</filename> location defaults to
the following:
<literallayout class='monospaced'>
${WORKDIR}/pkgdata
</literallayout>
</para>
<para>
The <filename>do_packagedata</filename> task then packages
the data in the temporary work area and installs it into a
shared directory pointed to by
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
</para>
<para>
Do not change this default.
</para>
<para>
The
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task copies the package metadata from
<filename>PKGDESTWORK</filename> to
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
to make it available globally.
</para>
</glossdef>
</glossentry>
@@ -9810,9 +9993,34 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
numbers that could potentially change.
Here are two examples:
<literallayout class='monospaced'>
PREFERRED_VERSION_python = "2.7.3"
PREFERRED_VERSION_python = "3.4.0"
PREFERRED_VERSION_linux-yocto = "3.19%"
</literallayout>
<note>
The specified version is matched against
<link linkend='var-PV'><filename>PV</filename></link>,
which does not necessarily match the version part of
the recipe's filename.
For example, consider two recipes
<filename>foo_1.2.bb</filename> and
<filename>foo_git.bb</filename> where
<filename>foo_git.bb</filename> contains the following
assignment:
<literallayout class='monospaced'>
PV = "1.1+git${SRCPV}"
</literallayout>
In this case, the correct way to select
<filename>foo_git.bb</filename> is by using an
assignment such as the following:
<literallayout class='monospaced'>
PREFERRED_VERSION_foo = "1.1+git%"
</literallayout>
Compare that previous example against the following
incorrect example, which does not work:
<literallayout class='monospaced'>
PREFERRED_VERSION_foo = "git"
</literallayout>
</note>
Sometimes the <filename>PREFERRED_VERSION</filename>
variable can be set by configuration files in a way that
is hard to change.
@@ -9830,6 +10038,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<literallayout class='monospaced'>
PREFERRED_VERSION_linux-yocto_forcevariable = "3.4%"
</literallayout>
<note>
The <filename>_forcevariable</filename> override is
not handled specially.
This override only works because the default value of
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
includes "forcevariable".
</note>
</para>
</glossdef>
</glossentry>
@@ -9942,6 +10157,12 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
libplds4.so"
</literallayout>
</para>
<para>
For more information, see the
"<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
section.
</para>
</glossdef>
</glossentry>
@@ -10236,40 +10457,59 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
<info>
RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)."
RDEPENDS[doc] = "Lists runtime dependencies of a package."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
Lists a package's runtime dependencies (i.e. other packages)
that must be installed in order for the built package to run
correctly.
If a package in this list cannot be found during the build,
you will get a build error.
Lists runtime dependencies of a package.
These dependencies are other packages that must be
installed in order for the package to function correctly.
As an example, the following assignment declares that the
package <filename>foo</filename> needs the packages
<filename>bar</filename> and <filename>baz</filename> to
be installed:
<literallayout class='monospaced'>
RDEPENDS_foo = "bar baz"
</literallayout>
The most common types of package runtime dependencies are
automatically detected and added.
Therefore, most recipes do not need to set
<filename>RDEPENDS</filename>.
For more information, see the
"<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>"
section.
</para>
<para>
When you use the <filename>RDEPENDS</filename> variable
in a recipe, you are essentially stating that the recipe's
The practical effect of the above
<filename>RDEPENDS</filename> assignment is that
<filename>bar</filename> and <filename>baz</filename>
will be declared as dependencies inside the package
<filename>foo</filename> when it is written out by one of
the
<link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>
tasks.
Exactly how this is done depends on which package format
is used, which is determined by
<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>.
When the corresponding package manager installs the
package, it will know to also install the packages on
which it depends.
</para>
<para>
To ensure that the packages <filename>bar</filename> and
<filename>baz</filename> get built, the previous
<filename>RDEPENDS</filename> assignment also causes a task
dependency to be added.
This dependency is from the recipe's
<link linkend='ref-tasks-build'><filename>do_build</filename></link>
task depends on the existence of a specific package.
Consider this simple example for two recipes named "a" and
"b" that produce similarly named IPK packages.
In this example, the <filename>RDEPENDS</filename>
statement appears in the "a" recipe:
<literallayout class='monospaced'>
RDEPENDS_${PN} = "b"
</literallayout>
Here, the dependency is such that the
<filename>do_build</filename> task for recipe "a" depends
on the
<link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>
task of recipe "b".
This means the package file for "b" must be available when
the output for recipe "a" has been completely built.
More importantly, package "a" will be marked as depending
on package "b" in a manner that is understood by the
package manager.
(not to be confused with
<link linkend='ref-tasks-compile'><filename>do_compile</filename></link>)
task to the <filename>do_package_write_*</filename>
task of the recipes that build <filename>bar</filename> and
<filename>baz</filename>.
</para>
<para>
@@ -10289,7 +10529,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
Because the <filename>RDEPENDS</filename> variable applies
to packages being built, you should always use the variable
in a form with an attached package name.
in a form with an attached package name (remember that a
single recipe can build multiple packages).
For example, suppose you are building a development package
that depends on the <filename>perl</filename> package.
In this case, you would use the following
@@ -10317,41 +10558,18 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</para>
<para>
The package name you attach to the
<filename>RDEPENDS</filename> variable must appear
as it would in the <filename>PACKAGES</filename>
namespace before any renaming of the output package by
classes like
<link linkend='ref-classes-debian'><filename>debian</filename></link>.
</para>
<para>
In many cases you do not need to explicitly add
runtime dependencies using
<filename>RDEPENDS</filename> since some automatic
handling occurs:
<itemizedlist>
<listitem><para><emphasis><filename>shlibdeps</filename></emphasis>:
If a runtime package contains a compiled binary,
the build processes the binary in order to
determine any shared libraries
(<filename>.so</filename> files) to which it is
dynamically linked.
The build process adds the packages containing
these libraries to <filename>RDEPENDS</filename>
when creating the runtime package.
In addition, if the shared library is versioned,
the dependency will have the version appended to it
in order to force an upgrade to the appropriate
version if needed.
</para></listitem>
<listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If
the package ships a <filename>pkg-config</filename>
information file, the build process uses this file
to add items to the <filename>RDEPENDS</filename>
variable to create the runtime packages.
</para></listitem>
</itemizedlist>
The package names you use with
<filename>RDEPENDS</filename> must appear as they would in
the <filename>PACKAGES</filename> variable.
The
<link linkend='var-PKG'><filename>PKG</filename></link>
variable allows a different name to be used for
the final package (e.g. the
<link linkend='ref-classes-debian'><filename>debian</filename></link>
class uses this to rename packages), but this final package
name cannot be used with <filename>RDEPENDS</filename>,
which makes sense as <filename>RDEPENDS</filename> is meant
to be independent of the package format used.
</para>
<para>
@@ -11068,6 +11286,33 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</glossdef>
</glossentry>
<glossentry id='var-SDK_INCLUDE_TOOLCHAIN'><glossterm>SDK_INCLUDE_TOOLCHAIN</glossterm>
<info>
SDK_INCLUDE_TOOLCHAIN[doc] = "When set to "1", specifies to include the toolchain in the extensible SDK."
</info>
<glossdef>
<para role="glossdeffirst">
<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
When set to "1", specifies to include the toolchain in the
extensible SDK.
Including the toolchain is useful particularly when
<link linkend='var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></link>
is set to "minimal" to keep the SDK reasonably small
but you still want to provide a usable toolchain.
For example, suppose you want to use the toolchain from an
IDE (e.g. Eclipse) or from other tools and you do not
want to perform additional steps to install the toolchain.
</para>
<para>
The <filename>SDK_INCLUDE_TOOLCHAIN</filename> variable
defaults to "0" if <filename>SDK_EXT_TYPE</filename>
is set to "minimal", and defaults to "1" if
<filename>SDK_EXT_TYPE</filename> is set to "full".
</para>
</glossdef>
</glossentry>
<glossentry id='var-SDK_INHERIT_BLACKLIST'><glossterm>SDK_INHERIT_BLACKLIST</glossterm>
<info>
SDK_INHERIT_BLACKLIST[doc] = "A list of classes to remove from the INHERIT value globally within the extensible SDK configuration."
@@ -12619,6 +12864,13 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
</literallayout>
</para>
<para>
For information on how BitBake uses stamp files to determine
if a task should be rerun, see the
"<link linkend='stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</link>"
section.
</para>
<para>
See <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>,
<link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
@@ -12873,7 +13125,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
For information on Systemd-boot, see the
<ulink url='http://freedesktop.org/wiki/Software/systemd-boot/'>Systemd-boot documentation</ulink>.
<ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>.
</para>
</glossdef>
</glossentry>
@@ -12903,7 +13155,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
For information on Systemd-boot, see the
<ulink url='http://freedesktop.org/wiki/Software/systemd-boot/'>Systemd-boot documentation</ulink>.
<ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>.
</para>
</glossdef>
</glossentry>
@@ -12931,7 +13183,7 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<para>
For information on Systemd-boot, see the
<ulink url='http://freedesktop.org/wiki/Software/systemd-boot/'>Systemd-boot documentation</ulink>.
<ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>.
</para>
</glossdef>
</glossentry>
@@ -14626,7 +14878,9 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
task.
Normally, invalid configure options are simply not passed
to the configure script (e.g. should be removed from
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>).
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
or
<link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>).
However, common options, for example, exist that are passed
to all configure scripts at a class level that might not
be valid for some configure scripts.

View File

@@ -176,16 +176,18 @@
<para>
This section lists variables that define extra build information for recipes.
<itemizedlist>
<listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
</link></filename></para></listitem>
<listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
</filename></para></listitem>
<listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
</filename></para></listitem>
<listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
</filename></para></listitem>
<listitem><para><filename><link linkend='var-PACKAGECONFIG_CONFARGS'>PACKAGECONFIG_CONFARGS</link>
</filename></para></listitem>
<listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
</para></listitem>
<listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
</link></filename></para></listitem>
</itemizedlist>
</para>
</section>

View File

@@ -979,6 +979,115 @@
</section>
</section>
<section id='automatically-added-runtime-dependencies'>
<title>Automatically Added Runtime Dependencies</title>
<para>
The OpenEmbedded build system automatically adds common types of
runtime dependencies between packages, which means you do not need to
explicitly declare the packages using
<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
Two automatic mechanisms exist (<filename>shlibdeps</filename> and
<filename>pcdeps</filename>) that handle shared libraries and
package configuration (pkg-config) modules, respectively.
For other types of runtime dependencies, you must manually declare
the dependencies.
<itemizedlist>
<listitem><para>
<filename>shlibdeps</filename>:
During the
<link linkend='ref-tasks-package'><filename>do_package</filename></link>
task of each recipe, all shared libraries installed by the
recipe are located.
For each shared library, the package that contains the shared
library is registered as providing the shared library.
More specifically, the package is registered as providing the
<ulink url='https://en.wikipedia.org/wiki/Soname'>soname</ulink>
of the library.
The resulting shared-library-to-package mapping
is saved globally in
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
by the
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task.</para>
<para>Simultaneously, all executables and shared libraries
installed by the recipe are inspected to see what shared
libraries they link against.
For each shared library dependency that is found,
<filename>PKGDATA_DIR</filename> is queried to
see if some package (likely from a different recipe) contains
the shared library.
If such a package is found, a runtime dependency is added from
the package that depends on the shared library to the package
that contains the library.</para>
<para>The automatically added runtime dependency also includes
a version restriction.
This version restriction specifies that at least the current
version of the package that provides the shared library must be
used, as if
"<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)"
had been added to
<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
This forces an upgrade of the package containing the shared
library when installing the package that depends on the
library, if needed.</para>
<para>If you want to avoid a package being registered as
providing a particular shared library (e.g. because the library
is for internal use only), then add the library to
<link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
inside the package's recipe.
</para></listitem>
<listitem><para>
<filename>pcdeps</filename>:
During the
<link linkend='ref-tasks-package'><filename>do_package</filename></link>
task of each recipe, all pkg-config modules
(<filename>*.pc</filename> files) installed by the recipe are
located.
For each module, the package that contains the module is
registered as providing the module.
The resulting module-to-package mapping is saved globally in
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
by the
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task.</para>
<para>Simultaneously, all pkg-config modules installed by the
recipe are inspected to see what other pkg-config modules they
depend on.
A module is seen as depending on another module if it contains
a "Requires:" line that specifies the other module.
For each module dependency,
<filename>PKGDATA_DIR</filename> is queried to see if some
package contains the module.
If such a package is found, a runtime dependency is added from
the package that depends on the module to the package that
contains the module.
<note>
The <filename>pcdeps</filename> mechanism most often infers
dependencies between <filename>-dev</filename> packages.
</note>
</para></listitem>
</itemizedlist>
</para>
<para>
The <filename>do_package</filename> task depends on the
<link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
task of each recipe in
<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
through use of a
<filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
declaration, which guarantees that the required
shared-library/module-to-package mapping information will be available
when needed as long as <filename>DEPENDS</filename> has been
correctly set.
</para>
</section>
<section id='fakeroot-and-pseudo'>
<title>Fakeroot and Pseudo</title>

View File

@@ -248,6 +248,88 @@
</para>
</section>
<section id='viewing-package-information-with-oe-pkgdata-util'>
<title>Viewing Package Information with <filename>oe-pkgdata-util</filename></title>
<para>
You can use the <filename>oe-pkgdata-util</filename> command-line
utility to query
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
and display various package-related information.
When you use the utility, you must use it to view information
on packages that have already been built.
</para>
<para>
Following are a few of the available
<filename>oe-pkgdata-util</filename> subcommands.
<note>
You can use the standard * and ? globbing wildcards as part of
package names and paths.
</note>
<itemizedlist>
<listitem><para>
<filename>oe-pkgdata-util list-pkgs [</filename><replaceable>pattern</replaceable><filename>]</filename>:
Lists all packages that have been built, optionally
limiting the match to packages that match
<replaceable>pattern</replaceable>.
</para></listitem>
<listitem><para>
<filename>oe-pkgdata-util list-pkg-files&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
Lists the files and directories contained in the given
packages.
<note>
<para>
A different way to view the contents of a package is
to look at the
<filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/packages-split</filename>
directory of the recipe that generates the
package.
This directory is created by the
<link linkend='ref-tasks-package'><filename>do_package</filename></link>
task and has one subdirectory for each package the
recipe generates, which contains the files stored in
that package.</para>
<para>
If you want to inspect the
<filename>${WORKDIR}/packages-split</filename>
directory, make sure that
<link linkend='ref-classes-rm-work'><filename>rm_work</filename></link>
is not enabled when you build the recipe.
</para>
</note>
</para></listitem>
<listitem><para>
<filename>oe-pkgdata-util find-path&nbsp;</filename><replaceable>path</replaceable><filename>&nbsp;...</filename>:
Lists the names of the packages that contain the given
paths.
For example, the following tells us that
<filename>/usr/share/man/man1/make.1</filename>
is contained in the <filename>make-doc</filename>
package:
<literallayout class='monospaced'>
$ oe-pkgdata-util find-path /usr/share/man/man1/make.1
make-doc: /usr/share/man/man1/make.1
</literallayout>
</para></listitem>
<listitem><para>
<filename>oe-pkgdata-util lookup-recipe&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
Lists the name of the recipes that
produce the given packages.
</para></listitem>
</itemizedlist>
</para>
<para>
For more information on the <filename>oe-pkgdata-util</filename>
command, use the help facility:
<literallayout class='monospaced'>
$ oe-pkgdata-util &dash;&dash;help
$ oe-pkgdata-util <replaceable>subcommand</replaceable> --help
</literallayout>
</para>
</section>
<section id='usingpoky-viewing-dependencies-between-recipes-and-tasks'>
<title>Viewing Dependencies Between Recipes and Tasks</title>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 160 KiB

View File

@@ -381,6 +381,19 @@
section for more information.
</note>
</para>
<para>
You can explicitly control whether or not to include the toolchain
when you build an SDK by setting the
<ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink>
variable to "1".
In particular, it is useful to include the toolchain when you
have set <filename>SDK_EXT_TYPE</filename> to
"minimal", which by default, excludes the toolchain.
Also, it is helpful if you are building a small SDK for use with
an IDE, such as Eclipse, or some other tool where you do not want
to take extra steps to install a toolchain.
</para>
</section>
</appendix>
<!--

View File

@@ -210,19 +210,6 @@
</para></listitem>
<listitem><para>Use Git to checkout the correct
tag:
<note><title>Developer's Note</title>
<para role='writernotes'>
Because the 2.2 tag will not exist until after
the release, I must first do the following
before running the
<filename>git checkout mars/yocto-&DISTRO;</filename>
command in this step:
<literallayout class='monospaced'>
$ git tag mars/yocto-2.2 origin/mars-master
</literallayout></para>
</note>
<literallayout class='monospaced'>
$ cd ~/eclipse-poky
$ git checkout mars/yocto-&DISTRO;
@@ -291,15 +278,6 @@
<listitem><para>Check the boxes that appear in
the installation window to install the
following:
<note><title>Developer's Note</title>
<para role='writernotes'>
Right now, a check box for BitBake Commander
is appearing.
This probably needs removed.
Do not check this box.</para>
</note>
<literallayout class='monospaced'>
Yocto Project SDK Plug-in
Yocto Project Documentation plug-in
@@ -500,7 +478,7 @@
<ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/RunningEclipseAgainstBuiltImage'>wiki</ulink>.
In this case, you specify your Build Directory path
followed by the image (e.g.
<filename>/home/scottrif/poky/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
<filename>/home/scottrif/poky/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin</filename>).
</para>
<para>If you selected the standalone pre-built
toolchain, the pre-built image you downloaded is
@@ -812,8 +790,24 @@
</para></listitem>
<listitem><para>Click "Next".
</para></listitem>
<listitem><para>Clear out the "host name" field and enter
the IP Address determined earlier (e.g. 192.168.7.2).
<listitem><para>Clear out the "Connection name" field and
enter any name you want for the connection.
</para></listitem>
<listitem><para>Put the IP address for the connection in
the "Host" field.
For QEMU, the default is <filename>192.168.7.2</filename>.
However, if a previous QEMU session did not exit
cleanly, the IP address increments (e.g.
<filename>192.168.7.3</filename>).
<note>
You can find the IP address for the current QEMU
session by looking in the xterm that opens when
you launch QEMU.
</note>
</para></listitem>
<listitem><para>Enter <filename>root</filename>, which
is the default for QEMU, for the "User" field.
Be sure to leave the password field empty.
</para></listitem>
<listitem><para>Click "Finish" to close the
New Connections Dialog.

View File

@@ -343,42 +343,37 @@
However, <filename>devtool</filename> does not provide a
specific command that allows you to do this.
</para></listitem>
<listitem><para><emphasis>Optionally Update the Recipe With Patch Files</emphasis>:
Once you are satisfied with the recipe, if you have made
any changes to the source tree that you want to have
applied by the recipe, you need to generate patches
from those changes.
You do this before moving the recipe
to its final layer and cleaning up the workspace area
<filename>devtool</filename> uses.
This optional step is especially relevant if you are
using or adding third-party software.</para>
<para>To convert commits created using Git to patch files,
use the <filename>devtool update-recipe</filename> command.
<listitem><para>
<emphasis>Finish Your Work With the Recipe</emphasis>:
The <filename>devtool finish</filename> command creates
any patches corresponding to commits in the local
Git repository, moves the new recipe to a more permanent
layer, and then resets the recipe so that the recipe is
built normally rather than from the workspace.
<literallayout class='monospaced'>
$ devtool finish <replaceable>recipe layer</replaceable>
</literallayout>
<note>
Any changes you want to turn into patches must be
committed to the Git repository in the source tree.
</note></para>
<para>As mentioned, the <filename>devtool finish</filename>
command moves the final recipe to its permanent layer.
</para>
<para>As a final process of the
<filename>devtool finish</filename> command, the state
of the standard layers and the upstream source is
restored so that you can build the recipe from those
areas rather than the workspace.
<note>
You can use the <filename>devtool reset</filename>
command to put things back should you decide you
do not want to proceed with your work.
If you do use this command, realize that the source
tree is preserved.
</note>
<literallayout class='monospaced'>
$ devtool update-recipe <replaceable>recipe</replaceable>
</literallayout>
</para></listitem>
<listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
Before cleaning up the workspace, you need to move the
final recipe to its permanent layer.
You must do this before using the
<filename>devtool reset</filename> command if you want to
retain the recipe.
</para></listitem>
<listitem><para><emphasis>Reset the Recipe</emphasis>:
As a final step, you can restore the state such that
standard layers and the upstream source is used to build
the recipe rather than data in the workspace.
To reset the recipe, use the <filename>devtool reset</filename>
command:
<literallayout class='monospaced'>
$ devtool reset <replaceable>recipe</replaceable>
</literallayout>
</para></listitem>
</orderedlist>
</para>
@@ -569,42 +564,43 @@
However, <filename>devtool</filename> does not provide a
specific command that allows you to do this.
</para></listitem>
<listitem><para><emphasis>Optionally Create Patch Files for Your Changes</emphasis>:
After you have debugged your changes, you can
use <filename>devtool update-recipe</filename> to
generate patch files for all the commits you have
made.
<note>
Patch files are generated only for changes
you have committed.
</note>
<listitem><para>
<emphasis>Finish Your Work With the Recipe</emphasis>:
The <filename>devtool finish</filename> command creates
any patches corresponding to commits in the local
Git repository, updates the recipe to point to them
(or creates a <filename>.bbappend</filename> file to do
so, depending on the specified destination layer), and
then resets the recipe so that the recipe is built normally
rather than from the workspace.
<literallayout class='monospaced'>
$ devtool update-recipe <replaceable>recipe</replaceable>
$ devtool finish <replaceable>recipe layer</replaceable>
</literallayout>
By default, the
<filename>devtool update-recipe</filename> command
creates the patch files in a folder named the same
as the recipe beneath the folder in which the recipe
resides, and updates the recipe's
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
statement to point to the generated patch files.
<note>
You can use the
"--append <replaceable>LAYERDIR</replaceable>"
option to cause the command to create append files
in a specific layer rather than the default
recipe layer.
Any changes you want to turn into patches must be
committed to the Git repository in the source tree.
</note></para>
<para>Because there is no need to move the recipe,
<filename>devtool finish</filename> either updates the
original recipe in the original layer or the command
creates a <filename>.bbappend</filename> in a different
layer as provided by <replaceable>layer</replaceable>.
</para>
<para>As a final process of the
<filename>devtool finish</filename> command, the state
of the standard layers and the upstream source is
restored so that you can build the recipe from those
areas rather than the workspace.
<note>
You can use the <filename>devtool reset</filename>
command to put things back should you decide you
do not want to proceed with your work.
If you do use this command, realize that the source
tree is preserved.
</note>
</para></listitem>
<listitem><para><emphasis>Restore the Workspace</emphasis>:
The <filename>devtool reset</filename> restores the
state so that standard layers and upstream sources are
used to build the recipe rather than what is in the
workspace.
<literallayout class='monospaced'>
$ devtool reset <replaceable>recipe</replaceable>
</literallayout>
</para></listitem>
</orderedlist>
</para>
</section>
@@ -641,8 +637,7 @@
Binary package (i.e. "-b" option)
</para></listitem>
<listitem><para>
Node.js module through
<filename>npm</filename>
Node.js module
</para></listitem>
<listitem><para>
Python modules that use <filename>setuptools</filename>
@@ -781,7 +776,7 @@
If the <filename>devtool add</filename> command cannot
determine licensing information, the
<filename>LICENSE</filename> value is set to "CLOSED" and the
<filename>LIC_FILES_CHKSUM</filename> vaule remains unset.
<filename>LIC_FILES_CHKSUM</filename> value remains unset.
This behavior allows you to continue with development but is
unlikely to be correct in all cases.
Consequently, you should check the documentation or source
@@ -849,7 +844,10 @@
To force the value on the command line, add the
variable setting to
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></ulink>
within the recipe as follows:
or
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
within the recipe.
Here is an example using <filename>EXTRA_OEMAKE</filename>:
<literallayout class='monospaced'>
EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'"
</literallayout>
@@ -918,8 +916,15 @@
<title>Adding Node.js Modules</title>
<para>
You can use the <filename>devtool add</filename> command in the
following form to add Node.js modules:
You can use the <filename>devtool add</filename> command two
different ways to add Node.js modules: 1) Through
<filename>npm</filename> and, 2) from a repository or local
source.
</para>
<para>
Use the following form to add Node.js modules through
<filename>npm</filename>:
<literallayout class='monospaced'>
$ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1"
</literallayout>
@@ -952,6 +957,21 @@
</itemizedlist>
</note>
</para>
<para>
As mentioned earlier, you can also add Node.js modules
directly from a repository or local source tree.
To add modules this way, use <filename>devtool add</filename> in
the following form:
<literallayout class='monospaced'>
$ devtool add https://github.com/diversario/node-ssdp
</literallayout>
In this example, <filename>devtool</filename> fetches the specified
Git repository, detects that the code is Node.js code, fetches
dependencies using <filename>npm</filename>, and sets
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
accordingly.
</para>
</section>
</section>
@@ -1062,9 +1082,12 @@
then a fixed set of arguments is passed to it to enable
cross-compilation plus any extras specified by
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
or
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
set within the recipe.
If you wish to pass additional options, add them to
<filename>EXTRA_OECONF</filename>.
<filename>EXTRA_OECONF</filename> or
<filename>PACKAGECONFIG_CONFARGS</filename>.
Other supported build tools have similar variables
(e.g.
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></ulink>
@@ -1072,8 +1095,9 @@
<ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></ulink>
for Scons, and so forth).
If you need to pass anything on the <filename>make</filename>
command line, you can use <filename>EXTRA_OEMAKE</filename> to do
so.
command line, you can use <filename>EXTRA_OEMAKE</filename> or the
<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
variables to do so.
</para>
<para>
@@ -1081,7 +1105,8 @@
to help you set the arguments listed in the previous paragraph.
The command determines the exact options being passed, and shows
them to you along with any custom arguments specified through
<filename>EXTRA_OECONF</filename>.
<filename>EXTRA_OECONF</filename> or
<filename>PACKAGECONFIG_CONFARGS</filename>.
If applicable, the command also shows you the output of the
configure script's "&dash;&dash;help" option as a reference.
</para>

File diff suppressed because it is too large Load Diff

View File

@@ -255,8 +255,7 @@
tar 1.24 or greater
</para></listitem>
<listitem><para>
Python 2.7.3 or greater excluding Python
3.x, which is not supported.
Python 3.4.0 or greater.
</para></listitem>
</itemizedlist>
If your build host does not meet any of these three listed

View File

@@ -42,6 +42,7 @@ RECIPE_MAINTAINER_pn-apr-util = "Hongxu Jia <hongxu.jia@windriver.com>"
RECIPE_MAINTAINER_pn-apt = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-apt-native = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-argp-standalone = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER_pn-asciidoc = "Dengke Du <dengke.du@windriver.com>"
RECIPE_MAINTAINER_pn-aspell = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-at = "Chen Qi <Qi.Chen@windriver.com>"
RECIPE_MAINTAINER_pn-at-spi2-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
@@ -503,6 +504,7 @@ RECIPE_MAINTAINER_pn-mesa-demos = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
RECIPE_MAINTAINER_pn-mesa-gl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
RECIPE_MAINTAINER_pn-meta-environment = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-meta-environment-extsdk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-meta-extsdk-toolchain = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER_pn-meta-ide-support = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-meta-toolchain = "Cristian Iorga <cristian.iorga@intel.com>"
RECIPE_MAINTAINER_pn-meta-world-pkgdata = "Richard Purdie <richard.purdie@linuxfoundation.org>"
@@ -641,6 +643,7 @@ RECIPE_MAINTAINER_pn-python-pyrex = "Alejandro Hernandez <alejandro.hernandez@li
RECIPE_MAINTAINER_pn-python-scons = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python-scons-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python-setuptools = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python-six = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python-smartpm = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python-smmap = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python3 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
@@ -657,6 +660,7 @@ RECIPE_MAINTAINER_pn-python3-numpy = "Alejandro Hernandez <alejandro.hernandez@l
RECIPE_MAINTAINER_pn-python3-pip = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python3-pygobject = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python3-setuptools = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python3-six = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-python3-smmap = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
RECIPE_MAINTAINER_pn-qemu = "Aníbal Limón <anibal.limon@linux.intel.com>"
RECIPE_MAINTAINER_pn-qemu-helper-native = "Aníbal Limón <anibal.limon@linux.intel.com>"

View File

@@ -81,6 +81,7 @@ SANITY_TESTED_DISTROS ?= " \
Ubuntu-16.04 \n \
Fedora-22 \n \
Fedora-23 \n \
Fedora-24 \n \
CentOSLinux-7.* \n \
Debian-8.* \n \
openSUSE-13.2 \n \

View File

@@ -7,7 +7,7 @@ IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
IMAGE_FSTYPES = "wic"
RM_OLD_IMAGE = "1"
DEPENDS = "syslinux syslinux-native parted-native dosfstools-native mtools-native gptfdisk-native"
DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

View File

@@ -22,7 +22,7 @@ EXTRA_IMAGECMD_jffs2 = "-lnp "
SERIAL_CONSOLE = "115200 ttyO0"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "4.4%"
PREFERRED_VERSION_linux-yocto ?= "4.8%"
KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb"

View File

@@ -11,7 +11,7 @@ KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "4.4%"
PREFERRED_VERSION_linux-yocto ?= "4.8%"
SERIAL_CONSOLE = "115200 ttyS0"
USE_VT ?= "0"

View File

@@ -6,3 +6,5 @@
DEFAULTTUNE ?= "core2-64"
require conf/machine/include/tune-core2.inc
require conf/machine/include/genericx86-common.inc
PREFERRED_VERSION_linux-yocto_genericx86-64 ?= "4.8%"

View File

@@ -8,3 +8,5 @@ require conf/machine/include/tune-core2.inc
require conf/machine/include/genericx86-common.inc
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check"
PREFERRED_VERSION_linux-yocto_genericx86 ?= "4.8%"

View File

@@ -1,4 +1,5 @@
include conf/machine/include/x86-base.inc
require conf/machine/include/qemuboot-x86.inc
MACHINE_FEATURES += "wifi efi pcbios"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
@@ -18,3 +19,7 @@ MACHINE_EXTRA_RRECOMMENDS += "linux-firmware eee-acpi-scripts"
GLIBC_ADDONS = "nptl"
EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
IMAGE_FSTYPES += "wic"
WKS_FILE = "directdisk.wks"
do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot syslinux-native:do_populate_sysroot syslinux:do_build"

View File

@@ -14,7 +14,7 @@ SERIAL_CONSOLE = "115200 ttyS0"
MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
PREFERRED_VERSION_linux-yocto ?= "4.4%"
PREFERRED_VERSION_linux-yocto ?= "4.8%"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"

View File

@@ -7,11 +7,11 @@ KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
SRCREV_machine_genericx86 ?= "0847ed67f89b5a8bbaaa0a7b6cfa2a99ef34834f"
SRCREV_machine_genericx86-64 ?= "0847ed67f89b5a8bbaaa0a7b6cfa2a99ef34834f"
SRCREV_machine_edgerouter ?= "403eda4633e9037fb715d0d1e8ae847b2bd0651a"
SRCREV_machine_beaglebone ?= "859aecf685fcd9d30490a6da459fb76b48947075"
SRCREV_machine_mpc8315e-rdb ?= "403eda4633e9037fb715d0d1e8ae847b2bd0651a"
SRCREV_machine_genericx86 ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
SRCREV_machine_genericx86-64 ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
SRCREV_machine_edgerouter ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
SRCREV_machine_beaglebone ?= "2ccca89503ed8c3f37b486b29d2ec3a6699f1899"
SRCREV_machine_mpc8315e-rdb ?= "a6b3a8cc120640bf5e528c8558ce060675757fc1"
COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
@@ -19,5 +19,8 @@ COMPATIBLE_MACHINE_edgerouter = "edgerouter"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
LINUX_VERSION_genericx86 = "4.1.30"
LINUX_VERSION_genericx86-64 = "4.1.30"
LINUX_VERSION_genericx86 = "4.1.32"
LINUX_VERSION_genericx86-64 = "4.1.32"
LINUX_VERSION_edgerouter = "4.1.32"
LINUX_VERSION_beaglebone = "4.1.32"
LINUX_VERSION_mpc8315e-rdb = "4.1.32"

View File

@@ -7,11 +7,11 @@ KBRANCH_edgerouter = "standard/edgerouter"
KBRANCH_beaglebone = "standard/beaglebone"
KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
SRCREV_machine_genericx86 ?= "0a0c93f29c0d65c00abdd2f6d1eb89134fae9525"
SRCREV_machine_genericx86-64 ?= "0a0c93f29c0d65c00abdd2f6d1eb89134fae9525"
SRCREV_machine_edgerouter ?= "628bf627561c6285d99fb978e11d4c15fc29324b"
SRCREV_machine_beaglebone ?= "628bf627561c6285d99fb978e11d4c15fc29324b"
SRCREV_machine_mpc8315e-rdb ?= "94ac8da44990afd2d43c0ccd713420fb1cfa0792"
SRCREV_machine_genericx86 ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
SRCREV_machine_genericx86-64 ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
SRCREV_machine_edgerouter ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
SRCREV_machine_beaglebone ?= "7d1401a0dd9bebfe49937ca7d9785972e0cc76d0"
SRCREV_machine_mpc8315e-rdb ?= "2d7b24e9c0d40d8317a0b9e1b0eefb8280e50d5f"
COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
@@ -19,5 +19,8 @@ COMPATIBLE_MACHINE_edgerouter = "edgerouter"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
LINUX_VERSION_genericx86 = "4.4.18"
LINUX_VERSION_genericx86-64 = "4.4.18"
LINUX_VERSION_genericx86 = "4.4.20"
LINUX_VERSION_genericx86-64 = "4.4.20"
LINUX_VERSION_edgerouter = "4.4.20"
LINUX_VERSION_beaglebone = "4.4.20"
LINUX_VERSION_mpc8315e-rdb = "4.4.20"

View File

@@ -0,0 +1,26 @@
KBRANCH_genericx86 = "standard/base"
KBRANCH_genericx86-64 = "standard/base"
KMACHINE_genericx86 ?= "common-pc"
KMACHINE_genericx86-64 ?= "common-pc-64"
KBRANCH_edgerouter = "standard/edgerouter"
KBRANCH_beaglebone = "standard/beaglebone"
KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
SRCREV_machine_genericx86 ?= "eb9c19c72d40a4bb8a6a3b7b949e41e5c31c0d94"
SRCREV_machine_genericx86-64 ?= "eb9c19c72d40a4bb8a6a3b7b949e41e5c31c0d94"
SRCREV_machine_edgerouter ?= "eb9c19c72d40a4bb8a6a3b7b949e41e5c31c0d94"
SRCREV_machine_beaglebone ?= "eb9c19c72d40a4bb8a6a3b7b949e41e5c31c0d94"
SRCREV_machine_mpc8315e-rdb ?= "b5c48c7a5d6473373fe7f1e2e8d7b0cf57929908"
COMPATIBLE_MACHINE_genericx86 = "genericx86"
COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
COMPATIBLE_MACHINE_edgerouter = "edgerouter"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
LINUX_VERSION_genericx86 = "4.8-rc7"
LINUX_VERSION_genericx86-64 = "4.8-rc7"
LINUX_VERSION_edgerouter = "4.8-rc7"
LINUX_VERSION_beaglebone = "4.8-rc7"
LINUX_VERSION_mpc8315e-rdb = "4.8-rc7"

View File

@@ -25,7 +25,7 @@ inherit siteinfo
# Space separated list of shell scripts with variables defined to supply test
# results for autoconf tests we cannot run at build time.
export CONFIG_SITE = "${@siteinfo_get_files(d, False)}"
export CONFIG_SITE = "${@siteinfo_get_files(d)}"
acpaths = "default"
EXTRA_AUTORECONF = "--exclude=autopoint"
@@ -137,6 +137,8 @@ do_configure[postfuncs] += "autotools_postconfigure"
ACLOCALDIR = "${WORKDIR}/aclocal-copy"
python autotools_copy_aclocals () {
import copy
s = d.getVar("AUTOTOOLS_SCRIPT_PATH", True)
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
@@ -165,36 +167,63 @@ python autotools_copy_aclocals () {
if start is None:
bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
# We need to find configure tasks which are either from <target> -> <target>
# or <native> -> <native> but not <target> -> <native> unless they're direct
# dependencies. This mirrors what would get restored from sstate.
done = [start]
next = [start]
# We need to figure out which m4 files we need to expose to this do_configure task.
# This needs to match what would get restored from sstate, which is controlled
# ultimately by calls from bitbake to setscene_depvalid().
# That function expects a setscene dependency tree. We build a dependency tree
# condensed to do_populate_sysroot -> do_populate_sysroot dependencies, similar to
# that used by setscene tasks. We can then call into setscene_depvalid() and decide
# which dependencies we can "see" and should expose the m4 files for.
setscenedeps = copy.deepcopy(taskdepdata)
start = set([start])
# Create collapsed do_populate_sysroot -> do_populate_sysroot tree
for dep in taskdepdata:
data = setscenedeps[dep]
if data[1] != "do_populate_sysroot":
for dep2 in setscenedeps:
data2 = setscenedeps[dep2]
if dep in data2[3]:
data2[3].update(setscenedeps[dep][3])
data2[3].remove(dep)
if dep in start:
start.update(setscenedeps[dep][3])
start.remove(dep)
del setscenedeps[dep]
# Remove circular references
for dep in setscenedeps:
if dep in setscenedeps[dep][3]:
setscenedeps[dep][3].remove(dep)
# Direct dependencies should be present and can be depended upon
for dep in start:
configuredeps.append(setscenedeps[dep][0])
# Call into setscene_depvalid for each sub-dependency and only copy m4 files
# for ones that would be restored from sstate.
done = list(start)
next = list(start)
while next:
new = []
for dep in next:
data = taskdepdata[dep]
data = setscenedeps[dep]
for datadep in data[3]:
if datadep in done:
continue
if (not data[0].endswith("-native")) and taskdepdata[datadep][0].endswith("-native") and dep != start:
taskdeps = {}
taskdeps[dep] = setscenedeps[dep][:2]
taskdeps[datadep] = setscenedeps[datadep][:2]
retval = setscene_depvalid(datadep, taskdeps, [], d)
if retval:
bb.note("Skipping setscene dependency %s for m4 macro copying" % datadep)
continue
done.append(datadep)
new.append(datadep)
if taskdepdata[datadep][1] == "do_configure":
configuredeps.append(taskdepdata[datadep][0])
configuredeps.append(setscenedeps[datadep][0])
next = new
#configuredeps2 = []
#for dep in taskdepdata:
# data = taskdepdata[dep]
# if data[1] == "do_configure" and data[0] != pn:
# configuredeps2.append(data[0])
#configuredeps.sort()
#configuredeps2.sort()
#bb.warn(str(configuredeps))
#bb.warn(str(configuredeps2))
cp = []
if nodeps:
bb.warn("autotools: Unable to find task dependencies, -b being used? Pulling in all m4 files")
@@ -224,8 +253,9 @@ python autotools_copy_aclocals () {
t = os.path.join(aclocaldir, os.path.basename(c))
if not os.path.exists(t):
os.symlink(c, t)
d.setVar("CONFIG_SITE", siteinfo_get_files(d, False))
# Refresh variable with cache files
d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True))
}
autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"

View File

@@ -309,7 +309,7 @@ base_do_compile() {
}
addtask install after do_compile
do_install[dirs] = "${D} ${B}"
do_install[dirs] = "${B}"
# Remove and re-create ${D} so that is it guaranteed to be empty
do_install[cleandirs] = "${D}"
@@ -472,7 +472,7 @@ python () {
else:
raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))
source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0)
source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
if not source_mirror_fetch:
need_host = d.getVar('COMPATIBLE_HOST', True)
if need_host:

View File

@@ -68,4 +68,16 @@ do_install () {
USE_NLS = "no"
export CC = "${BUILD_CC}"
export CXX = "${BUILD_CXX}"
export FC = "${BUILD_FC}"
export CPP = "${BUILD_CPP}"
export LD = "${BUILD_LD}"
export CCLD = "${BUILD_CCLD}"
export AR = "${BUILD_AR}"
export AS = "${BUILD_AS}"
export RANLIB = "${BUILD_RANLIB}"
export STRIP = "${BUILD_STRIP}"
export NM = "${BUILD_NM}"
inherit nopackages

View File

@@ -0,0 +1,267 @@
# This class is used to check recipes against public CVEs.
#
# In order to use this class just inherit the class in the
# local.conf file and it will add the cve_check task for
# every recipe. The task can be used per recipe, per image,
# or using the special cases "world" and "universe". The
# cve_check task will print a warning for every unpatched
# CVE found and generate a file in the recipe WORKDIR/cve
# directory. If an image is build it will generate a report
# in DEPLOY_DIR_IMAGE for all the packages used.
#
# Example:
# bitbake -c cve_check openssl
# bitbake core-image-sato
# bitbake -k -c cve_check universe
#
# DISCLAIMER
#
# This class/tool is meant to be used as support and not
# the only method to check against CVEs. Running this tool
# doesn't guarantee your packages are free of CVEs.
CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
CVE_CHECK_LOCAL_DIR ?= "${WORKDIR}/cve"
CVE_CHECK_LOCAL_FILE ?= "${CVE_CHECK_LOCAL_DIR}/cve.log"
CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check"
CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
CVE_CHECK_MANIFEST ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cve"
CVE_CHECK_COPY_FILES ??= "1"
CVE_CHECK_CREATE_MANIFEST ??= "1"
# Whitelist for packages (PN)
CVE_CHECK_PN_WHITELIST = "\
glibc-locale \
"
# Whitelist for CVE and version of package
CVE_CHECK_CVE_WHITELIST = "{\
'CVE-2014-2524': ('6.3',), \
}"
python do_cve_check () {
"""
Check recipe for patched and unpatched CVEs
"""
if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE", True)):
patched_cves = get_patches_cves(d)
patched, unpatched = check_cves(d, patched_cves)
if patched or unpatched:
cve_data = get_cve_info(d, patched + unpatched)
cve_write_data(d, patched, unpatched, cve_data)
else:
bb.note("Failed to update CVE database, skipping CVE check")
}
addtask cve_check after do_unpack before do_build
do_cve_check[depends] = "cve-check-tool-native:do_populate_cve_db"
do_cve_check[nostamp] = "1"
python cve_check_cleanup () {
"""
Delete the file used to gather all the CVE information.
"""
bb.utils.remove(e.data.getVar("CVE_CHECK_TMP_FILE", True))
}
addhandler cve_check_cleanup
cve_check_cleanup[eventmask] = "bb.cooker.CookerExit"
python cve_check_write_rootfs_manifest () {
"""
Create CVE manifest when building an image
"""
import shutil
if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE", True)):
bb.note("Writing rootfs CVE manifest")
deploy_dir = d.getVar("DEPLOY_DIR_IMAGE", True)
link_name = d.getVar("IMAGE_LINK_NAME", True)
manifest_name = d.getVar("CVE_CHECK_MANIFEST", True)
cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE", True)
shutil.copyfile(cve_tmp_file, manifest_name)
if manifest_name and os.path.exists(manifest_name):
manifest_link = os.path.join(deploy_dir, "%s.cve" % link_name)
# If we already have another manifest, update symlinks
if os.path.exists(os.path.realpath(manifest_link)):
if d.getVar('RM_OLD_IMAGE', True) == "1":
os.remove(os.path.realpath(manifest_link))
os.remove(manifest_link)
os.symlink(os.path.basename(manifest_name), manifest_link)
bb.plain("Image CVE report stored in: %s" % manifest_name)
}
ROOTFS_POSTPROCESS_COMMAND_prepend = "${@'cve_check_write_rootfs_manifest; ' if d.getVar('CVE_CHECK_CREATE_MANIFEST', True) == '1' else ''}"
def get_patches_cves(d):
"""
Get patches that solve CVEs using the "CVE: " tag.
"""
import re
pn = d.getVar("PN", True)
cve_match = re.compile("CVE:( CVE\-\d{4}\-\d+)+")
patched_cves = set()
bb.debug(2, "Looking for patches that solves CVEs for %s" % pn)
for url in src_patches(d):
patch_file = bb.fetch.decodeurl(url)[2]
with open(patch_file, "r", encoding="utf-8") as f:
try:
patch_text = f.read()
except UnicodeDecodeError:
bb.debug(1, "Failed to read patch %s using UTF-8 encoding"
" trying with iso8859-1" % patch_file)
f.close()
with open(patch_file, "r", encoding="iso8859-1") as f:
patch_text = f.read()
# Search for the "CVE: " line
match = cve_match.search(patch_text)
if match:
# Get only the CVEs without the "CVE: " tag
cves = patch_text[match.start()+5:match.end()]
for cve in cves.split():
bb.debug(2, "Patch %s solves %s" % (patch_file, cve))
patched_cves.add(cve)
else:
bb.debug(2, "Patch %s doesn't solve CVEs" % patch_file)
return patched_cves
def check_cves(d, patched_cves):
"""
Run cve-check-tool looking for patched and unpatched CVEs.
"""
import ast, csv, tempfile, subprocess, io
cves_patched = []
cves_unpatched = []
bpn = d.getVar("BPN", True)
pv = d.getVar("PV", True).split("git+")[0]
cves = " ".join(patched_cves)
cve_db_dir = d.getVar("CVE_CHECK_DB_DIR", True)
cve_whitelist = ast.literal_eval(d.getVar("CVE_CHECK_CVE_WHITELIST", True))
cve_cmd = "cve-check-tool"
cmd = [cve_cmd, "--no-html", "--csv", "--not-affected", "-t", "faux", "-d", cve_db_dir]
# If the recipe has been whitlisted we return empty lists
if d.getVar("PN", True) in d.getVar("CVE_CHECK_PN_WHITELIST", True).split():
bb.note("Recipe has been whitelisted, skipping check")
return ([], [])
# It is needed to export the proxies to download the database using HTTP
bb.utils.export_proxies(d)
try:
# Write the faux CSV file to be used with cve-check-tool
fd, faux = tempfile.mkstemp(prefix="cve-faux-")
with os.fdopen(fd, "w") as f:
f.write("%s,%s,%s," % (bpn, pv, cves))
cmd.append(faux)
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
bb.debug(2, "Output of command %s:\n%s" % ("\n".join(cmd), output))
except subprocess.CalledProcessError as e:
bb.warn("Couldn't check for CVEs: %s (output %s)" % (e, e.output))
finally:
os.remove(faux)
for row in csv.reader(io.StringIO(output)):
# Third row has the unpatched CVEs
if row[2]:
for cve in row[2].split():
# Skip if the CVE has been whitlisted for the current version
if pv in cve_whitelist.get(cve,[]):
bb.note("%s-%s has been whitelisted for %s" % (bpn, pv, cve))
else:
cves_unpatched.append(cve)
bb.debug(2, "%s-%s is not patched for %s" % (bpn, pv, cve))
# Fourth row has patched CVEs
if row[3]:
for cve in row[3].split():
cves_patched.append(cve)
bb.debug(2, "%s-%s is patched for %s" % (bpn, pv, cve))
return (cves_patched, cves_unpatched)
def get_cve_info(d, cves):
"""
Get CVE information from the database used by cve-check-tool.
Unfortunately the only way to get CVE info is set the output to
html (hard to parse) or query directly the database.
"""
try:
import sqlite3
except ImportError:
from pysqlite2 import dbapi2 as sqlite3
cve_data = {}
db_file = d.getVar("CVE_CHECK_DB_FILE", True)
placeholder = ",".join("?" * len(cves))
query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholder
conn = sqlite3.connect(db_file)
cur = conn.cursor()
for row in cur.execute(query, tuple(cves)):
cve_data[row[0]] = {}
cve_data[row[0]]["summary"] = row[1]
cve_data[row[0]]["score"] = row[2]
cve_data[row[0]]["modified"] = row[3]
cve_data[row[0]]["vector"] = row[4]
conn.close()
return cve_data
def cve_write_data(d, patched, unpatched, cve_data):
"""
Write CVE information in WORKDIR; and to CVE_CHECK_DIR, and
CVE manifest if enabled.
"""
cve_file = d.getVar("CVE_CHECK_LOCAL_FILE", True)
nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
write_string = ""
first_alert = True
bb.utils.mkdirhier(d.getVar("CVE_CHECK_LOCAL_DIR", True))
for cve in sorted(cve_data):
write_string += "PACKAGE NAME: %s\n" % d.getVar("PN", True)
write_string += "PACKAGE VERSION: %s\n" % d.getVar("PV", True)
write_string += "CVE: %s\n" % cve
if cve in patched:
write_string += "CVE STATUS: Patched\n"
else:
write_string += "CVE STATUS: Unpatched\n"
if first_alert:
bb.warn("Found unpatched CVE, for more information check %s" % cve_file)
first_alert = False
write_string += "CVE SUMMARY: %s\n" % cve_data[cve]["summary"]
write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["score"]
write_string += "VECTOR: %s\n" % cve_data[cve]["vector"]
write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve)
with open(cve_file, "w") as f:
bb.note("Writing file %s with CVE information" % cve_file)
f.write(write_string)
if d.getVar("CVE_CHECK_COPY_FILES", True) == "1":
cve_dir = d.getVar("CVE_CHECK_DIR", True)
bb.utils.mkdirhier(cve_dir)
deploy_file = os.path.join(cve_dir, d.getVar("PN", True))
with open(deploy_file, "w") as f:
f.write(write_string)
if d.getVar("CVE_CHECK_CREATE_MANIFEST", True) == "1":
with open(d.getVar("CVE_CHECK_TMP_FILE", True), "a") as f:
f.write("%s" % write_string)

View File

@@ -29,6 +29,23 @@ EXTERNALSRC_SYMLINKS ?= "oe-workdir:${WORKDIR} oe-logs:${T}"
python () {
externalsrc = d.getVar('EXTERNALSRC', True)
# If this is the base recipe and EXTERNALSRC is set for it or any of its
# derivatives, then enable BB_DONT_CACHE to force the recipe to always be
# re-parsed so that the file-checksums function for do_compile is run every
# time.
bpn = d.getVar('BPN', True)
if bpn == d.getVar('PN', True):
classextend = (d.getVar('BBCLASSEXTEND', True) or '').split()
if (externalsrc or
('native' in classextend and
d.getVar('EXTERNALSRC_pn-%s-native' % bpn, True)) or
('nativesdk' in classextend and
d.getVar('EXTERNALSRC_pn-nativesdk-%s' % bpn, True)) or
('cross' in classextend and
d.getVar('EXTERNALSRC_pn-%s-cross' % bpn, True))):
d.setVar('BB_DONT_CACHE', '1')
if externalsrc:
d.setVar('S', externalsrc)
externalsrcbuild = d.getVar('EXTERNALSRC_BUILD', True)
@@ -85,9 +102,6 @@ python () {
d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")
d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ")
# Force the recipe to be always re-parsed so that the file_checksums
# function is run every time
d.setVar('BB_DONT_CACHE', '1')
d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}')
# We don't want the workdir to go away

View File

@@ -3,7 +3,5 @@
#
# It should be used in recipes to determine whether introspection data should be built,
# so that qemu use can be avoided when necessary.
GI_DATA_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', \
GI_DATA_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', \
bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"

View File

@@ -7,7 +7,7 @@
#
# It should be used in recipes to determine whether gtk-doc based documentation should be built,
# so that qemu use can be avoided when necessary.
GTKDOC_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \
GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \
bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \

View File

@@ -116,7 +116,7 @@ python () {
def rootfs_variables(d):
from oe.rootfs import variable_depends
variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS',
'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS',
'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
@@ -359,7 +359,7 @@ python () {
# Without de-duplication, gen_conversion_cmds() below
# would create the same compression command multiple times.
ctypes = set(d.getVar('CONVERSIONTYPES', True).split())
old_overrides = d.getVar('OVERRIDES', 0)
old_overrides = d.getVar('OVERRIDES', False)
def _image_base_type(type):
basetype = type
@@ -415,6 +415,7 @@ python () {
d.appendVarFlag('do_image', 'vardeps', ' '.join(vardeps))
maskedtypes = (d.getVar('IMAGE_TYPES_MASKED', True) or "").split()
maskedtypes = [dbg + t for t in maskedtypes for dbg in ("", "debugfs_")]
for t in basetypes:
vardeps = set()
@@ -537,6 +538,12 @@ def get_rootfs_size(d):
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
# Do not check image size of the debugfs image. This is not supposed
# to be deployed, etc. so it doesn't make sense to limit the size
# of the debug.
if (d.getVar('IMAGE_BUILDING_DEBUGFS', True) or "") == "true":
return base_size
# Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
if rootfs_maxsize:
rootfs_maxsize_int = int(rootfs_maxsize)

View File

@@ -218,6 +218,7 @@ IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
do_image_wic[depends] += "parted-native:do_populate_sysroot"
python do_write_wks_template () {
"""Write out expanded template contents to WKS_FULL_PATH."""

View File

@@ -690,7 +690,7 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
do_populate_lic[postfuncs] += "populate_lic_qa_checksum"
python populate_lic_qa_checksum() {
"""
Check for changes in the license files
Check for changes in the license files.
"""
import tempfile
sane = True
@@ -703,8 +703,7 @@ python populate_lic_qa_checksum() {
return
if not lic_files and d.getVar('SRC_URI', True):
package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
return
sane = package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
srcdir = d.getVar('S', True)
@@ -712,7 +711,7 @@ python populate_lic_qa_checksum() {
try:
(type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
except bb.fetch.MalformedUrl:
package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
sane = package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
continue
srclicfile = os.path.join(srcdir, path)
if not os.path.isfile(srclicfile):
@@ -736,7 +735,7 @@ python populate_lic_qa_checksum() {
linesout = 0
for line in fi:
lineno += 1
if (lineno >= beginline):
if (lineno >= beginline):
if ((lineno <= endline) or not endline):
fo.write(line)
linesout += 1
@@ -768,7 +767,10 @@ python populate_lic_qa_checksum() {
else:
msg = pn + ": LIC_FILES_CHKSUM is not specified for " + url
msg = msg + "\n" + pn + ": The md5 checksum is " + md5chksum
package_qa_handle_error("license-checksum", msg, d)
sane = package_qa_handle_error("license-checksum", msg, d)
if not sane:
bb.fatal("Fatal QA errors found, failing task.")
}
def package_qa_check_staged(path,d):

View File

@@ -1,5 +1,5 @@
# remove tasks that modify the source tree in case externalsrc is inherited
SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_shared_workdir do_fetch do_unpack do_patch"
SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch"
# returns local (absolute) path names for all valid patches in the
# src_uri

View File

@@ -127,9 +127,9 @@ PACKAGES_DYNAMIC += "^kernel-firmware-.*"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}"
KERNEL_PRIORITY ?= "${@int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[-1])}"
KERNEL_RELEASE ?= "${KERNEL_VERSION}"
@@ -140,7 +140,7 @@ KERNEL_IMAGEDEST = "boot"
#
# configuration
#
export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE", True) or "ttyS0"}"
KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
@@ -156,6 +156,7 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
# Some Linux kernel configurations need additional parameters on the command line
KERNEL_EXTRA_ARGS ?= ""
EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
KERNEL_ALT_IMAGETYPE ??= ""
copy_initramfs() {
@@ -199,7 +200,7 @@ copy_initramfs() {
echo "Finished copy of initramfs into ./usr"
}
INITRAMFS_BASE_NAME = "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
INITRAMFS_BASE_NAME ?= "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
do_bundle_initramfs () {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
@@ -326,6 +327,36 @@ kernel_do_install() {
}
do_install[prefuncs] += "package_get_auto_pr"
# Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile
do_kernel_version_sanity_check() {
# The Makefile determines the kernel version shown at runtime
# Don't use KERNEL_VERSION because the headers it grabs the version from aren't generated until do_compile
VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//)
PATCHLEVEL=$(grep "^PATCHLEVEL =" ${S}/Makefile | sed s/.*=\ *//)
SUBLEVEL=$(grep "^SUBLEVEL =" ${S}/Makefile | sed s/.*=\ *//)
EXTRAVERSION=$(grep "^EXTRAVERSION =" ${S}/Makefile | sed s/.*=\ *//)
# Build a string for regex and a plain version string
reg="^${VERSION}\.${PATCHLEVEL}"
vers="${VERSION}.${PATCHLEVEL}"
if [ -n "${SUBLEVEL}" ]; then
# Ignoring a SUBLEVEL of zero is fine
if [ "${SUBLEVEL}" = "0" ]; then
reg="${reg}(\.${SUBLEVEL})?"
else
reg="${reg}\.${SUBLEVEL}"
vers="${vers}.${SUBLEVEL}"
fi
fi
vers="${vers}${EXTRAVERSION}"
reg="${reg}${EXTRAVERSION}"
if [ -z `echo ${PV} | grep -E "${reg}"` ]; then
bbfatal "Package Version (${PV}) does not match of kernel being built (${vers}). Please update the PV variable to match the kernel source."
fi
exit 0
}
addtask shared_workdir after do_compile before do_compile_kernelmodules
addtask shared_workdir_setscene

View File

@@ -1490,7 +1490,7 @@ python package_do_shlibs() {
import re, pipes
import subprocess as sub
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
if exclude_shlibs:
bb.note("not generating shlibs")
return

View File

@@ -245,7 +245,7 @@ python do_package_ipk () {
os.chdir(basedir)
ret = subprocess.call("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH", True),
d.getVar("OPKGBUILDCMD",1), pkg, pkgoutdir), shell=True)
d.getVar("OPKGBUILDCMD", True), pkg, pkgoutdir), shell=True)
if ret != 0:
bb.utils.unlockfile(lf)
raise bb.build.FuncFailed("opkg-build execution failed")

View File

@@ -26,7 +26,7 @@ SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
SDKDEPLOYDIR = "${WORKDIR}/deploy-${PN}-populate-sdk"
SDKDEPLOYDIR = "${WORKDIR}/${SDKMACHINE}-deploy-${PN}-populate-sdk"
B_task-populate-sdk = "${SDK_DIR}"
@@ -125,7 +125,7 @@ SSTATE_SKIP_CREATION_task-populate-sdk = '1'
do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
do_populate_sdk[stamp-extra-info] = "${MACHINE}"
do_populate_sdk[stamp-extra-info] = "${MACHINE}${SDKMACHINE}"
fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/

View File

@@ -43,7 +43,7 @@ SDK_TARGETS ?= "${PN}"
def get_sdk_install_targets(d, images_only=False):
sdk_install_targets = ''
if d.getVar('SDK_EXT_TYPE', True) != 'minimal':
if images_only or d.getVar('SDK_EXT_TYPE', True) != 'minimal':
sdk_install_targets = d.getVar('SDK_TARGETS', True)
depd = d.getVar('BB_TASKDEPDATA', False)
@@ -88,8 +88,7 @@ SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar(
def clean_esdk_builddir(d, sdkbasepath):
"""Clean up traces of the fake build for create_filtered_tasklist()"""
import shutil
cleanpaths = 'cache conf/sanity_info conf/templateconf.cfg'.split()
cleanpaths.append(os.path.basename(d.getVar('TMPDIR', True)))
cleanpaths = 'cache conf/sanity_info conf/templateconf.cfg tmp'.split()
for pth in cleanpaths:
fullpth = os.path.join(sdkbasepath, pth)
if os.path.isdir(fullpth):
@@ -109,10 +108,12 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
# Create a temporary build directory that we can pass to the env setup script
shutil.copyfile(sdkbasepath + '/conf/local.conf', sdkbasepath + '/conf/local.conf.bak')
try:
# Force the use of sstate from the build system
with open(sdkbasepath + '/conf/local.conf', 'a') as f:
# Force the use of sstate from the build system
f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR', True))
f.write('SSTATE_MIRRORS_forcevariable = ""\n')
# Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it
f.write('TMPDIR_forcevariable = "${TOPDIR}/tmp"\n')
# Drop uninative if the build isn't using it (or else NATIVELSBSTRING will
# be different and we won't be able to find our native sstate)
if not bb.data.inherits_class('uninative', d):

View File

@@ -48,8 +48,9 @@ python write_qemuboot_conf() {
import configparser
build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', \
'IMAGE_NAME', 'IMAGE_LINK_NAME', 'STAGING_DIR_NATIVE', \
'STAGING_BINDIR_NATIVE', 'STAGING_DIR_HOST']
'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', \
'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', \
'STAGING_DIR_HOST']
# Vars from bsp
qb_vars = []
@@ -63,6 +64,15 @@ python write_qemuboot_conf() {
cf.add_section('config_bsp')
for k in build_vars + qb_vars:
cf.set('config_bsp', k, '%s' % d.getVar(k, True))
# QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink
# to the kernel file, which hinders relocatability of the qb conf.
# Read the link and replace it with the full filename of the target.
kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True))
kernel = os.readlink(kernel_link)
cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
bb.utils.mkdirhier(os.path.dirname(qemuboot))
with open(qemuboot, 'w') as f:
cf.write(f)

View File

@@ -8,7 +8,7 @@ def bad_runtime_vars(cfgdata, d):
return
for var in d.getVar("__recipe_sanity_badruntimevars", True).split():
val = d.getVar(var, 0)
val = d.getVar(var, False)
if val and val != cfgdata.get(var):
__note("%s should be %s_${PN}" % (var, var), d)
@@ -16,11 +16,11 @@ __recipe_sanity_reqvars = "DESCRIPTION"
__recipe_sanity_reqdiffvars = ""
def req_vars(cfgdata, d):
for var in d.getVar("__recipe_sanity_reqvars", True).split():
if not d.getVar(var, 0):
if not d.getVar(var, False):
__note("%s should be set" % var, d)
for var in d.getVar("__recipe_sanity_reqdiffvars", True).split():
val = d.getVar(var, 0)
val = d.getVar(var, False)
cfgval = cfgdata.get(var)
if not val:
@@ -29,7 +29,7 @@ def req_vars(cfgdata, d):
__note("%s should be defined to something other than default (%s)" % (var, cfgval), d)
def var_renames_overwrite(cfgdata, d):
renames = d.getVar("__recipe_sanity_renames", 0)
renames = d.getVar("__recipe_sanity_renames", False)
if renames:
for (key, newkey, oldvalue, newvalue) in renames:
if oldvalue != newvalue and oldvalue != cfgdata.get(newkey):
@@ -50,7 +50,7 @@ def can_use_autotools_base(cfgdata, d):
if cfg.find(i) != -1:
return False
for clsfile in d.getVar("__inherit_cache", 0):
for clsfile in d.getVar("__inherit_cache", False):
(base, _) = os.path.splitext(os.path.basename(clsfile))
if cfg.find("%s_do_configure" % base) != -1:
__note("autotools_base usage needs verification, spotted %s_do_configure" % base, d)
@@ -60,7 +60,7 @@ def can_use_autotools_base(cfgdata, d):
def can_delete_FILESPATH(cfgdata, d):
expected = cfgdata.get("FILESPATH")
expectedpaths = d.expand(expected)
unexpanded = d.getVar("FILESPATH", 0)
unexpanded = d.getVar("FILESPATH", False)
filespath = d.getVar("FILESPATH", True).split(":")
filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
for fp in filespath:
@@ -73,7 +73,7 @@ def can_delete_FILESPATH(cfgdata, d):
def can_delete_FILESDIR(cfgdata, d):
expected = cfgdata.get("FILESDIR")
#expected = "${@bb.utils.which(d.getVar('FILESPATH', True), '.')}"
unexpanded = d.getVar("FILESDIR", 0)
unexpanded = d.getVar("FILESDIR", False)
if unexpanded is None:
return False
@@ -90,7 +90,7 @@ def can_delete_others(p, cfgdata, d):
for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS",
"SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
#for k in cfgdata:
unexpanded = d.getVar(k, 0)
unexpanded = d.getVar(k, False)
cfgunexpanded = cfgdata.get(k)
if not cfgunexpanded:
continue
@@ -117,7 +117,7 @@ python do_recipe_sanity () {
#(can_use_autotools_base, "candidate for use of autotools_base"),
(incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"),
]
cfgdata = d.getVar("__recipe_sanity_cfgdata", 0)
cfgdata = d.getVar("__recipe_sanity_cfgdata", False)
for (func, msg) in sanitychecks:
if func(cfgdata, d):
@@ -143,8 +143,8 @@ python recipe_sanity_eh () {
cfgdata = {}
for k in d.keys():
if not isinstance(d.getVar(k, 0), bb.data_smart.DataSmart):
cfgdata[k] = d.getVar(k, 0)
if not isinstance(d.getVar(k, False), bb.data_smart.DataSmart):
cfgdata[k] = d.getVar(k, False)
d.setVar("__recipe_sanity_cfgdata", cfgdata)
#d.setVar("__recipe_sanity_cfgdata", d)

View File

@@ -135,8 +135,7 @@ is a good way to visualise the changes."""
bb.note("Your conf/bblayers.conf has been automatically updated.")
return
if not status.reparse:
status.addresult()
status.addresult()
elif current_lconf == 6 and lconf_version > 6:
# Handle rename of meta-yocto -> meta-poky
@@ -459,19 +458,19 @@ def check_gcc_march(sanity_data):
# Check if GCC could work without march
if not result:
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test"))
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} gcc_test.c -o gcc_test"))
if status == 0:
result = True;
if not result:
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test"))
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=native gcc_test.c -o gcc_test"))
if status == 0:
message = "BUILD_CFLAGS_append = \" -march=native\""
result = True;
if not result:
build_arch = sanity_data.getVar('BUILD_ARCH', True)
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_PREFIX}gcc -march=%s gcc_test.c -o gcc_test" % build_arch))
status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=%s gcc_test.c -o gcc_test" % build_arch))
if status == 0:
message = "BUILD_CFLAGS_append = \" -march=%s\"" % build_arch
result = True;
@@ -557,20 +556,17 @@ def check_perl_modules(sanity_data):
return "Required perl module(s) not found: %s\n\n%s\n" % (ret, errresult)
return None
def sanity_check_conffiles(status, d):
def sanity_check_conffiles(d):
funcs = d.getVar('BBLAYERS_CONF_UPDATE_FUNCS', True).split()
for func in funcs:
conffile, current_version, required_version, func = func.split(":")
if check_conf_exists(conffile, d) and d.getVar(current_version, True) is not None and \
d.getVar(current_version, True) != d.getVar(required_version, True):
success = True
try:
bb.build.exec_func(func, d, pythonexception=True)
except NotImplementedError as e:
success = False
status.addresult(str(e))
if success:
status.reparse = True
bb.fatal(e)
d.setVar("BB_INVALIDCONF", True)
def sanity_handle_abichanges(status, d):
#
@@ -673,11 +669,11 @@ def check_sanity_version_change(status, d):
if not check_app_exists("${MAKE}", d):
missing = missing + "GNU make,"
if not check_app_exists('${BUILD_PREFIX}gcc', d):
missing = missing + "C Compiler (%sgcc)," % d.getVar("BUILD_PREFIX", True)
if not check_app_exists('${BUILD_CC}', d):
missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC", True)
if not check_app_exists('${BUILD_PREFIX}g++', d):
missing = missing + "C++ Compiler (%sg++)," % d.getVar("BUILD_PREFIX", True)
if not check_app_exists('${BUILD_CXX}', d):
missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX", True)
required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES', True)
@@ -746,7 +742,7 @@ def check_sanity_version_change(status, d):
status.addresult("You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n")
bbpaths = d.getVar('BBPATH', True).split(":")
if ("." in bbpaths or "./" in bbpaths or "" in bbpaths) and not status.reparse:
if ("." in bbpaths or "./" in bbpaths or "" in bbpaths):
status.addresult("BBPATH references the current directory, either through " \
"an empty entry, a './' or a '.'.\n\t This is unsafe and means your "\
"layer configuration is adding empty elements to BBPATH.\n\t "\
@@ -796,8 +792,6 @@ def check_sanity_everybuild(status, d):
sanity_check_locale(d)
sanity_check_conffiles(status, d)
paths = d.getVar('PATH', True).split(":")
if "." in paths or "./" in paths or "" in paths:
status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n")
@@ -943,7 +937,6 @@ def check_sanity(sanity_data):
def __init__(self):
self.messages = ""
self.network_error = False
self.reparse = False
def addresult(self, message):
if message:
@@ -999,7 +992,6 @@ def check_sanity(sanity_data):
if status.messages != "":
raise_sanity_error(sanity_data.expand(status.messages), sanity_data, status.network_error)
return status.reparse
# Create a copy of the datastore and finalise it to ensure appends and
# overrides are set - the datastore has yet to be finalised at ConfigParsed
@@ -1008,15 +1000,20 @@ def copy_data(e):
sanity_data.finalize()
return sanity_data
addhandler config_reparse_eventhandler
config_reparse_eventhandler[eventmask] = "bb.event.ConfigParsed"
python config_reparse_eventhandler() {
sanity_check_conffiles(e.data)
}
addhandler check_sanity_eventhandler
check_sanity_eventhandler[eventmask] = "bb.event.SanityCheck bb.event.NetworkTest"
python check_sanity_eventhandler() {
if bb.event.getName(e) == "SanityCheck":
sanity_data = copy_data(e)
check_sanity(sanity_data)
if e.generateevents:
sanity_data.setVar("SANITY_USE_EVENTS", "1")
reparse = check_sanity(sanity_data)
e.data.setVar("BB_INVALIDCONF", reparse)
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
elif bb.event.getName(e) == "NetworkTest":
sanity_data = copy_data(e)

View File

@@ -153,7 +153,7 @@ python () {
bb.fatal("Please add your architecture to siteinfo.bbclass")
}
def siteinfo_get_files(d, no_cache = False):
def siteinfo_get_files(d, aclocalcache = False):
sitedata = siteinfo_data(d)
sitefiles = ""
for path in d.getVar("BBPATH", True).split(":"):
@@ -162,11 +162,17 @@ def siteinfo_get_files(d, no_cache = False):
if os.path.exists(filename):
sitefiles += filename + " "
if no_cache: return sitefiles
if not aclocalcache:
return sitefiles
# Now check for siteconfig cache files
# Use the files copied to the aclocal cache generated by autotools.bbclass
# to avoid races
# Now check for siteconfig cache files in the directory setup by autotools.bbclass to
# avoid races.
#
# ACLOCALDIR may or may not exist so cache should only be set to True from autotools.bbclass
# after files have been copied into this location. To do otherwise risks parsing/signature
# issues and the directory being created/removed whilst this code executes. This can happen
# when a multilib recipe is parsed along with its base variant which may be running at the time
# causing rare but nasty failures
path_siteconfig = d.getVar('ACLOCALDIR', True)
if path_siteconfig and os.path.isdir(path_siteconfig):
for i in os.listdir(path_siteconfig):
@@ -174,7 +180,6 @@ def siteinfo_get_files(d, no_cache = False):
continue
filename = os.path.join(path_siteconfig, i)
sitefiles += filename + " "
return sitefiles
#

View File

@@ -175,6 +175,8 @@ def sstate_install(ss, d):
if os.access(manifest, os.R_OK):
bb.fatal("Package already staged (%s)?!" % manifest)
d.setVar("SSTATE_INST_POSTRM", manifest + ".postrm")
locks = []
for lock in ss['lockfiles-shared']:
locks.append(bb.utils.lockfile(lock, True))
@@ -205,6 +207,7 @@ def sstate_install(ss, d):
f = os.path.normpath(f)
realmatch = True
for w in whitelist:
w = os.path.normpath(w)
if f.startswith(w):
realmatch = False
break
@@ -407,6 +410,13 @@ def sstate_clean_manifest(manifest, d):
except OSError:
pass
postrm = manifest + ".postrm"
if os.path.exists(manifest + ".postrm"):
import subprocess
os.chmod(postrm, 0o755)
subprocess.call(postrm, shell=True)
oe.path.remove(postrm)
oe.path.remove(manifest)
def sstate_clean(ss, d):
@@ -1011,6 +1021,8 @@ python sstate_eventhandler2() {
for r in toremove:
(stamp, manifest, workdir) = r.split()
for m in glob.glob(manifest + ".*"):
if m.endswith(".postrm"):
continue
sstate_clean_manifest(m, d)
bb.utils.remove(stamp + "*")
if removeworkdir:

View File

@@ -67,6 +67,11 @@ TESTIMAGEDEPENDS = ""
TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot', '', d)}"
TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot', '', d)}"
TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
TESTIMAGELOCK_qemuall = ""

View File

@@ -0,0 +1,11 @@
#This function create a version information file
toolchain_create_sdk_version () {
local versionfile=$1
rm -f $versionfile
touch $versionfile
echo 'Distro: ${DISTRO}' >> $versionfile
echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
echo 'Timestamp: ${DATETIME}' >> $versionfile
}
toolchain_create_sdk_version[vardepsexclude] = "DATETIME"

View File

@@ -1,4 +1,4 @@
inherit siteinfo kernel-arch
inherit toolchain-scripts-base siteinfo kernel-arch
# We want to be able to change the value of MULTIMACH_TARGET_SYS, because it
# doesn't always match our expectations... but we default to the stock value
@@ -105,7 +105,7 @@ EOF
}
#we get the cached site config in the runtime
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d)}"
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses"
@@ -136,18 +136,6 @@ toolchain_create_sdk_siteconfig () {
# The immediate expansion above can result in unwanted path dependencies here
toolchain_create_sdk_siteconfig[vardepsexclude] = "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE"
#This function create a version information file
toolchain_create_sdk_version () {
local versionfile=$1
rm -f $versionfile
touch $versionfile
echo 'Distro: ${DISTRO}' >> $versionfile
echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
echo 'Timestamp: ${DATETIME}' >> $versionfile
}
toolchain_create_sdk_version[vardepsexclude] = "DATETIME"
python __anonymous () {
import oe.classextend
deps = ""

View File

@@ -125,7 +125,7 @@ useradd_sysroot_sstate () {
userdel_sysroot_sstate () {
if test "x${STAGING_DIR_TARGET}" != "x"; then
if [ "${BB_CURRENTTASK}" = "configure" -o "${BB_CURRENTTASK}" = "clean" ]; then
if [ "${BB_CURRENTTASK}" = "clean" ]; then
export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir_native}/pseudo"
OPT="--root ${STAGING_DIR_TARGET}"

View File

@@ -51,14 +51,6 @@ perform_groupmems () {
local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
bbnote "${PN}: Running groupmems command with group $groupname and user $username"
# groupmems fails if /etc/gshadow does not exist
local gshadow=""
if [ -f $rootdir${sysconfdir}/gshadow ]; then
gshadow="yes"
else
gshadow="no"
touch $rootdir${sysconfdir}/gshadow
fi
local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
if test "x$mem_exists" = "x"; then
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true
@@ -69,10 +61,6 @@ perform_groupmems () {
else
bbnote "${PN}: group $groupname already contains $username, not re-adding it"
fi
if test "x$gshadow" = "xno"; then
rm -f $rootdir${sysconfdir}/gshadow
rm -f $rootdir${sysconfdir}/gshadow-
fi
}
perform_groupdel () {

View File

@@ -129,7 +129,7 @@ TARGET_CC_ARCH = "${TUNE_CCARGS}"
TARGET_LD_ARCH = "${TUNE_LDARGS}"
TARGET_AS_ARCH = "${TUNE_ASARGS}"
SDK_ARCH = "${BUILD_ARCH}"
SDKMACHINE ??= "x86_64"
SDK_OS = "${BUILD_OS}"
SDK_VENDOR = "-oesdk"
SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}"
@@ -802,7 +802,7 @@ BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
# Setup our default hash policy
BB_SIGNATURE_HANDLER ?= "OEBasicHash"
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \

View File

@@ -23,7 +23,7 @@ DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
IMAGE_FEATURES ?= ""
WHITELIST_GPL-3.0 ?= ""
LGPLv2_WHITELIST_GPL-3.0 ?= "libidn"
LGPLv2_WHITELIST_GPL-3.0 ?= ""
COMMERCIAL_AUDIO_PLUGINS ?= ""
# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"

View File

@@ -3,5 +3,5 @@ IMAGE_CLASSES += "qemuboot"
QB_MEM = "-m 256"
QB_MACHINE = "-machine malta"
QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet"
QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
QB_SYSTEM_NAME = "qemu-system-${TUNE_ARCH}"

View File

@@ -10,5 +10,5 @@ QB_CPU_KVM_x86-64 = "-cpu kvm64"
QB_AUDIO_DRV = "alsa"
QB_AUDIO_OPT = "-soundhw ac97,es1370"
QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1"
QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet"
QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1"
QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"

View File

@@ -14,6 +14,6 @@ SERIAL_CONSOLES = "115200;ttyAMA0 115200;ttyAMA1"
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine versatilepb"
QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet"
QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
PREFERRED_VERSION_linux-yocto ??= "4.8%"
QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"

View File

@@ -15,7 +15,7 @@ QB_MEM = "-m 512"
QB_MACHINE = "-machine virt"
QB_CPU = "-cpu cortex-a57"
QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
QB_OPT_APPEND = "-show-cursor"
QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci"
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0,mac=@MAC@"
QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"

View File

@@ -15,6 +15,6 @@ SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
QB_SYSTEM_NAME = "qemu-system-ppc"
QB_MACHINE = "-machine mac99"
QB_CPU = "-cpu G4"
QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet"
QB_KERNEL_CMDLINE_APPEND = "console=tty console=ttyS0"
QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=@MAC@"

View File

@@ -1,3 +1,8 @@
if ! xargs --version > /dev/null 2>&1; then
echo "xargs is required by the relocation script, please install it first. Abort!"
exit 1
fi
# fix dynamic loader paths in all ELF SDK binaries
native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
@@ -7,6 +12,10 @@ if [ "$dl_path" = "" ] ; then
fi
executable_files=$($SUDO_EXEC find $native_sysroot -type f \
\( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
if [ "x$executable_files" = "x" ]; then
echo "SDK relocate failed, could not get executalbe files"
exit 1
fi
tdir=`mktemp -d`
if [ x$tdir = x ] ; then
@@ -14,7 +23,7 @@ if [ x$tdir = x ] ; then
exit 1
fi
cat <<EOF >> $tdir/relocate_sdk.sh
#!/bin/bash
#!/bin/sh
for py in python python2 python3
do
PYTHON=\`which \${py} 2>/dev/null\`
@@ -53,9 +62,18 @@ done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
-e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \
-e "s: /usr/bin/perl: /usr/bin/env perl:g"
if [ $? -ne 0 ]; then
echo "Failed to replace perl. Relocate script failed. Abort!"
exit 1
fi
# change all symlinks pointing to @SDKPATH@
for l in $($SUDO_EXEC find $native_sysroot -type l); do
$SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
if [ $? -ne 0 ]; then
echo "Failed to setup symlinks. Relocate script failed. Abort!"
exit 1
fi
done
echo done

View File

@@ -17,7 +17,7 @@ class BuildSystem(object):
def __init__(self, context, d):
self.d = d
self.context = context
self.layerdirs = d.getVar('BBLAYERS', True).split()
self.layerdirs = [os.path.abspath(pth) for pth in d.getVar('BBLAYERS', True).split()]
self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split()
def copy_bitbake_and_layers(self, destdir, workspace_name=None):
@@ -26,7 +26,7 @@ class BuildSystem(object):
bb.utils.mkdirhier(destdir)
layers = list(self.layerdirs)
corebase = self.d.getVar('COREBASE', True)
corebase = os.path.abspath(self.d.getVar('COREBASE', True))
layers.append(corebase)
# Exclude layers

View File

@@ -176,7 +176,7 @@ class RpmIndexer(Indexer):
dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch)
if os.path.exists(dbpath):
bb.utils.remove(dbpath, True)
arch_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch)
arch_dir = os.path.join(self.deploy_dir, arch)
if not os.path.isdir(arch_dir):
continue
@@ -686,7 +686,8 @@ class RpmPM(PackageManager):
if not os.path.exists(self.d.expand('${T}/saved')):
bb.utils.mkdirhier(self.d.expand('${T}/saved'))
self.indexer = RpmIndexer(self.d, self.deploy_dir)
packageindex_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms')
self.indexer = RpmIndexer(self.d, packageindex_dir)
self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
@@ -838,11 +839,13 @@ class RpmPM(PackageManager):
new_pkg = self._search_pkg_name_in_feeds(subst, feed_archs)
if not new_pkg:
# Failed to translate, package not found!
err_msg = '%s not found in the %s feeds (%s).\n' % \
(pkg, mlib, " ".join(feed_archs))
err_msg = '%s not found in the %s feeds (%s) in %s.' % \
(pkg, mlib, " ".join(feed_archs), self.d.getVar('DEPLOY_DIR_RPM', True))
if not attempt_only:
err_msg += " ".join(self.fullpkglist)
bb.fatal(err_msg)
bb.error(err_msg)
bb.fatal("This is often caused by an empty package declared " \
"in a recipe's PACKAGES variable. (Empty packages are " \
"not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
bb.warn(err_msg)
else:
new_pkgs.append(new_pkg)
@@ -855,11 +858,13 @@ class RpmPM(PackageManager):
default_archs = self.ml_prefix_list['default']
new_pkg = self._search_pkg_name_in_feeds(pkg, default_archs)
if not new_pkg:
err_msg = '%s not found in the base feeds (%s).\n' % \
(pkg, ' '.join(default_archs))
err_msg = '%s not found in the feeds (%s) in %s.' % \
(pkg, " ".join(default_archs), self.d.getVar('DEPLOY_DIR_RPM', True))
if not attempt_only:
err_msg += " ".join(self.fullpkglist)
bb.fatal(err_msg)
bb.error(err_msg)
bb.fatal("This is often caused by an empty package declared " \
"in a recipe's PACKAGES variable. (Empty packages are " \
"not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
bb.warn(err_msg)
else:
new_pkgs.append(new_pkg)

View File

@@ -449,8 +449,8 @@ def get_recipe_patched_files(d):
def validate_pn(pn):
"""Perform validation on a recipe name (PN) for a new recipe."""
reserved_names = ['forcevariable', 'append', 'prepend', 'remove']
if not re.match('[0-9a-z-.]+', pn):
return 'Recipe name "%s" is invalid: only characters 0-9, a-z, - and . are allowed' % pn
if not re.match('^[0-9a-z-.+]+$', pn):
return 'Recipe name "%s" is invalid: only characters 0-9, a-z, -, + and . are allowed' % pn
elif pn in reserved_names:
return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
elif pn.startswith('pn-'):

View File

@@ -23,13 +23,13 @@ def ifelse(condition, iftrue = True, iffalse = False):
return iffalse
def conditional(variable, checkvalue, truevalue, falsevalue, d):
if d.getVar(variable,1) == checkvalue:
if d.getVar(variable, True) == checkvalue:
return truevalue
else:
return falsevalue
def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
if float(d.getVar(variable,1)) <= float(checkvalue):
if float(d.getVar(variable, True)) <= float(checkvalue):
return truevalue
else:
return falsevalue

View File

@@ -428,6 +428,11 @@ class BuildPerfTestCase(unittest.TestCase):
n_e_v, revision = nevr.rsplit('-', 1)
match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[0-9]\S*)$',
n_e_v)
if not match:
# If we're not able to parse a version starting with a number, just
# take the part after last dash
match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[^-]+)$',
n_e_v)
name = match.group('name')
version = match.group('version')
epoch = match.group('epoch')

View File

@@ -152,13 +152,12 @@ class oeSDKTest(oeTest):
@classmethod
def hasHostPackage(self, pkg):
if re.search(pkg, oeTest.tc.hostpkgmanifest):
return True
return False
def _run(self, cmd):
return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True).decode("utf-8")
return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True, stderr=subprocess.STDOUT).decode("utf-8")
class oeSDKExtTest(oeSDKTest):
def _run(self, cmd):
@@ -170,7 +169,7 @@ class oeSDKExtTest(oeSDKTest):
env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
return subprocess.check_output(". %s > /dev/null;"\
" %s;" % (self.tc.sdkenv, cmd), shell=True, env=env).decode("utf-8")
" %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8")
def getmodule(pos=2):
# stack returns a list of tuples containg frame information

View File

@@ -68,6 +68,7 @@ qemux86_common = [
'Getting VBE info block failed',
'vbe_init() failed with -22',
'uvesafb: mode switch failed',
'tsc: HPET/PMTIMER calibration failed',
] + common_errors
ignore_errors = {
@@ -181,6 +182,9 @@ class ParseLogsTest(oeRuntimeTest):
def getMachine(self):
return oeRuntimeTest.tc.d.getVar("MACHINE", True)
def getWorkdir(self):
return oeRuntimeTest.tc.d.getVar("WORKDIR", True)
#get some information on the CPU of the machine to display at the beginning of the output. This info might be useful in some cases.
def getHardwareInfo(self):
hwi = ""
@@ -218,16 +222,19 @@ class ParseLogsTest(oeRuntimeTest):
#copy the log files to be parsed locally
def transfer_logs(self, log_list):
target_logs = 'target_logs'
workdir = self.getWorkdir()
self.target_logs = workdir + '/' + 'target_logs'
target_logs = self.target_logs
if not os.path.exists(target_logs):
os.makedirs(target_logs)
bb.utils.remove(self.target_logs + "/*")
for f in log_list:
self.target.copy_from(f, target_logs)
#get the local list of logs
def get_local_log_list(self, log_locations):
self.transfer_logs(self.getLogList(log_locations))
logs = [ os.path.join('target_logs',f) for f in os.listdir('target_logs') if os.path.isfile(os.path.join('target_logs',f)) ]
logs = [ os.path.join(self.target_logs, f) for f in os.listdir(self.target_logs) if os.path.isfile(os.path.join(self.target_logs, f)) ]
return logs
#build the grep command to be used with filters and exclusions

View File

@@ -51,12 +51,32 @@ class RpmInstallRemoveTest(oeRuntimeTest):
@testcase(1096)
@skipUnlessPassed('test_ssh')
def test_rpm_query_nonroot(self):
(status, output) = self.target.run('useradd test1')
self.assertTrue(status == 0, msg="Failed to create new user: " + output)
(status, output) = self.target.run('su -c id test1')
self.assertTrue('(test1)' in output, msg="Failed to execute as new user")
(status, output) = self.target.run('su -c "rpm -qa" test1 ')
self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
def set_up_test_user(u):
(status, output) = self.target.run("id -u %s" % u)
if status == 0:
pass
else:
(status, output) = self.target.run("useradd %s" % u)
self.assertTrue(status == 0, msg="Failed to create new user: " + output)
def exec_as_test_user(u):
(status, output) = self.target.run("su -c id %s" % u)
self.assertTrue("({0})".format(u) in output, msg="Failed to execute as new user")
(status, output) = self.target.run("su -c \"rpm -qa\" %s " % u)
self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
def unset_up_test_user(u):
(status, output) = self.target.run("userdel -r %s" % u)
self.assertTrue(status == 0, msg="Failed to erase user: %s" % output)
tuser = 'test1'
try:
set_up_test_user(tuser)
exec_as_test_user(tuser)
finally:
unset_up_test_user(tuser)
@testcase(195)
@skipUnlessPassed('test_rpm_install')

Some files were not shown because too many files have changed in this diff Show More