aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/contrib
AgeCommit message (Collapse)Author
2013-06-10ddimage: fix incompatibility with dashHongxu Jia
On systems with dash as /bin/sh there were failures while invoking ddimage. Fix to let it work with both bash and dash shells. [YOCTO #4617] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-02mkefidisk: Unmount after partitioningDarren Hart
Some automounters are rather overzealous and like to mount things immediately after partitioning. This can happen if the disk is being reused and the partitions align exactly with the existing partitions which have already been formatted. Move the unmount code into a function and call it before and after partitioning. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-29scripts/contrib/build-perf-test.sh: change the global results formatStefan Stanacar
When all builds have finished write the hostname, commit and times on a single line in the global results file (useful for merging later on files from multiple systems). Also the final cleaning should be last after writing the results. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-29scripts/contrib/build-perf-test.sh: skip network sanity testsStefan Stanacar
When your proxy/network connection is unstable the network sanity test which runs before every build (because we wipe all the files in the build dir) can influence build time. Appending CONNECTIVITY_CHECK_URIS = "" in local.conf will disable the check. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-29scripts/contrib/build-perf-test.sh: use the same identation everywhereStefan Stanacar
Some functions didn't used the same identation as the rest of them, let's fix that. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-29mkefidisk: Attempt to automatically unmount target deviceDarren Hart
With automounters abounding it makes more sense to attempt to unmount the device rather than abort, just like ddimage does. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-04python: adding missing runtime dependency python-io to python-pprintLukas Bulwahn
When trying to import python-pprint on a minimal image, it reports that the cStringIO python module is missing. This is provided with python-io, so we add python-io as runtime dependency. The complete observed trace was: Python 2.7.3 (default, Apr 4 2013, 07:45:36) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pprint Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/pprint.py", line 40, in <module> from cStringIO import StringIO as _StringIO ImportError: No module named cStringIO Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29scripts/contrib/build-perf-test.sh: add timings for bitbake -pStefan Stanacar
Add another test to time bitbake -p with and without cache/ or tmp/cache. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29scripts/contrib/build-perf-test.sh: add option to allow cherry-picking of ↵Richard Purdie
fix revisions Adds a -p option to allow cherry-picking of fix revisions. Removes the final build/sstate directories to stop running out of space. Runs subsequent tasks even if one test fails. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29scripts/contrib/build-perf-test.sh: add a global results fileStefan Stanacar
Append results from each run to a single file in order to keep a history. Also do some cosmetic changes and fix some whitespace. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29scripts/contrib/build-perf-test.sh: add a script for build performance trackingStefan Stanacar
This script runs a series of builds (core-image-sato by default) with and without sstate cache and collects some metrics (time and size currently). It takes a commit as argument (-c <rev>) and measures wall clock for bitbake core-image-sato and virtual/kernel. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22mkefidisk: Use msdos partition tablesDarren Hart
While GPT works fine when writing to actual media, it cannot be reliably used for distributing disk images as it requires the backup table to be on the last block on the device, which of course varies from device to device. Use MSDOS tables instead. Use mkfs to label the filesystems as msdos tables do not support partition labeling. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22mkefidisk: Remove startup.nshDarren Hart
Most firmware implementations use the EFI specified EFI/BOOT/bootia32.efi (and similar) boot paths. Only broken firmware uses different paths for removable media. In those cases, the user can add their own startup.nsh. For the compliant case, selecting "Shell" from the EFI boot menu should go to the shell. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22mkefidisk: Always use rootwait and document kernel parameters usedDarren Hart
Without a reliable way of knowing if the target device with be an asyncronous block device on the target (MMC or USB), err on the side of caution of always specifcy "rootwait", ensuring the kernel will wait for the device to appear and not abort if it hasn't appeared in time for mount. Document the remaining kernel parameters added by this script on the same line as rootwait. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22mkefidisk: Boot with ro kernel parameter instead of rwDarren Hart
There is no need to boot with "rw". Booting with "ro" will allow for fsck to be run during boot, and a proper /etc/fstab will still ensure the rootfs is "rw" by the time the user can interact with the system. Change the "rw" to "ro" in the kernel parameters specified in the generated grub.cfg file. Fixes [YOCTO 4036] mkefidisk.sh hardcodes 'rw' as root mount option Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22mkefidisk: Cleanup comment lengthDarren Hart
Keep comments under 80 characters in length. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22mkefidisk: Always specify a root= kernel parameterDarren Hart
The current script only replaces an existing root= kernel parameter which can result images created without a root= paremeter, even though the script expects a target rootfs parameter. Rather than replacing the root= parameter, delete the root= parameter if it exists, then append an appropriate root= parameter. Fixes [YOCTO 4035] mkefidisk.sh forgets to add root= parameter Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18mkefidisk.sh: create a proper ESPKoen Kooi
The script was creating a FAT fs with EFI files in it, but wasn't setting the GPT GUID. Using 'gummiboot install' natively failed because of the missing GPT GUID, so fix that. While we're there also set the name to "EFI System Partition". Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-09mkefidisk.sh: Cope with translations and modelnames with 'Disk' in it.Koen Kooi
The script greps for 'Disk', which doesn't work when your crazy Dutch distro has parted call it 'Schijf', so force LANG=C. The second problem is that 'Disk' might be a substring in the Model entry: [root@Angstrom-F16-vm-rpm contrib] # parted /dev/sdc unit mb print Model: SanDisk SDDR-113 (scsi) Disk /dev/sdc: 3905MB Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14Python: Add missing dependency "textutils" to "io" packageMiLo
Modify the include file and script to generate a missing RDEPENDS. Install python on target with python-io. Import ssl: Python 2.7.3 (default, Feb 9 2013, 16:04:35) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/ssl.py", line 58, in <module> ImportError: No module named textwrap Installing python-textutils solves the issue. Signed-off-by: MiLo <milo-software@users.sourceforge.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21bb-matrix: Fix min and max calculationsDarren Hart
The BB and PM ranges were originally intended to use leading 0s to ensure all the values were the same string length, making for nice log filenames and columnar dat files. However, not everyone will do this - especially if it isn't documented. Document the intent. Make the generation and parsing of dat files robust to either method. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-25python: add -crypt as a dependency on -mathRoss Burton
random.py imports hashlib, so add this missing dependency. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-11documentation-audit.sh: Add/fix checks for skipped lines.Robert P. J. Day
Have the script skip: * "Recipe" lines. * Lines with 11 "=", not 12. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20mkefidisk.sh: Add script to do an EFI install on the hostDarren Hart
Sometimes it is convenient to prepare a bootable image from the host rather than using a live-image to install to a disk on the target. This script takes a live image as input, partitions a device, and performs the installation just as the installer would if run on the target. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define any options and furthermore allows 'echo -e' to be the default behavior. This means that in dash 'echo -e' will actually print '-e' and interpret backslashes by default. We use instead 'printf' builtin command with or without '\n' to simulate 'echo -e' or 'echo -n'. 'printf' needs format while 'echo' can be used without any arguments. So 'echo >' was replaced by 'printf "" >'. 'echo' without '-n' flag adds a new line by default so to keep the same behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is used. [YOCTO #3138] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-03Rename task to packagegroupPaul Eggleton
"Package group" is a much more appropriate name for these than task, since we use the word task to describe units of work executed by BitBake. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-06-05generate-manifest-2.7.py: replace os.popen with os.unlinkRobert Yang
The os.popen function would fail (more or less) silently if the executed program cannot be found, and here what we need is os.system not os.popen since it doesn't use the return value, use os.unlink() and ignore exceptions from it would be better as Chris suggested. [YOCTO #2454] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2012-04-11python: multilib header support.Lianhao Lu
Add intercept multilib header for pyconfig.h in python. This is part of the bug fixing [YOCTO #2216]. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26python: fix packaging dependencies on minimal systemsGary Thomas
If you install the top-level python package only on a minimal system which has no other python packages installed then python is not functional at all. Without any extra packages installed this error is seen: # python Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 64, in <module> import traceback ImportError: No module named traceback Installing python-lang only partly fixes the problem as this error still exists: # python Traceback (most recent call last): File "/usr/lib/python2.7/site.py", line 569, in <module> main() File "/usr/lib/python2.7/site.py", line 551, in main known_paths = addusersitepackages(known_paths) File "/usr/lib/python2.7/site.py", line 278, in addusersitepackages user_site = getusersitepackages() File "/usr/lib/python2.7/site.py", line 253, in getusersitepackages user_base = getuserbase() # this will also set USER_BASE File "/usr/lib/python2.7/site.py", line 243, in getuserbase USER_BASE = get_config_var('userbase') File "/usr/lib/python2.7/sysconfig.py", line 520, in get_config_var return get_config_vars().get(name) File "/usr/lib/python2.7/sysconfig.py", line 400, in get_config_vars import re ImportError: No module named re Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-22ddimage: Add script for writing images to boot mediaDarren Hart
Fixes [YOCTO #1806] Standard practice is to use the Linux "dd" command to write images to boot media. This can be error prone and the results of sloppy usage can be disastrous. Locating the device you want to use is a clumsy process, especially on a headless build system. The ddimage script does the following: o Check the image and device exist o Check the device is writable o Compare the device to a blacklist and abort if it's listed Blacklist defaults to "/dev/sda" o Display useful identifying information about the image and device o Prompt the user before commencing the write The output looks something like this: $ sudo ~/bin/ddimage tmp/deploy/images/core-image-sato-fri2-noemgd.hddimg /dev/sdk Image details ============= image: `tmp/deploy/images/core-image-sato-fri2-noemgd.hddimg' -> `core-image-sato-fri2-noemgd-20111202214038.hddimg' size: 318568448 bytes modified: 2011-12-02 13:45:05.298897861 -0800 type: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 16, root entries 512, Media descriptor 0xf8, sectors/FAT 152, heads 64, hidden sectors 32, sectors 622204 (volumes > 32 MB) , serial number 0x4ed946e0, label: "boot ", FAT (16 bit) Device details ============== device: /dev/sdk vendor: Kingston model: DT 101 G2 Write tmp/deploy/images/core-image-sato-fri2-noemgd.hddimg to /dev/sdk [y/N]? y Writing image... 303+1 records in 303+1 records out 318568448 bytes (319 MB) copied, 53.6766 s, 5.9 MB/s Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Dexuan Cui <dexuan.cui@intel.com> CC: Joshua Lock <josh@linux.intel.com> CC: Kishore K Bodke <kishore.k.bodke@intel.com>
2012-03-14scripts/contrib/python/generate-manifest-2.7.py: Catch up with staticdev fixesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24documentation-audit.sh: remove COMMERCIAL_LICENSE warningTom Zanussi
COMMERCIAL_LICENSE no longer exists; the equivalent functionality is now has been replaced by LICENSE_FLAGS_WHITELIST, so replace the COMMERCIAL_LICENSE warning with a similarly equivalent warning. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2011-11-07python: improve packagingMartin Jansa
* move 2to3 to separate package and include lib2to3 (was in python-misc) * fix pattern for python-unittest (was in python-misc because it's in subdirectory now) * add pydoc_data to python-pydoc (was in python-misc) * add more stuff to smtpd, audio, codecs, ctypes, html, io, json, mime, pickle, stringold, xmlrpc * move all FILES_ details from python recipe to manifest generator so it's in one place * added manual line break in FILES_${PN}-core, because git send-email doesn't like too long lines $ git send-email -1 dfaae65839f0ab23e5b2ae2a68df0f370bca84d2 fatal: /tmp/k8zbDajUNP/0001-python-improve-packaging.patch: 64: patch contains a line longer than 998 characters Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2011-10-31documentation-audit.sh: script for auditing documentation build statusScott Garman
This script is used to enumerate which recipes are building documentation. It does this by checking that a -doc package gets generated and contains files. The script works by building each recipe using the output from bitbake -s. It will generate several report files, listing which recipes include documentation, which are missing documentation, and which did not successfully build at all. Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-10-31update python 2.7 manifestNitin A Kamble
script: add needed files into the python-core package regenerate python-2.7-manifest.inc file with newer script Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2011-10-31python: update generate-manifest for 2.7 version and regenerate itMartin Jansa
* it needs to be regenerated to actually package something Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2011-07-20scripts/contrib: add build time regression test scriptPaul Eggleton
test_build_time.sh is a bash script intended to be used in conjunction with "git bisect run" in order to find regressions in build time, however it can also be used independently. It cleans out the build output directories, runs a specified worker script (an example is test_build_time_worker.sh) under TIME(1), logs the results, and returns a value telling "git bisect run" whether the build time is good (under the specified threshold) or bad (over it). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-07-14bb-matrix: correct BB and PM number canonicalizationDarren Hart
The bash string operation ${BB##*0} was greedy and in addition to converting "02" to "2", also converted "20" to "", causing all builds for a BB value ending in 0 to run with BB_NUMBER_THREADS=1. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12bb-matrix: initial scripts to record TIME(1) metrics for BB and PM combinationsDarren Hart
The bb-matrix.sh script will run a bitbake command, building core-image-minimal by default, for various combinations of BB_NUMBER_THREADS and PARALLEL_MAKE. It records all relevant metrics of the TIME(1) command for each combination in a data file. The bb-matrix-plot.sh script can be used to visualize each of these metrics via a 3d surface plot, either solid surface or wireframe with a value-map projection on the XY plane. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-23python: Switch to using the default -dbg packageMark Hatle
Python was missing a lot of debug information. Switch to use the default -dbg package. Also add some additional debug information to the -dbg package. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-03-08python: add generate-manifest-2.6.py script and regen python-2.6-manifest.incMartin Jansa
* imported from OE with sorted entries etc Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Acked-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-01-12bbvars.py: add a script to look for undocumented variablesDarren Hart
bbvars.py will compare recipes in meta directories with documentation files and report on variables that don't appear to be documented. It reports the number of times a variable is used as well as any doctags present in the documentation config file. The output of this is intended to aid in determining where documentation may be lacking, but it is not perfect, and does generate some false positives. An experienced eye and careful attention to count and doctag should be applied to the results. $ ./bbvars.py -d ../../documentation/poky-ref-manual/poky-ref-manual.html -m ../../meta -t ../../meta/conf/documentation.conf -T | head -n 10 Found 1413 undocumented bb variables (out of 1578): VARIABLE COUNT DOCTAG =================================================== BUILD_ARCH 4 The name of the building architecture. E.g. i686. BUILD_CC_ARCH 2 FIXME BUILD_PREFIX 4 FIXME BUILD_SYS 13 FIXME BUILD_VENDOR 2 FIXME CACHE 1 The directory holding the cache of the metadata. COMPATIBLE_HOST 19 A regular expression which matches the HOST_SYS names supported by the package/file. Failure to match will cause the file to be skipped by the parser. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Richard Purdie <richard.purdie@linuxfoundation.org>