aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2016-10-06scripts: Rename 'native' to 'oe-run-native'Ulf Magnusson
Makes it a bit more descriptive and potentially more discoverable. Most people seemed to prefer an oe- prefix, so let's go with that. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: modify command fails to ignore source filesStephano Cetola
With recent changes to recipeutils, the list of local files returned by get_recipe_local_files could possibly include source files. This only happens when the recipe contains a SRC_URI using subdir= to put files in the source tree. These files should be ignored when populating the list of local files for oe-local-files directory. [YOCTO #10326] introduced in OE-Core revision 9069fef5dad5a873c8a8f720f7bcbc7625556309 Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: deploy-target: Avoid unnecessary dependency on awk on the targetPeter Kjellerstedt
Relying on that awk is installed on the target just to extract the fourth column (i.e., the free volume size) from `df -P` is an unnecessary dependency for devtool deploy-target. As it is already using sed to mangle the output from `df -P`, this can easily be modified to only extract the free volume size. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: add: build nodejs-native if npm is needed and not availablePaul Eggleton
If the user runs devtool add on an npm:// URL (or source tree that uses node.js), and npm is not available, just build nodejs-native instead of telling the user they need to do it; if that fails because there isn't any such recipe (which would be the default, since it's not in OE-Core) then produce a slightly more readable error message hinting at what the user needs to do. Note that this forces the use of nodejs-native rather than npm on the host - this makes sense for two reasons: (1) we need it to be compatible with nodejs for the target, and (2) we have to have a recipe for that anyway, so allowing you to avoid having a recipe for the native version isn't really beneficial. There's a bit of a hack in here in order to allow this - for node.js sources that aren't fetched via npm we don't know that they are that until we've fetched and unpacked them, by which time we're inside recipetool and have an active tinfoil instance that will prevent bitbake being run. To avoid this being an issue, we allow recipetool to get to the point where we know we need npm and then exit with a specific exit code, at which point devtool can try to build it and then if that succeeds, it will re-execute recipetool. This is definitely not ideal, but it can't really be refactored and done properly until we do the tinfoil2 refactoring; in the mean time though we still want to be helpful to the user. Fixes [YOCTO #10337]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: add: display a warning for deprecated -f/--fetch optionPaul Eggleton
We want to remove the -f/--fetch option at some point (as you can now specify a URL as a positional argument instead) so display a warning that it's deprecated if it is used. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-05devtool: add: fix error message when only specifying a recipe namePaul Eggleton
We were supposed to be printing out the specified recipe name here but I forgot to specify a parameter for the string. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30mkefidisk.wks: use partition UUID and GPT partition tableEd Bartosh
This is a preparation to use mkefidisk as a default wks for genericx86* BSPs. This change enables usage of partition UUID instead of device name to specify root partition in kernel command line. It should make images to boot on devices with boot device names that differ from what's mentioned in wks file. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30scripts: add new script 'native'Ed Bartosh
Added 'native' convenience shell script to run native tools. Example of usage: > bitbake bmap-tools-native > native bmaptool --version Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-30build-perf-test-wrapper.sh: accept test case failuresMarkus Lehtonen
Utilize the new return value (2) from oe-build-perf-test. Do not exit with an error in case some individual tests fail. Even if some tests fail we still want to complete successfully, that is, display and archive the results and do cleanup. The individual tests do not depend on each other anymore so test failures shouldn't affect the results of successful tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30oe-build-perf-test: return 2 if some tests failedMarkus Lehtonen
Add a new return value '2' that indicates that some tests failed but there were no fatal errors (i.e. configuration mistakes or bugs in the tests themselves). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30build-perf-test-wrapper.sh: show defaults for '-a' and '-w'Markus Lehtonen
Display default values for '-a' and '-w' command line arguments in the usage help text. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30build-perf-test-wrapper.sh: check for positional argumentsMarkus Lehtonen
Stricter checking of command line arguments. The script doesn't use any positional arguments so don't accept any and error out if those are found. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30runqemu: Add little endian variations for MIPSZubair Lutfullah Kakakhel
Add mipsel and mips64el as an option. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: implement --multi optionMarkus Lehtonen
Makes it possible to average over multiple buildstats. If --multi is specified (and the given path is a directory) the script will read all buildstats from the given directory and use averaged values calculated from them. All of the buildstats must be from a "similar" build, meaning that no differences in package versions or tasks are allowed. Otherwise, the script will exit with an error. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: make logger msg format a bit more readableMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: use exception for internal error handlingMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: add walltime to --diff-attrMarkus Lehtonen
For comparing the elapsed wall clock time of tests. Default values for --min-val and --min-absdiff are 5 seconds and 2 seconds. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: add read_ops and write_ops to --diff-attrMarkus Lehtonen
Two new options, making it possible to compare the number of filesystem operations of tasks. Defaults for --min-val and --min-absdiff are set to more or less arbitrary 500 and 50 operations, respectively. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: add read_bytes and write_bytes to --diff-attrMarkus Lehtonen
These are I/O counter values from /proc/<pid>/io and represent the number of bytes read from / written to the storage layer. Default values for --min-val and --min-absdiff limits are set to 512kB and 128kB, respectively. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: introduce --diff-attrMarkus Lehtonen
A new command line option for choosing which "attribute" of the buildstats to compare. At first, the already supported 'cputime' is the only available option. But, refactoring done in this patch should make it easy to add new attribute types. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: do not hardcode field widths in outputMarkus Lehtonen
Dynamically adjust the width of all fields in task diff output. Makes it easier to print other units than cputime, too. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: implement BSTask classMarkus Lehtonen
New class representing buildstats data of a single task. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: rename --min-time and --min-timediff argsMarkus Lehtonen
Rename these arguments to --min-val and --min-absdiff in preparation for supporting other "quantities" than just cputime. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30scripts/buildstats-diff: check that the given directory existsMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30wic: rename and amend systemd-boot wks fileJianxun Zhang
Rename wks for systemd-boot per the suggestion from community. Also amend description to distinguish it from others when running "wic list images". Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-28runqemu: explicitly set image formatEd Bartosh
QEMU produces a warning if drive format is not specified: WARNING: Image format was not specified for 'tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. Set image format to 'vmdk', 'qcow2' or 'vdi' for correspondent image types. Set it to 'raw' for the rest of image types. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28recipetool: newappend: drop _provide_to_pnChristopher Larson
This function was broken by the multi-config changes, and isn't needed anymore now that recipeutils.pn_to_recipe can handle provides. Without this, the newappend sub-command fails. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28scripts/cleanup-workdir: Adapt to SDK_ARCH -> SDK_SYS chanages for crosssdkRichard Purdie
With the change of crosssdk to use SDK_SYS, we need to update the script to match. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28devtool: Add a line break to generated READMEJoe MacDonald
When devtool creates a new workspace, it produced a README with one very long line and no space following 'bblayers.conf'. Add a line break as was intended. Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23scripts/runqemu: provide better error message on runqemu ifup failStephano Cetola
If runqemu-ifup fails hen running testimage, a rather cryptic error regarding "no tty present" is displayed. If this step fails, we should at least point the user at runqemu-gen-tapdevs. A quick search of this term in the manual will lead them to "Enabling Runtime Tests on QEMU" which should give them all the info they need. Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23wic: remove partition imagesEd Bartosh
Preserving images for every partition doubles disk space consumed by an image build. As those images are not used, so it's better to remove them after assembling final image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-23scripts/runqemu: Using a cpio* rootfs has no special networkNathan Rossi
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. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-23runqemu: Move virtio RNG to machine configurationNathan Rossi
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). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-22directdisk*.wks: add serial console supportEd Bartosh
Added serial console to kernel command line to to make it easier to boot wic images on devices without display. Tested on MinnowBoard MAX. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-21runqemu: don't fail during check_arg_machine()Joshua Lock
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 Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21runqemu: don't try and invoke bitbake when running in a toolchain envJoshua Lock
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21runqemu: try and guess qemu-system binary when MACHINE isn't setJoshua Lock
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21runqemu: validate paths and attempt to infer unset pathsJoshua Lock
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() Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20runqemu: improve finding of rootfs, kernel and dtbRobert Yang
* 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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-20runqemu-gen-tapdevs: remove /etc/runqemu-nosudo when remove tapsRobert Yang
It creats /etc/runqemu-nosudo when creats taps, so should remove it when remove taps. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-19runqemu: use OECORE_NATIVE_SYSROOT from sdkRobert Yang
There is no STAGING_DIR_NATIVE or bitbake in a extracted sdk, so check OECORE_NATIVE_SYSROOT and use it. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19runqemu: work even if a *.qemuboot.conf isn't foundJoshua Lock
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19runqemu: try symlinks when kernel or rootfs can't be foundJoshua Lock
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19runqemu: clarify an INFO messageJoshua Lock
Make it clearer that we are looking for a file which ends with qemuboot.conf Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19runqemu: add guidance to resolve issues with missing filesJoshua Lock
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. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19devtool: add: drop superfluous validation for recipe namePaul Eggleton
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). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19recipetool: create: support git short form URLsPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19recipetool: create: tweak license crunchingPaul Eggleton
Filter out a plain "Licensed under the XXXX license" statement, as seen in the capnproto project (and no doubt others). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19recipetool: create: pick up AC_PROG_SWIGPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19recipetool: create: detect python autoconf macrosPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>