Commit Graph

54 Commits

Author SHA1 Message Date
Jason Wessel cf2ebed2ff mkefidisk.sh: Allow using a loopback mounted file
It should be possible to generate a disk to a file using a loopback
device with mkefidisk.sh, which is useful for booting simulators.  To
make this possible the partitions for the loop back need to work
similarly to the mmc devices.  The mkfs.vfat also requires and
additional argument to force it to write to something other then a
real disk.

Example:
  qemu-img create -f raw bigdisk 4G
  dev=`sudo losetup -f`
  sudo losetup $dev bigdisk
  mkefidisk.sh $dev tmp-eglibc/deploy/images/qemux86/core-image-minimal-qemux86.hddimg /dev/sda
  sudo losetup -d $dev

Note:
  Also a bug was fixed in the mkefidisk.sh where if the disk you are
  writing to initially has an invalid label the size of the first
  partition will be computed incorrectly.  For the simulator disk
  creation this is generally always the case, but this can happen with
  real hardware as well.

(From OE-Core rev: 254899824900f2e8c6a34d2ad1b8cbea91acb4ae)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:58 +01:00
Stefan Stanacar 576a19ed6c scripts/contrib/build-perf-test.sh: record size in kb and remove extra spaces
(From OE-Core rev: 8c2b5948d41d753982242cd86a1498ab4f1bb317)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:29:41 +01:00
Peter Kjellerstedt 4137f9a996 bb-matrix-plot: Use interpolation for sparse data
If not every combination of BB_NUMBER_THREADS and PARALLEL_MAKE have
been tested by bb-matrix.sh, e.g., by using BB_RANGE="04 08 10 12 16"
and PM_RANGE="04 08 10 12 16", then the graph that gnuplot generates by
default looks very jagged due to the missing data points. By using
splines to interpolate the missing data the graph looks a lot better.

This should not change graphs where all data points are available in any
way, only improve sparse graphs.

