Commit Graph

35092 Commits

Author SHA1 Message Date
Scott Rifenbark 4ec8e88a9a documentation: Updated customization layers to point to XSL mirrors
The customization layers were pointing to Sourceforge site for the
XSl files needed to build the manuals.  Throuhgout time, this site
has failed me enough to warrent trying to get these XSL files from
some other source.  Rather than ship the XSL files with the YP release,
we decided to create some mirrors and point the customization files
there.

(From yocto-docs rev: 4fd1703870694dff1f593b421f90aad0803d9e65)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:30 +01:00
Scott Rifenbark 2de3283ca6 ref-manual: Fixed "TBD" section cross-reference in KBUILD_DEFCONFIG
Fixes [YOCTO #7474]

There was a TBD section here that needed filling out.

(From yocto-docs rev: 84efce1622dec2782aadfb9cc9338c3f7aab1472)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:30 +01:00
Scott Rifenbark f9df1a4473 kernel-dev: Added new "in-tree" defconfig file section.
I added the new section "Using an "In-Tree" defconfig File"
section.  This section addresses the ability to not use the
default location for defconfig files, which is usually in the
metadata layer.  The section describes how to use the
KBUILD_DEFCONFIG variable.

Fixes [YOCTO #7474]

(From yocto-docs rev: d68f7b47d974d94177b344247056778742f57786)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:30 +01:00
Scott Rifenbark 540b8ef0f7 dev-manual: Added new section on "defconfig" files.
The "Configuring the Kernel" section did not address "defconfig"
files.  In my opinion, this is a hole in the docs for this section.
I added a new section titled "Creating a defconfig File" that is a
sub-section of the "Configuring the Kernel" section.

Additionally, I added a brief sentence in the introductory paragraph
to include the fact that this new information exists.

Finally, I included the bitbake command that ensures that the
proper configuration steps are minimally run before a user attempts
to use bitbake to get into menuconfig.

Fixes [#YOCTO 7474]

(From yocto-docs rev: 13c0c7dddca59474ef65dacc12f0bfaa38933887)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:30 +01:00
Scott Rifenbark 7b1697bd15 kernel-dev: Added detail to start of generating config file
Fixes [YOCTO #7474]

The "Generating Configuration Files" section has a procedure that
starts with a step to complete a build at least through the
kernel configuration task.  This is needed but we could use a
bit of explanation here.  I added some rationale behind why you
should do this.

(From yocto-docs rev: 63df3474f4ed211dd6b7d1cf4f4e90bbc92c2595)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:30 +01:00
Scott Rifenbark 7baadd86ee ref-manual: Removed PRINC entry from the glossary
This variable has been deprecated a while and Paul Eggleton suggested
we finally remove it from the glossary.  I removed it and also
took away the two links from where the variable was referenced
in a couple spots in the migration section.

(From yocto-docs rev: 2b3c762428bd9ca64087ba6359c4eb5fb5a3db84)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:30 +01:00
Scott Rifenbark e52dd53330 toaster-manual: Added detail for the URL to access Web Interface
(From yocto-docs rev: 3691068965b9b0db66f4b8b5bb0e4fb6e5d9741e)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark ec068fe582 ref-manual: Added new variable description UNKNOWN_CONFIGURE_WHITELIST
Fixes [YOCTO #7755]

Added a new description for this variable.  Based it on information
given to me by Paul Eggleton.

(From yocto-docs rev: eb0101027ed18b6bae2d80166b73b41ee1ebeb9f)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark 744893b5d2 ref-manual: Updated EXTRA_IMAGE_FEATURES variable
Added better wording to show that you use spaces to separate
multiple features.

(From yocto-docs rev: b21d73acb23e0e3b78cff332fdc4a09166eb7392)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark 64d74562a1 dev-manual: Updates to kernel configuration in the "Kernel Modification Workflow" section
This section needed some more information.  It referenced the yocto-kernel
script and menuconfig.  I added references to the appropriate areas of
YP documentation for these.  I also changed wordings to that it is
apparent that .config is created by menuconfig when changes are saved.

(From yocto-docs rev: bd1a3f6fa0268635f52bc77d9b35b5110b18a9f8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark 3d2f2b6bdb dev-manual: Added a link to reference defconfig files.
(From yocto-docs rev: 088d5c99562c1c7a192a6734272eae8147657bc8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark 8c43d0fa52 dev-manual: Minor edits to "Configuring the Kernel" section.
(From yocto-docs rev: 26df09f863a0e56748a34efe4a9b2d1b02ccaa99)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark 72169b2928 ref-manual: Added new glossary description for KBUILD_DEFCONFIG.
(From yocto-docs rev: 4ec945a5567df4f561bc8bed679becbd3f2b9def)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark 6e12a35e3d adt-manual: Updated the "Getting the Images" section for eclipse-debug
The way to include tcf-agent now in an image that you are going to
remotely deploy and debug using the Eclipse IDE is to simply include
the eclipse-debug image feature as part of the image.  I updated the
section around getting images to reflect this simple method.

Reported-by: Adam Lee <adam@gumstix.com>
(From yocto-docs rev: 9aec91d7f4fda558baa0e8a0290b42d76e735c63)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:29 +01:00
Scott Rifenbark d9cf5753df ref-manual: Added and updated variables to support calling functions
Fixed [YOCTO #7632]

Looked for, updated, and added (if necessary) the following
variables:

 * ROOTFS_PREPROCESS_COMMAND
 * ROOTFS_POSTPROCESS_COMMAND
 * SDK_POSTPROCESS_COMMAND
 * POPULATE_SDK_POST_TARGET_COMMAND
 * POPULATE_SDK_POST_HOST_COMMAND,
 * IMAGE_POSTPROCESS_COMMAND
 * IMAGE_PREPROCESS_COMMAND
 * ROOTFS_POSTUNINSTALL_COMMAND
 * ROOTFS_POSTINSTALL_COMMAND

Each of these variables no longer accepts arbitrary shell commands but
rather functions.  The wordings now support that behavior.

Also, updated the migration section for going to 1.6 release to note
this change.

(From yocto-docs rev: e1ab48f7def9d1eb080e007b88f75172470b8007)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark fb82bcb989 ref-manual: Added 'ptest' to the list of Distro Features
Reported-by: Paul Eggleton <paul.eggleton@intel.com>
(From yocto-docs rev: a6ae91468a67779c796712794656a72f701aea25)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark 26f9777c64 ref-manual: Updates to the "Speeding Up the Build" section
I applied a little more information to this section to help
round out the variable explanations.  Part of the change involved
adding PARALLEL_MAKEINST to the list of scaled variables.
I had left that variable off.  Also added a new trade-off.

(From yocto-docs rev: 3d85d5385c03841c17dd33afb94c110edc12170f)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark e05c636bc8 ref-manual, dev-manual: Added info about make race work-around
I updated both the PARALLEL_MAKE and PARALLEL_MAKEINST variables
by expanding the note to indicate how to prohibit parallel make
threads.  Also, added a cross-referencing link to the
"Debugging Parallel Make Races" section.

I added a short note to the start of the "Debugging Parallel Make
Races" section noting that if they can't properly fix the condition,
they can always do a work-around to set the PARALLEL_MAKE or
PARALLEL_MAKEINST variables to null.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
(From yocto-docs rev: f8dccf3f115647cb039d91415819186cf38fa8bb)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark 8c9fb71226 ref-manual: Formatting fixes and tag fix.
(From yocto-docs rev: d4dcfbb36c19e6aed62fc9c4a3bced3496cfbb8e)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark 935f5d7684 ref-manual: Updates to BB_NUMBER_THREADS and PARALLEL_MAKE
I added some more detail to these two variables.  The system sets
them according to the perceived number of cores.  These default
setting are cool for single socket systems.  However, if you
have some big system with a lot of physical CPUs, you might want
to cap off the values at 20.  This is according to Darren Hart.

I also put in some cross-references to the "Speeding Up the Build"
section.

(From yocto-docs rev: 20eafc8290f46d8deea84dd6ff721b65cb8a1463)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark 113c4279e7 ref-manual: Added descriptions for four new variables
Fixes [YOCTO #7665]

Added descriptions in the glossary for the following variables:

 * SDK_HOST_MANIFEST
 * SDK_TARGET_MANIFEST
 * SDK_VERSION
 * TOOLCHAIN_OUTPUTNAME

(From yocto-docs rev: d8a7e3443d33d02d88e9d603dcff917a5508ae17)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark 2a95850d64 adt-manual: Emphasis on populate_sdk as bitbake method for building toolchain
I updated the "Optionally Building a Toolchain Installer" section
to emphasize using 'bitbake <image> -c populate_sdk' as the method
for building outa toolchain.  Before the change, equal emphasis was
put on for this preferred method and the 'bitbake meta-toolchain'
method.

(From yocto-docs rev: 447ad6167570bf1bd227771153de421d1154443d)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:28 +01:00
Scott Rifenbark 95108a1c34 dev-manual: Updated requirements for writing a new test.
Fixes [YOCTO #7524]

The "Writing New Tests" section needed more clarification in the first
paragraph.  One requirement is that minimally, an empty __iniit_.py
file must exist in the runtime directory.

(From yocto-docs rev: 519d0ff95e2ffbdb615d6dc27a6c11b393eb4b53)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:27 +01:00
Scott Rifenbark d0531dbf0e ref-manual: Added new variable description for ARCHIVER_MODE
Also, added a cross-reference link from the archiver.bbclass section
to the new description.

(From yocto-docs rev: f825ba932970e9d62d335f249365a34b2992b6cd)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 18:02:27 +01:00
André Draszik 46f86497d5 ref-manual: clarify allarch wrt RDPENDS and TUNE_PKGARCH
See e.g.
http://permalink.gmane.org/gmane.comp.handhelds.openembedded/64067

(From yocto-docs rev: 5ad5f90edc5aefc95049f36afa2792dd7a9fba3d)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 13:59:09 +01:00
Paul Eggleton a894da0dfe ref-manual: fix example of setting root password using extrausers
We need to use usermod here not useradd.

(From yocto-docs rev: 7f4a5523c14304985ab8b277fd5010fd22903dea)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 13:59:09 +01:00
Paul Eggleton 5e357ed88f oe-selftest: restore gummiboot tests
These are the gummiboot tests recently removed from OE-Core, with the
following changes:

* Make them use MACHINE = "genericx86-64" instead of "nuc" and remove
  all usage of meta-intel

* Use DEPLOY_DIR instead of assuming build directory will be in the
  default path relative to COREBASE

* Fix build test to actually check if the file was created as part of
  the test instead of possibly being around from a previous build

* Fix wic test to actually check the output to find the name of the
  .direct file that wic has created, instead of passing if any .direct
  file happens to exist in /var/tmp/wic

(We can now add these in this layer courtesy of Chris Larson's OE-Core
commit 182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010).

(From meta-yocto rev: 8e945e39327869c6b53959c5eb324ba3e4cb0b20)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-28 11:26:10 +01:00
Andre McCurdy 1b88b7426a bitbake: build: Exit scripts with result of last shell function
Since shell scripts run with 'set -e' the final exit at the end of the
script can only be returning 0. However, for correctness and to follow
the original intention of the 'cleanup' commands, let's fix the typo
and return the success of the last shell function rather than the
success of unhooking the exit trap handler.

(Bitbake rev: bef724057f1ea81571dd3ac5a9cf862f818434b5)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:16 +01:00
Cristian Iorga eeb412d01d harfbuzz: upgrade to 1.0.1
- Update to Unicode 8.0;
- Implement Universal Shaping Engine;
- Bug fixes.

(From OE-Core rev: 27d068d05239c26a3848eb101571acab54635e37)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:16 +01:00
Dominic Sacré 5d8739f52b opkg-utils: fix bashism in opkg-build
Fix error '[[: not found' if /bin/sh is not bash.

This issue was introduced by the recent addition of tar_ignore_error.patch
to the opkg-utils recipe.

(From OE-Core rev: 2cf2242fc30b3d1ceb538ff5106e000cd888652e)

Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:16 +01:00
Richard Purdie 5981ccff2e cross-canadian: Put links in place for uclibc and musl
gcc-cross-canadian-<arch> is only built once. It needs to target all the
different libcs, not just the currently selected one. This change
ensures that if another libc is used, symlinks are present such that the
compiler can be found. The base version is always assumed to be "glibc"
with symlinks from musl and uclibc compiler names.

This means gcc-cross-canadian is consistent regardless of which libc is
selected when its build in multimachine builds.

[YOCTO #8025]

(From OE-Core rev: 83ead626c0da75edec2833ffb1a29011ec7b83d2)

(From OE-Core rev: ee16cb0a3f40384f509083f0ef3f36b68f73b7cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:16 +01:00
Richard Purdie 72777f4f2f toolchain-scripts: For non-glibc, pass compiler options to ensure the correct libc selection
gcc-cross-canadian-<arch> is only built once. It needs to target all the
different libcs, not just the currently selected one. This change ensures
that if another libc is used, the compiler correctly selects the right one.

[YOCTO #8025]

(From OE-Core rev: da2e92e256054b137a1646fdad1fe1a47ba3215a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:16 +01:00
Richard Purdie ae344c188d oeqa/qemurunner: Fix AttributeError: QemuRunner instance has no attribute 'server_socket'
If start() returns False due to create_socker() failing, stop() may still get
called and currently this gives a track back since server_socket doesn't exist.

Avoid this.

(From OE-Core rev: 26fb69ec663afd05134822dc5e48fc8928ea5bf1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Pascal Bach 7c71bc8a99 nativesdk-qt4-tools: depend on nativesdk-qt4-tools only if DISTRO_FEATURES includes x11
Currently nativesdk-qt4-tools can't be built if the DISTRO_FEATURES doesn't contain x11.
To make it build we add a dependency to x11 only if the feature is activated.

(From OE-Core rev: 7216116c9552e812d8c75c0687223f9a84204a28)

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Richard Purdie 997893e928 security-flags: Disable PIE for coreutils, elfutils, gcc, iptables
With gcc 5, we need to disable the PIE flags for more recipes in order
to have successful builds.

(From OE-Core rev: ec2f1b5af102ab6a8fcc23bf115c8f0451ab7eb8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Richard Purdie f4f72b15ad qemurunner: Show last 25 line of log, not 5
For debugging purposes, 5 lines often isn't useful as it doesn't even
cover a full backtrace. Show 25 instead.

(From OE-Core rev: 5b3ff562b2c56df301fc402c8b84420d8d4e5705)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Richard Purdie e3aa7a30b3 targetcontrol: Improve logs by outputting qemu boot log in case of failure
We've had a few cases on the autobuilder where we've lost logs of
the boot and been unable to debug it further. Show this information
onto the console to be more useful.

(From OE-Core rev: 5302b7b8fa1349ae99040fe8fdcc4e42c722cc10)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Paul Eggleton edc7780ab7 oeqa/selftest/devtool: use new runqemu function
Use the common code we now have to run QEMU instead of running it
ourselves, avoiding reliance on the machine showing up at 192.168.7.2.
This also makes a copy of the image rather than using -snapshot so if we
need to inspect the image after a failure, we can.

Fixes [YOCTO #7928].

(From OE-Core rev: 3d3748a237bb06ce7d9520bf485ef0c6cf1adc86)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Paul Eggleton c256bbc44d oeqa/selftest/imagefeatures: remove gummiboot tests
These tests were _deleting_ meta-intel if it happened to appear under
COREBASE, which could have been catastrophic if there was any work in
progress in that directory. It turns out we don't even need meta-intel,
but we do need a machine that's set up appropriately (e.g.
genericx86-64). Tests that involve layers outside of OE-Core don't
really belong in OE-Core, and genericx86-64 is in meta-yocto-bsp;
however we will soon have the capability to have selftest tests in other
layers, so remove this here so we can add a fixed version in
meta-yocto-bsp after that happens.

(From OE-Core rev: 7bf55e7b8036bb09f49ee0987fd002ec25e3e9e0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Paul Eggleton 86f0232bff oeqa/selftest/imagefeatures: fix RPM4 test
* Use our new runqemu function
* Don't hard-code the RPM4 version
* Double-check the native version is RPM4
* Check that an rpm 4.x package is in the image manifest (this isn't
  strictly necessary, but "belt-and-braces" and it serves as an example
  of how to do that)
* Check that the database is working on the target
* Ensure the image actually has openssh in it so we can connect to it

Initial runqemu adaptation by Richard Purdie <richard.purdie@linuxfoundation.org>

Part of the fix for [YOCTO #7994].

(From OE-Core rev: 80289106423746b7d7fd4c4fd181ffbae93f71d1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:15 +01:00
Richard Purdie 90a52ffd44 oeqa/selftest/imagefeatures: fix SSH without password tests
* We need to set EXTRA_IMAGE_FEATURES outright or existing values will
  affect the test
* For test case 1107 we need "empty-root-password" to match the behaviour
  described in the test case
* For test case 1115 we shouldn't be able to connect as root with the
  features we are setting

Test cases 1107 and 1115 have been updated in Testopia to match.

(From OE-Core rev: f1e66398eaba495ea6d8d39e2b489e594ac88a0e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Richard Purdie 76d8c4e97c oeqa/selftest/imagefeatures: Use QemuTarget code
Create a runqemu function which uses the QemuTarget() code from
oeqa.targetcontrol to setup the QEMU instance, with all of the added
robustness that that gives us. To do this, a datastore is needed for the
recipe in question (core-image-minimal) so we do the work needed to set
this up. We then use this runqemu function within the imagefeatures
tests instead of a hand-rolled implementation.

We can then use SSHControl to run the SSH tests rather than rolling our
own code to do that as an added bonus.

Fixed and extended by Paul Eggleton <paul.eggleton@linux.intel.com>.

Part of the fix for [YOCTO #7994].

(From OE-Core rev: 7d18d1169204ee80f1c00b35998f10fffaefa107)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton 01ccad15da oeqa/targetcontrol: write QemuRunner log output to a file
If we use this outside of testimage we don't have a task log; so let's
just explicitly write the log output to a file all the time so it's
always there to look at (particularly useful when runqemu exits
immediately with an error.)

(From OE-Core rev: 09b7ed39df150257cfe2eb55a8f8c7475e73217e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton a6eb5ec327 oeqa/utils/qemurunner: fix error handling if runqemu exits with an error
* Don't wait for QEMU to start if it's never going to (because runqemu
  exited with an error)
* Don't error out if killing the process fails with "no such process"
  (we don't care if it's already dead)

(From OE-Core rev: 1789b89de6c4642464abadd9f8a4746385e6b4a7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton 7f9b42a90f oeqa/utils/qemurunner: avoid blocking on stty when running under oe-selftest
runqemu-internal runs stty to return the terminal to its previous state
in case QEMU hasn't done that properly (which it at least used to do
when it crashed). For some reason I have yet to determine, stty blocks
(on tcsetattr() according to gdb) when run within QemuRunner() under
oe-selftest, with the result that we always wait until the timeout and
then we kill the script, which adds an extra delay after QEMU is
stopped. Naturally you would assume that this is something to do with
the nature of the terminal under which it is being run; however no
amount of playing around with stdin/stdout/stderr seemed to fix the
issue, apart from passing in subprocess.PIPE as stdin which makes stty
error out with "stty: standard input: Inappropriate ioctl for device". I
was also unable to come up with a reliable test for the terminal which
we could use inside runqemu-internal to avoid calling stty. For now, go
with the stdin=subprocess.PIPE workaround to at least avoid the delay
with minimal ill effect.

(From OE-Core rev: a058d07cd7251749fa9c1c8eca3caa80144664fe)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton 4855ec380f oeqa/utils/qemurunner: fix logging
OE-Core commit 519e381278d40bdac79add340e4c0460a9f97e17 unfortunately
broke logging in two different ways:

1) it prevented logging to the task log from working within bitbake
   -c testimage. This is due to the logger object being set up too early
   which interferes with BitBake's own logging. If we prefix the name
   with "BitBake." everything works (and we don't need to set the
   logging level).

2) Additionally because it called the log functions on the logging
   module and not the logger object it set up, this caused the
   oe-selftest logging to start printing everything from that point
   forward.

Fix these two issues and return us to the desired behaviour for
do_testimage.

(From OE-Core rev: 429b1971be06d5146bb1c14f4697966cddab3b33)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton 69bae0651e oeqa/targetcontrol: create test directory before copying rootfs image
The test directory might not exist at this point so just go ahead and
create it.

(From OE-Core rev: 7ef86ce62b52f0f3d0c51e3c20d7b4f37025bf41)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Paul Eggleton 67a3807c4c oe-selftest: add scripts/lib and bitbake/lib to path
In particular, this allows us to use code from bitbake's bb module
(such as tinfoil).

(From OE-Core rev: 5ca91cd0b56eb2da80c781fb46ae0b600c3f1eb9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:14 +01:00
Christopher Larson 3108e00d92 oeqa/recipetool: allow templayerdir override
This is provided for use by subclasses.

(From OE-Core rev: 95330664826e80c56360645ea90b59d265c2c50e)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:13 +01:00
Christopher Larson 7eb55b442b oeqa/recipetool: add tests for appendsrcfile(s)
(From OE-Core rev: a6d63b8b4a8a436897bfd29f5de647152149e832)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:13 +01:00