aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2014-01-02wipe-sysroot: explain what is being deleted, and check for argumentsRoss Burton
Print the directories that will be deleted, and add a rudimentary check for arguments and display a message if arguments were passed. [ YOCTO #5423 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02test-dependencies.sh: avoid showing misleading error messagesJackie Huang
This avoids the following error messages when no dependency issue detected: find: `/build/r_cgp-dep_1225/p_x86_1225/bitbake_build/tmp/work/': No such file or directory grep: test-dependencies/1388042399/3_min/failed/*: No such file or directory ls: cannot access test-dependencies/1388042399/3_min/failed/*: No such file or directory Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20runqemu: Allow user to set -vga option with qemuparamsValentin Popa
At the moment, the user cannot to set -vga other then vmware (because "vmware" is set by default); and the first argument in qemuparams has higher precedence. Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-18scripts/contrib: Add graph-toolPaul Eggleton
A simple script I put together for getting the paths from one node to another in a dot graph. This is useful for example in working out why a particular recipe is getting built in conjunction with dot graph files produced by bitbake -g. For example: $ bitbake -g core-image-minimal ... $ graph-tool find-paths pn-depends.dot core-image-minimal util-linux core-image-minimal -> packagegroup-core-boot -> udev -> glib-2.0 -> python-dbus -> dbus-glib -> dbus -> libsm -> e2fsprogs -> util-linux core-image-minimal -> packagegroup-core-boot -> udev -> glib-2.0 -> python-dbus -> dbus -> libsm -> e2fsprogs -> util-linux core-image-minimal -> packagegroup-core-boot -> udev -> util-linux Partially addresses [YOCTO #3362]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-09runqemu: remove core-image-* whitelistScott Garman
Using a whitelist for image names to default to when none are specified on the command line is no longer desired. Instead, choose the most recently created image filename that conforms to typical image naming conventions. Fixes [YOCTO #5617]. Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-06python: Add missing RDEPENDS for python-unittestMike Looijmans
After installing python-unittest, the following errors occur when executing "import unittest" from a python commandline: ImportError: No module named StringIO ImportError: No module named pprint ImportError: No module named difflib ImportError: No module named pprint ImportError: No module named fnmatch Fix this by adding the missing dependencies to the generator script and run the generator. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-04lib/oeqa/selftest/base, scripts/oe-selftest: fix wrong remove path and do a ↵Stefan Stanacar
complete cleanup at the end The script should clean-up all the .inc files that might have been created by tests regardless of the outcome or if the script is interrupted. (currently the last test will leave a conf/selftest.inc around, even if it's not included anywhere) Also fix delete_recipeinc to actually delete what's supposed to. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03scripts/oe-selftest: script to run builds as unittest against bitbake or ↵Stefan Stanacar
various scripts The purpose of oe-selftest is to run unittest modules added from meta/lib/oeqa/selftest, which are tests against bitbake tools. Right now the script it's useful for simple tests like: - "bitbake --someoption, change some metadata, bitbake X, check something" type scenarios (PR service, error output, etc) - or "bitbake-layers <...>" type scripts and yocto-bsp tools. This commit also adds some helper modules that the tests will use and a base class. Also, most of the tests will have a dependency on a meta-selftest layer which contains specially modified recipes/bbappends/include files for the purpose of the tests. The tests themselves will usually write to ".inc" files from the layer or in conf/selftest.inc (which is added as an include in local.conf at the start and removed at the end) It's a simple matter or sourcing the enviroment, adding the meta-selftest layer to bblayers.conf and running: oe-selftest to get some results. It would finish faster if at least a core-image-minimal was built before. [ YOCTO #4740 ] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03classes/package: record PKGSIZE as total file size in pkgdataPaul Eggleton
We were using "du -sk" to collect the total size of all files in each package for writing out to PKGSIZE in each pkgdata file; however this reports the total space used on disk not the total size of all files, which means it is dependent on the block size and filesystem being used for TMPDIR on the build host. Instead, take the total of the size reported by lstat() for each packaged file, which we are already collecting for FILES_INFO in any case. Note: this changes PKGSIZE to be reported in bytes instead of kilobytes since this is what lstat reports, but this is really what we should be storing anyway so that we have the precision if we need it. Fixes [YOCTO #5334] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03classes/package: fix FILES_INFO serialisation in pkgdataPaul Eggleton
The FILES_INFO entry in each pkgdata file stores the list of files for each package. Make the following improvements to how this is stored: * Store paths as they would be seen on the target rather than erroneously including the full path to PKGDEST (which is specific to the build host the package was built on) * For simplicity when loading the data, store complete paths for each entry instead of trying to break off the first part and use it as the dict key * Record sizes for each file (as needed by Toaster) * Serialise the value explicitly using json rather than just passing it through str(). Fixes [YOCTO #5443]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26classes/image: write image manifestPaul Eggleton
Write a list of installed packages to a .manifest file next to the image, so we can find out what went into the image after it has been constructed without necessarily having to have buildhistory enabled (although that will provide more detail.) We can make use of this for example in the testimage class associated code that checks for installed packages for determining whether or not to run specific tests. Note: this replaces the previous ipk-specific manifest code with something that works for ipk, rpm and deb, and instead of a pruned status file, packages are listed one per line, in the following format: <packagename> <packagearch> <version> Tests for all three backends have shown that the performance impact of this change is negligible (about 1.5s max). Implements [YOCTO #5410] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Add option --minutes to show time in minutesPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Add a color for the package_write_* tasksPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Reorder the legend to match the task execution orderPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Make bars without a specified color whitePeter Kjellerstedt
Previously they were transparent. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Make "Show more" show all processesPeter Kjellerstedt
While "Show more" is enabled, all processes are shown, regardless of --mintime. This also has the added benefit of making the first shown bar start at its correct offset from the start time, rather than always starting at 0. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Draw a lot less ticksPeter Kjellerstedt
With this, one second ticks are only enabled if the width of a second is five pixels or more. It is also possible to distinguish 1, 5 and 30 second ticks. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Disable options that do not make sensePeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: No need to do a double list comprehension over filesPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Avoid having overlapping process barsPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Use correct header heightPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Correct the X offset for the chartPeter Kjellerstedt
This will make the first bar actually start within the graph. It will also move the graph to the right so the names of the first tasks are more likely to be visible. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Set the initial state of "Show more" correctlyPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Make the horizontal scaling stay within boundsPeter Kjellerstedt
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18pybootchartgui: Import pybootchartgui 0.14.5Peter Kjellerstedt
This update the pybootchartgui code to the latest release from its new location at "https://github.com/mmeeks/bootchart". This only imports the relevant parts, and not all of bootchart2. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14scripts/create-recipe: fix handling of --helpPaul Eggleton
If --help is specified as the first argument, show the standard help text instead of trying to process it as a URL. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30wic: Remove selinux_check()Tom Zanussi
This seems to be an obsolete check - we don't have any problems with image creation under selinux, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-29scripts/oe-pkgdata-util: fix global name 'debug' is not definedPaul Eggleton
This global variable is no longer present, so pass in the value specified via the command line. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29scripts: Add ksize.py and dirsize.pyDarren Hart
Fixes [YOCTO #5388] These scripts can be useful when working to reduce the size of the Linux kernel and the root filesystem. ksize.py displays the kernel build size by the built-in.o files. dirsize.py displays the various sizes of the components of the root directory. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-28scripts/oe-pkgdata-util: add ability to find a recipe from a target packagePaul Eggleton
Add a "lookup-recipe" command to show which recipe produced a particular package. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-28scripts/oe-pkgdata-util: add ability to look up runtime package namesPaul Eggleton
Add a "lookup-pkg" command to oe-pkgdata-util that can be used to find the runtime name of a package (after e.g. Debian library package renaming). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-28scripts/oe-pkgdata-util: add ability to search for a target pathPaul Eggleton
Add ability to search for a target path in produced packages, in order to find which package provides a specific file. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-28scripts/oe-pkgdata-util: check path arguments to ensure they existPaul Eggleton
Show an error if the specified paths don't exist. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-28scripts/oe-pkgdata-util: improve help text and command line parsingPaul Eggleton
* Use optparse to parse command line * Make help text actually helpful by describing what each command does * Drop comment at the top listing the commands which is now superfluous Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-28scripts/oe-pkgdata-util: remove remnants of former pkgdata structurePaul Eggleton
OE-Core commit 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379 removed the vendor-os argument from the command line, and the code using the package architectures, so clean these items up. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-26relocate_sdk.py: Allow script to work with Python 2.4 and 3.Konrad Scherer
Python 2.4 does not support the 'b' string literal or the keyword 'as' in exception handling. Python 3 does not accept the old method of exception handling and defaults to unicode. The b() function converts strings to bytes on Python 3 and using sys.exc_info() avoids the exception handling syntax. Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-26runqemu-extract-sdk: add --numeric-owner option to tar commandChen Qi
If the same username exists on both target and the build host, but the uids differ, and we start target via NFS, then the uid for the user will be incorrect on target. For example, if postfix's uid on host is 119 and on target is 1024, then if we start target via NFS, the uid for postfix will be 119. The root cause is that when we use runqemu-extract-sdk to generate the NFS rootfs for later use, the tar command will respect the username instead of uid. So if PSEUDO_PASSWD environment is not set correctly, the host /etc/passwd will be used, resulting in wrong uids. The situation for gid is completely analogous to that of uid. It's almost impossible for the runqemu-extract-sdk to guess the correct location of the needed password file merely based on the target tarball name. This patch solves this problem by adding the '--numeric-owner' option to the tar command so that the uid/gid will be used when extracting the tarball using runqemu-extract-sdk. In this situation, we'll always get the correct uid/gid after extracting the tarball. [YOCTO #5364] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-26buildhistory-diff: add ability to report version changesPaul Eggleton
Add a -v/--report-ver option to report changes in PKGE/PKGV/PKGR even if the value is the same as the default from PE/PV/PR. Also add a -a/--report-all option to report all changes instead of just the default significant ones. Addresses [YOCTO #5263]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-23wic: Update and generalize pseudo setup for rootfs generationTom Zanussi
Remove unnecessary pseudo exports i.e. PSEUDO_DISABLED and move the setup to the top-level prepare_rootfs(). Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Make find_binary_path() more user-friendlyTom Zanussi
find_binary_path() is useful, but if the binary isn't found, it prints a stacktrace and a less-than-useful message. Users complain when they get stacktraces for things they can act on, so remove the stacktrace and tell the user what the problem is. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Remove binary dependenciesTom Zanussi
Current functionality doesn't make use of kpartx, mount, or unmount, and we use native mkswap, so remove the binary checks for those. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Remove rpmmisc call from livecdTom Zanussi
We don't currently use LiveCDImageCreator, but it makes calls when initialized via the plugin interface to rpmmisc module functions, which we don't want the dependency on. To make it (and LiveUSBImageCreator) happy, we give it the dummy "i386" value for now. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Remove rpm and grabber dependencies from BaseImageCreatorTom Zanussi
BaseImageCreator is a base class for DirectImageCreator and others, and imports rpm and grabber (which imports rpm). The various plugins e.g. DirectPlugin import the creators and therefore these dependencies, which manifest at run-time as e.g.: Warning: Failed to load plugin imager/direct_plugin: No module named rpm Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: remove rpm warning code from BackendPluginTom Zanussi
We don't currently use rpm functionality, so we don't need to silence rpm warnings. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Remove dependency on myurlgrab moduleTom Zanussi
mylrlgrab is in grabber, which imports rpm. For current functionality, we don't need to grab urls or import rpm, so remove the dependency. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Remove dependency on rpmmiscTom Zanussi
rpmmisc imports rpm and contains misc rpm utilities related to packaging and determining arches based on the packaging. We should never run across this in the initial version of wic, so remove the dependency. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: eliminate module checksTom Zanussi
We're removing all external dependencies including rpm and urlgrabber, so we don't need this check. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: Remove dependency on rt_util moduleTom Zanussi
rt_util contains bootstrap_mic(), which imports rpm and other things we don't need because we don't do bootstrap i.e. runtime (set in wic.conf) is always set to 'native', which means use what's on the local host. bootstrap mode is for downloading and installing rpms that wic needs, which we may want to implement later; for now, we just want to use what's local. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18wic: add pseudo to the populate-extfs stepTom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18wic: Initialize return values in find_artifacts()Tom Zanussi
If one of these isn't found, it won't be initialized and will throw an UnboundLocalError. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>