(From OE-Core rev: 9642c1314da64c70254f6b012aa73ef37bbaa33f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Peter Kjellerstedt 643252f889 bb-matrix: Clean before, rather than after, building
This makes sure the the first build starts from a clean state. Otherwise
one could have the first build affected by any leftover state from
a previous build.

This also leaves a working state behind after the final build.

(From OE-Core rev: f8f86ac88aa1bba99ba28762cfbd97d3721da7d9)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:20:59 +01:00
Hongxu Jia 926a117486 list-packageconfig-flags.py: fix searching bitbake module failed
Run list-packageconfig-flags.py on wrlinux's platform in which
the oe-core layer and bitbake layer in different directories:
----
../layers/oe-core/scripts/contrib/list-packageconfig-flags.py
Traceback (most recent call last):
  File "../layers/oe-core/scripts/contrib/list-packageconfig-flags.py", line 28, in <module>
    import bb.cache
ImportError: No module named bb.cache
----

The script import bb module from bitbake lib dir, the previous
lib dir was hardcode and only worked on poky but not for others.

In this situation, look for bitbake/bin dir in PATH could fix this issue.

[YOCTO #5060]

(From OE-Core rev: 9e749c430f97b1a30cdf0c13dacd2a985ef7b433)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:47 +01:00
Richard Purdie d80a715e37 python-2.7-manifest: Add missing python-ctypes dependency to python-multiprocessing
(From OE-Core rev: 5abf18a7f11ee9e88e0eec1b66cc63427d9097a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 12:15:49 +01:00
Hongxu Jia 2ff22490aa list-packageconfig-flags.py: add a script to list all PACKAGECONFIG flags
- This script will list available pkgs which have PACKAGECONFIG flags.
- If option '-f' is used, it will list available PACKAGECONFIG flags
  and all affected pkgs.
- If option '-a' is used, it will list all pkgs and PACKAGECONFIG
  information
- If option '-p' is used, it means list the pkgs with preferred version

EXAMPLE:
list-packageconfig-flags.py
PACKAGE NAME                               PACKAGECONFIG FLAGS
==============================================================
alsa-tools-1.0.26.1                        defaultval gtk+
avahi-ui-0.6.31                            defaultval python
bluez4-4.101                               alsa defaultval pie

list-packageconfig-flags.py -f
PACKAGECONFIG FLAG     PACKAGE NAMES
====================================
3g                     connman-1.16
avahi                  cups-1.6.3  pulseaudio-4.0
beecrypt               rpm-5.4.9  rpm-native-5.4.9

list-packageconfig-flags.py -a
==================================================
gtk+-2.24.18
/home/jiahongxu/yocto/poky/meta/recipes-gnome/gtk+/gtk+_2.24.18.bb
PACKAGECONFIG x11
PACKAGECONFIG[x11] --with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}

xf86-video-intel-2.21.9
/home/jiahongxu/yocto/poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.9.bb
PACKAGECONFIG None
PACKAGECONFIG[xvmc] --enable-xvmc,--disable-xvmc,libxvmc
PACKAGECONFIG[sna] --enable-sna,--disable-sna

[YOCTO #4368]

(From OE-Core rev: 8d9e55e1fb073820c959f1797f3ad5a8932b441b)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:40:00 +01:00
Chen Qi d55d458734 scripts/contrib/mkefidisk.sh: fix bashism
Remove the function keyword.

(From OE-Core rev: 0eb9dd29b89449e2b9a10bf57f34c09a8bed40bc)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 12:39:52 +01:00
Paul Eggleton 7156f30ac3 scripts/contrib/*: fix arithmetic bashism
Apparently $[...] isn't valid in dash, so use $((...)) instead for
mkefidisk.sh and ddimage that both start with $!/bin/sh.

(From OE-Core rev: d509739ca54e6b70f2dcc216b831fc02c64293a6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-18 21:25:35 +01:00
Lukas Bulwahn 67f76e6fc2 python-multiprocessing: adding runtime dependencies
As python-multiprocessing requires python-threading and
python-pickle, this commit adds them as runtime dependency.

The observed behavior was:

When typing 'import multiprocessing' in the python shell on a
minimal image with only the python-multiprocessing recipe installed,
python reports at first:

Python 2.7.3 (default, Jun 27 2013, 08:26:25)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing;
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 65, in <module>
    from multiprocessing.util import SUBDEBUG, SUBWARNING
  File "/usr/lib/python2.7/multiprocessing/util.py", line 38, in <module>
    import threading        # we want threading to install it's
ImportError: No module named threading

After adding python-threading as runtime dependency and rebuilding
the image, python reports:

Python 2.7.3 (default, Jun 27 2013, 08:26:25)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing;
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 84, in <module>
    import _multiprocessing
ImportError: No module named cPickle

(From OE-Core rev: e913412ca0ff01cb654757c8199e8859f15b7cf7)

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 11:02:41 +01:00
Stefan Stanacar 30d3c8d11e scripts/contrib/build-perf-test.sh: fix passing arguments
Don't pass arguments to bitbake as a single one,
because this will break when the bitbake double-exec
is removed.

(From OE-Core rev: db13f10d233873148156880ab709ec76f8d3c329)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13 17:38:10 +01:00
Stefan Stanacar b7308e7814 scripts/contrib/build-perf-test.sh: add branch name and sizes to results
Be more descriptive about the revision we are running on
in the global results file: add branch:commit and git describe fields.
Also add the sizes for tmp dir not only times. (previously these were
only available in the output.log)

(From OE-Core rev: 769a2c8ce797ee3afa39ab0fe9d9206a60cc4ba1)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13 17:38:10 +01:00
Hongxu Jia a3bf47abb4 ddimage: fix incompatibility with dash
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]

(From OE-Core rev: 4c6f7a5d8bd6ada434b91037ecd5db06f3eac814)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:00 +01:00
Darren Hart c09866b4cf mkefidisk: Unmount after partitioning
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.

(From OE-Core rev: f1854e458e5e77806b1fc837033500fa91272261)

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>
2013-05-02 17:41:55 +01:00
Stefan Stanacar 735656bf62 scripts/contrib/build-perf-test.sh: change the global results format
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.

(From OE-Core rev: 582798f70bf350d2db6911eb8df333ada05f6484)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:07 +01:00
Stefan Stanacar f58228f2b8 scripts/contrib/build-perf-test.sh: skip network sanity tests
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.

(From OE-Core rev: cc1ed3c1940e4f64534b58de1b5fc6ef90362c9a)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:07 +01:00
Stefan Stanacar 04d552f6df scripts/contrib/build-perf-test.sh: use the same identation everywhere
Some functions didn't used the same identation as the rest of them,
let's fix that.

(From OE-Core rev: a7af4541060f62b4019a100d57e0d082794f708b)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29 14:45:07 +01:00
Darren Hart d853d5b6d0 mkefidisk: Attempt to automatically unmount target device
With automounters abounding it makes more sense to attempt to unmount
the device rather than abort, just like ddimage does.

(From OE-Core rev: f522ff19ba4b80788d66a2c58ee50b86fdfea15f)

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>
2013-04-29 14:45:06 +01:00
Lukas Bulwahn 88f446661b python: adding missing runtime dependency python-io to python-pprint
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

(From OE-Core rev: abe7bf9992e298f1b53e790eee7b064a9e4e8589)

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:04:42 +01:00
Stefan Stanacar 851f1e368b scripts/contrib/build-perf-test.sh: add timings for bitbake -p
Add another test to time bitbake -p with and without cache/ or tmp/cache.

(From OE-Core rev: 3ed59ee53ee7d87694670a7ba864165146b90a6b)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 16:23:11 +00:00
Richard Purdie a105bc40ad scripts/contrib/build-perf-test.sh: add option to allow cherry-picking of 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.

(From OE-Core rev: 16ea0d406a31e08071ce7d475221f0b158165405)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 16:23:11 +00:00
Stefan Stanacar c6f9e4a675 scripts/contrib/build-perf-test.sh: add a global results file
Append results from each run to a single file in order to keep a history.
Also do some cosmetic changes and fix some whitespace.

(From OE-Core rev: 9b99b4e9284071501859df5631e9019b3000ffe9)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 16:23:11 +00:00
Stefan Stanacar 5769b5971f scripts/contrib/build-perf-test.sh: add a script for build performance tracking
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.

(From OE-Core rev: ee9538081a0bccfb7eb2888b1b51fe9b71c8cb81)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 16:23:10 +00:00
Darren Hart acc5f0d94b mkefidisk: Use msdos partition tables
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.

(From OE-Core rev: 049ea1e0a6a1017a5020de38bd7ce93515bd62f4)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Darren Hart 663c39dc1e mkefidisk: Remove startup.nsh
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.

(From OE-Core rev: d031cdbf40231b8c103d78c69252bf9d584d0605)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Darren Hart d20eea7830 mkefidisk: Always use rootwait and document kernel parameters used
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.

(From OE-Core rev: 5b6a6a3872fd341cf978be40c69707223e3c29df)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Darren Hart 24cd3ddeb7 mkefidisk: Boot with ro kernel parameter instead of rw
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

(From OE-Core rev: 960f0cbf85a4124adbc74d8b2ceb09a7d39ecc04)

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-22 16:54:38 +00:00
Darren Hart ca67cd9334 mkefidisk: Cleanup comment length
Keep comments under 80 characters in length.

(From OE-Core rev: 1fbab279edd0057193900646cf9f66323698e774)

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-22 16:54:38 +00:00
Darren Hart c38da2675b mkefidisk: Always specify a root= kernel parameter
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

(From OE-Core rev: e5dbec7e7d3bb29676280823b0337ad429c75120)

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-22 16:54:38 +00:00
Koen Kooi 95bb9de25d mkefidisk.sh: create a proper ESP
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".

(From OE-Core rev: 203ca80ee27948e2c68aab8ea48e51ff1c1157d5)

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-18 21:42:24 +00:00
Koen Kooi 5848c5c745 mkefidisk.sh: Cope with translations and modelnames with 'Disk' in it.
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

(From OE-Core rev: 2e404930f6fc7d818d2f429793e84bce77163afd)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:50 +00:00
MiLo 0be6d35d46 Python: Add missing dependency "textutils" to "io" package
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.

(From OE-Core rev: 900ae881c3483eea36aa0be456b93f92980f4924)

Signed-off-by: MiLo <milo-software@users.sourceforge.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 10:46:25 +00:00
Darren Hart 4287f70341 bb-matrix: Fix min and max calculations
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.

(From OE-Core rev: 90dc44c8246f2a580fe4a41ce28c201e52307500)

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>
2013-01-21 10:22:08 +00:00
Ross Burton 627e745d7b python: add -crypt as a dependency on -math
random.py imports hashlib, so add this missing dependency.

(From OE-Core rev: c5b11835b478871210fdd5c98db3b75f51fb80cd)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:04 +00:00
Robert P. J. Day 009d19a99d documentation-audit.sh: Add/fix checks for skipped lines.
Have the script skip:

  * "Recipe" lines.
  * Lines with 11 "=", not 12.

(From OE-Core rev: b9f14425a3f975a40a881b868b7bddcbd3c22580)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:42 +00:00
Darren Hart faa2a29a2d mkefidisk.sh: Add script to do an EFI install on the host
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.

(From OE-Core rev: 7225c6739f9f1e51741a42437692868165aa1dfe)

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-09-21 11:10:18 +01:00
Andrei Gherzan 42d91a7db4 Replace "echo -e" with "printf" to have the same behavior in dash or bash
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]

(From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 13:33:50 +01:00
Paul Eggleton 272cb74d70 Rename task to packagegroup
"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.

(From OE-Core rev: 424dcf7046e4ad09dcc664eb1992201195247fcf)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:52:55 +01:00
Robert Yang 09a7dc9a46 generate-manifest-2.7.py: replace os.popen with os.unlink
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]

(From OE-Core rev: bc9f7d7b7eda1c45ad1aaee469ebe28ee1c0c96b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 22:56:32 +01:00
Lianhao Lu f03d66bcc1 python: multilib header support.
Add intercept multilib header for pyconfig.h in python.
This is part of the bug fixing [YOCTO #2216].

(From OE-Core rev: 99591085186c465f2ddfaef08f419ec7584d4522)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 12:48:37 +01:00
Gary Thomas 4a0720fd32 python: fix packaging dependencies on minimal systems
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

(From OE-Core rev: c239564c768d0f305d8707103f4c59cf60431670)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26 12:13:05 +01:00
Darren Hart af193ae15a ddimage: Add script for writing images to boot media
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

(From OE-Core rev: 87e581bb7da9f1530d190cd023fcf892c8b858f5)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-22 19:18:24 +00:00
Richard Purdie 5494bfca38 scripts/contrib/python/generate-manifest-2.7.py: Catch up with staticdev fixes
(From OE-Core rev: 0030644f4890ca25894916189470317650ec8246)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-14 13:03:13 +00:00
Tom Zanussi 79af7541e2 documentation-audit.sh: remove COMMERCIAL_LICENSE warning
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.

(From OE-Core rev: 64e1db588bcb7b66b08097c0ea443bd4406422d3)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24 11:54:16 +00:00
Martin Jansa 8138eafa31 python: improve packaging
* 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

(From OE-Core rev: f17f6b28ed2f62250f8690617e9126a43c3a8020)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-07 14:05:39 +00:00
Scott Garman 82573491b6 documentation-audit.sh: script for auditing documentation build status
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.

(From OE-Core rev: d5e5023c67dacf78cd3b6e3593777b30e5a8f05d)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-31 22:03:26 +00:00
Nitin A Kamble b1dd5dd273 update python 2.7 manifest
script: add needed files into the python-core package

regenerate python-2.7-manifest.inc file with newer script

(From OE-Core rev: 12fe0f0b503f76995a975b1e87d5d652d7f6a24b)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-31 22:03:21 +00:00
Martin Jansa 53faafc5a4 python: update generate-manifest for 2.7 version and regenerate it
* it needs to be regenerated to actually package something

(From OE-Core rev: 0a4ac566987950815fc1ae8a0ec0496bd42a46ed)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-31 22:03:20 +00:00
Paul Eggleton 1dd5095ff7 scripts/contrib: add build time regression test script
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).

(From OE-Core rev: d866a36d7839247e8cf61512a0092d7f4f396d1a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-20 15:27:31 +01:00
Darren Hart fa4bcfdb73 bb-matrix: correct BB and PM number canonicalization
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.

(From OE-Core rev: b975de5ea76c5f8827fb48c0c3c29902872ad3d6)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-14 22:23:09 +01:00