aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2016-10-31recipetool: create: separate LICENSE items with & by defaultPaul Eggleton
recipetool sets the LICENSE value based on licenses detected from the source tree. If there are multiple licenses then they were being separated by spaces, but this isn't actually legal formatting and if you're using "devtool add" you get a warning printed when devtool parses the recipe internally. Earlier I had made a conscious decision to do it this way since it's up to the user to figure out whether the multiple licenses should all apply (in which case they'd be separated with &) or if there is a choice of license (in which case | is the correct separator). However, I've come to the conclusion that we can just default to & and then the ugly warning goes away, and it's the safest alternative of the two (and most likely to be correct, since it's more common to have a codebase which is made up of code with different licenses, i.e. all of them apply to the combined work). I've tweaked the comment that we add to the recipe to explicitly state that we've used & and that the user needs to change that if that's not accurate. Fixes [YOCTO #10413]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-31devtool: finish: warn if moving recipe to unconfigured destination layerPaul Eggleton
If you run devtool finish to move a recipe created in the workspace by devtool add or devtool upgrade to a layer, and that layer is not currently included in bblayers.conf (perhaps unintentionally), then the recipe will no longer be visible to bitbake. In this scenario, show a warning so that the user isn't surprised by the recipe "going missing". Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-31devtool: finish: fix error if destination layer is not in bblayers.confPaul Eggleton
If devtool finish is run on a recipe where the recipe file itself is in the workspace (e.g. where devtool add / devtool upgrade has been used) and the specified destination layer is not in bblayers.conf, then we need to avoid running bitbake -c clean at the end because the recipe has been moved, but the bbappend is still present in the workspace layer at that point and so if we do it will fail due to the dangling bbappend. It's difficult to do the clean at the point we'd want to because tinfoil is holding bitbake.lock for most of the time, but in any case cleaning the recipe is less important than it used to be since we started managing the sysroot contents more strictly, so just disable cleaning under these circumstances to avoid the problem. Fixes [YOCTO #10484]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-31devtool: add: show recipetool create outputPaul Eggleton
When running devtool add, instead of hiding the recipetool create output, change it so that it's appropriate to show in the devtool context and show it in real-time. This means that you get status output such as when a URL is being fetched (though currently no progress information.) recipetool create now has a hidden --devtool option to enable this display mode. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-28combo-layer: handle file_exclude matching dirsOlaf Mandel
If file_exclude matches a directory, os.unlink() got called with this directory as an argument. Filter out paths that end in a directory separator. This still leaves the (then empty) directories, but this does not affect the git commit. Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-28sstate-sysroot-cruft: Add /etc/ld.so.conf to whitelistMartin Jansa
* it reports at least 2 issues in every build (this file in native and target sysroot) add it to whitelist Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28test-dependencies.sh: Strip also '\.bb: .*' before adding failed recipe to ↵Martin Jansa
list of failed * format of bitbake tasks changed in: 2c88afb taskdata/runqueue: Rewrite without use of ID indirection -ERROR: Task 4 (/OE/build/oe-core/openembedded-core/meta/recipes-devtools/rpm/sftp.bb, do_fetch) failed with exit code '1' +ERROR: Task /OE/build/oe-core/openembedded-core/meta/recipes-devtools/rpm/sftp.bb:do_fetch (/OE/build/oe-core/openembedded-core/meta/recipes-devtools/rpm/sftp.bb:do_fetch) failed with exit code '1' so strip not only '\.bb, .*' used before, but also '\.bb:.*' to drop the task name to get recipe name. * for more details see: http://lists.openembedded.org/pipermail/openembedded-core/2016-June/123132.html * without this change you can see test-dependencies.sh trying to rebuild packages like: Building recipe: fbprogress (6/21) Building recipe: fbprogress.bb:do (7/21) where the later of course doesn't exist as a recipe Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28combo-layer: handle ambiguous git argumentsOlaf Mandel
If a branch/src-repository has the same name as a file/directory, git since 1.4.0(?) gives an error like the one below: ambiguous argument 'bitbake': both revision and filename Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Add two dashes to make the intent clear. Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28combo-layer: fix crashes on wrong tempfile usageOlaf Mandel
When calling tempfile.NamedTemporaryFile().write(str()), at least on Python 3.4.2 this fails with this error: TypeError: 'str' does not support the buffer interface Change the file-mode for all such files from binary to text mode. Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28buildhistory-collect-srcrevs: Fix multiple SRCREV definitionsTobias Hagelborn
Fixed copy & paste error causing error when extracting SRCREV for packages containing multiple SRCREV definitons. Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-25devtool: runqemu: work around runqemu script path assumptionPaul Eggleton
The new runqemu script assumes that if OECORE_NATIVE_SYSROOT is set then it shouldn't try to run bitbake to find out the values of various variables such as DEPLOY_DIR_IMAGE; this assumption is incorrect for the extensible SDK. To work around this, clear OECORE_NATIVE_SYSROOT in the environment when running runqemu. Fixes [YOCTO #10447]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-11canned-wks: use GPT partition tableEd Bartosh
According to UEFI specification all EFI platforms must support GUID Partition Table(GPT) disk layout. Here is a list of advantages of using GPT disk layout over the legacy MBR partitioning: - Logical Block Addresses (LBAs) are 64 bits (rather than 32 bits). - Supports many partitions (rather than just four primary partitions). - Provides both a primary and backup partition table for redundancy. - Uses version number and size fields for future expansion. - Uses CRC32 fields for improved data integrity. - Defines a GUID for uniquely identifying each partition. - Uses a GUID and attributes to define partition content type. - Each partition contains a 36 character human readable name. Used GPT partitioning in all EFI kickstart files. Tested result images on NUC, MinnowBoard MAX and MinnowBoard Turbot. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-11systemd-bootdisk.wks: update kernel command lineEd Bartosh
Used ttyS0 console. Removed usage of ttyPCH0 (FRI2 leftover) Decreased bootloader timeout to 5 seconds Removed 'vmalloc=256MB snd-hda-intel.enable_msi=0' as it's not needed for any of reference BSPs. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-09mkgummidisk.wks: update kernel command lineEd Bartosh
Used ttyS0 console. Removed usage of ttyPCH0 (FRI2 leftover) Decreased bootloader timeout to 5 seconds Removed 'vmalloc=256MB snd-hda-intel.enable_msi=0' as it's not needed for any of reference BSPs. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07mkefidisk.wks: update kernel command lineEd Bartosh
Used ttyS0 console. Removed usage of ttyPCH0 (FRI2 leftover) Decreased bootloader timeout to 5 seconds Removed 'vmalloc=256MB snd-hda-intel.enable_msi=0' as it's not needed for any of reference BSPs. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07mkefidisk.wks: use MSDOS partition tableEd Bartosh
Stopped using GPT partition table in mkefidisk.wks as it's not supported by all reference hardware. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: rewrite MBR disk identifierEd Bartosh
Disk identifier created by parted doesn't match the one we generated and used in bootloader config. We need to rewrite it to make our image bootable. Modified involved API and data structures to access previously generated disk identifiers after MBR is initialized. Written disk identifiers to MBR. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: generate PARTUUID for MDOS partitionsEd Bartosh
Added generation of partition UUIDs for MSDOS partitions. UUID for MSDOS partitions is <disk identifier>-<partition number>, where disk identifier is a random 4 bytes long number. It's usually generated when MBR/partition table is initialized. As UUID is used to point to the root partition in bootloader config we need to generate it before the MBR is initialized. After MBR is created we need to rewrite system identifier to match it with what is used in bootloader config. This will be implemented in the next commit. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07wic: set PARTUUID only for gpt partition tableEd Bartosh
sgdisk fails to set PARTUUID for msdos partitions as it's only supported for GPT partitions. Checked partition table format to run sgdisk --partition-guid only for GPT partitions. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>