Commit Graph

998 Commits

Author SHA1 Message Date
Martin Jansa dbb4c73233 test-dependencies.sh: Return non-zero return code when there was some failure detected
* this is useful when using from jenkins job where you don't want to read
  output just to dectect how bad it was
* add .log suffix to all files, so they can be easily downloaded from
  http servers without default mimetype set to something useful
* add recipes failed in step 1 to steps 2 and 3 to generate standalone
  logs for them

(From OE-Core rev: cef1d6deb5437edae56740436d8e77b8d941945a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29 09:04:22 +01:00
Martin Jansa 4e2656dc10 sstate-diff-machines.sh: Return non-zero return code when there was some failure detected
* add --analyze option, which is useful when using from jenkins job
  where you don't want to read output just to dectect how bad it was
* I was always using something like this inside jenkins job, but better
  to share it in original script

(From OE-Core rev: e73e1261879d9154d89cec35669ba22b499d8331)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29 09:04:22 +01:00
Paul Eggleton 7f6a92b1c5 oe-pkgdata-util: fix help text
This was copy/pasted from another script and not corrected.

(From OE-Core rev: 65b79e8ffffb20b7dd83213c72774745f18d978d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25 13:51:45 +01:00
Paul Eggleton 50264f799f list-packageconfig-flags: improve option parsing
* Use optparse instead of getopt (less code & automatic help)
* Change help text / output to use "recipe" instead of "package"
* Print something to indicate the script is still gathering information

Note that the long options have been renamed as appropriate.

(From OE-Core rev: 0ab4da8667cdf027d841e04ed5a35ddd45ad494a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25 13:51:45 +01:00
Paul Eggleton 1ed4c5d39e list-packageconfig-flags: filter out doc and defaultval varflags
These are generic flags and shouldn't be listed in the output of this
script.

(From OE-Core rev: 0f8b16c5ea78f1d48b45cef7a317f8a307c48ebe)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25 13:51:45 +01:00
Paul Eggleton 2b4e1506f0 scripts: consolidate code to find bitbake path
Several of these scripts were using duplicated code (and slightly
different methods) to find the path to bitbake and add its lib
subdirectory to the Python import path. Add some common code to do this
and change the scripts to use it.

Fixes [YOCTO #5076].

(From OE-Core rev: 0b5e94e168819134dcda0433c8ae893df4ab13ce)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25 13:51:45 +01:00
Darren Hart d340865284 mkefidisk.sh: Allow symlink for device
Allow the user to specify a symlink as the host device. If a link is
used, mkefidisk will now dereference it and use the link target when
looking for sysfs information.

(From OE-Core rev: 67bbfac55555c4e35ed9a84409aedb9b278b3de9)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24 19:54:11 +01:00
Corneliu Stoicescu e612e18e77 scripts/test-remote-image: add value check for rootfs fstype, change method name used.
As per change in the oeqa/targetcontrol.py's BaseTarget class, changing the use of get_image_fstype() to match_image_fstype().

Also because there is no longer a value check done by the target controller's match_image_fstype() method, we have to do one here.

+ one helper comment for the get_controller() method.

(From OE-Core rev: 6d8366bd6145bf3ad484ed9fe4b1ddb4c499f72b)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24 19:54:10 +01:00
Roy Li ee0f647a2a relocate_sdk: Skip to do relocation if the file size is less than 64 byte
When toolchain directory is changed to execute mode, some non-executable
files or empty files are sorted. This will lead to the below error:

	Extracting SDK...done
	Setting it up...Traceback (most recent call last):
	  File "..._SDK/relocate_sdk.py", line 208, in <module>
	    arch = get_arch()
	  File "..._SDK/relocate_sdk.py", line 39, in get_arch
	    ei_mag0,ei_mag1_3,ei_class = struct.unpack("<B3sB11x", e_ident)
	struct.error: unpack requires a string argument of length 16

To call get_arch and parse_elf_header, we should ensure the sorted file
is bigger than 64 byte.

(From OE-Core rev: 3b973f1c9c9ee3fbe64903036ad93eb9e928b185)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-17 08:59:21 +01:00
Corneliu Stoicescu 7c7a25c28a scripts/test-remote-image: Add script for running runtime tests on remotely built images
YB: #6254

Adding a new script that will fetch image files from a remote images repository.
These images will then be used for local runtime testing.

Use the '-h' option for more details on usage.

(From OE-Core rev: 5ebe9c57efb9715d58691d7fa75ccf06fb5d4b18)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13 12:52:21 +01:00
João Henrique Ferreira de Freitas 307d0e13c0 wic: check if BBLAYERS is valid before use
If wic is running as raw mode, it's better to check if BBLAYERS
is valid before inspect it.

No functional changes.

(From OE-Core rev: a3ee9cc7aebaecfa2223552a2c1865a9337de664)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:29:24 +01:00
João Henrique Ferreira de Freitas 567fec4b0d wic: default plugin type directory should be added only once
Fix 'for' statement identention so plugin type directory will be
added only once in layers_dirs list.

No functional changes.

(From OE-Core rev: ba88329115a3d6f964febcbf554af8391e1b84a1)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:29:24 +01:00
Matt Fleming 5f0634a270 generate-manifest-2.7.py: Add importlib
importlib isn't currently included in any of the python packages, so
create a new one for recipes that require it.

Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
(From OE-Core rev: b3dae96d9fdb4e26101f6f7edc6e65989375a5a2)

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:24:07 +01:00
Matt Fleming 0fbc24bce8 generate-manifest-3.3.py: Add importlib
importlib isn't currently included in any of the python packages, so
create a new one for recipes that require it.

Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
(From OE-Core rev: b17d2e1838f1f1c3310926a4f3eed375898c60f3)

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 09:26:05 +01:00
João Henrique Ferreira de Freitas 1ef8100d59 combo-layer: fix revlist taking into account file_filter
If file_filter is set, git format-patch takes account but git rev-list
does not. So revlist is going to get with wrong revisions. And last_revision
will be updated with wrong revision. The next time that user run
combo-layer it complain about applying patches.

So ensure that 'git rev-list' are using file_filter as 'git format-patch'.

(From OE-Core rev: c22e40900d8e33c2c884e714c11ddb771b86923f)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-01 14:29:30 +01:00
Richard Purdie cd7b437d4b devshell: Add interactive python shell
Being able to interact with the python context in the Bitbake task execution
environment has long been desireable. This patch introduces such a
mechanism. Executing "bitbake X -c devpyshell" will open a terminal connected
to a python interactive interpretor in the task context so for example you can
run commands like "d.getVar('WORKDIR')"

This version now includes readline support for command history and various other
bug fixes such as exiting cleanly compared to previous versions.

(From OE-Core rev: 36734f34fe6e4b91e293234687e63c02f5b3117e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-28 08:27:00 +01:00
Darren Hart 19c6c2e191 ddimage: Support Mac OS
Update the ddimage script to allow it to work on Mac OS too. The biggest
difference is sysfs vs diskutil and in the syntax of the stat command
between Mac OS and Linux, unfortunately. Workarounds using ls, cut, and
columns got really fragile really quickly. Relying on stat and switching
on uname seemed the more robust solution.

(From OE-Core rev: 8962fe11a0697348affb8a1ab95abca4995470a6)

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>
2014-05-28 08:19:30 +01:00
João Henrique Ferreira de Freitas 32a811f71b wic: add support to look in all layers and get plugins
Plugins are looked in 'scripts/lib/mic/plugins/[type]/' directory on all
BBLAYERS variable returned by bitbake environment. If found, it will
be load at runtime.

The user could create your own plugin and keep it inside its layers. For
now the path must be <layer-dir>/scripts/lib/mic/plugins/[type]/. Where
'type' could be 'imager' or 'source'.

(From OE-Core rev: bb6f5d7de1c7ce2680874a74949903db0f5bb91a)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-21 09:09:02 +01:00
João Henrique Ferreira de Freitas 8af57a6ca2 wic: add support to look in all layers and get .wks file
.wks file are looked in 'scripts/lib/image/canned-wks' directory on all
BBLAYERS variable returned by bitbake environment. If found, it will
be used.

The user could create your own .wks and keep it inside its layers. For
now the path must be <layer-dir>/scripts/lib/image/canned-wks.

(From OE-Core rev: 1f3e312211f277a1befd707a59a0c0a9bf6cbcbc)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-21 09:09:02 +01:00
Chen Qi cdaee026f5 runqemu-internal: add "console=ttyS0" to ramfs image kernel parameters
We need this kernel command parameter so that when we start a ramfs
image, we can actually get some output. Although we can make this
happen by specifying the 'bootparams' for the 'runqemu' command, it's
better to make this the default behaviour.

(From OE-Core rev: 3d202594bb92fe75cd70f81345e64c2179b52c32)

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>
2014-05-21 09:09:02 +01:00
João Henrique Ferreira de Freitas d6900a5fe7 wic: Extend indirect string connection to support image names and rootfs
The wic command-line param --rootfs-dir gets extended to support
multiple directories and image names. Each '--rootfs-dir' could be
connected using a special string. This special string is a image
name which gets expanded by bitbake to get 'IMAGE_ROOTFS' or
a rootfs-dir path pointing to rootfs directory. Like this:

  wic create ... --rootfs-dir rootfs1=core-image-minimal \
    --rootfs-dir rootfs2=core-image-minimal-dev

.wks:

  part / --source rootfs --rootfs-dir="rootfs1" --ondisk sda --fstype=ext3 \
    --label primary --align 1024

  part /standby --source rootfs --rootfs-dir="rootfs2" \
    --ondisk sda --fstype=ext3 --label secondary --align 1024

(From OE-Core rev: 58417093d7ce83c8a2f683a356fddc23aaee5e8e)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-13 19:35:11 +01:00
João Henrique Ferreira de Freitas bc10da01f3 wic: add find_artifact() to get a specific bitbake variable
This helper is used by source plugins to get specific bitbake
variable.

(From OE-Core rev: b8e51f73bc8e67ca60b7dd8d67091257aad62efd)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-13 19:35:11 +01:00
João Henrique Ferreira de Freitas 8387f1f000 wic: Move find_bitbake_env_line() to oe.misc
Move find_bitbake_env_line() since they're going to need to be
accessible from source plugins.

(From OE-Core rev: d881ec6136255fd0f4a8cf36f9ce148ade02c103)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-13 19:35:11 +01:00
Matthieu Crapet 37dcf148ba scripts/runqemu: avoid pipe with sed
Replace:
cat <file> | sed -e xxx
By:
sed -e xxx <file>

(From OE-Core rev: 173769374b1b37244d64767144398337001f1c6f)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-08 13:00:33 +01:00
Richard Purdie 7b78c364b7 cleanup-workdir: Fix crosssdk reference after addition of PN
(From OE-Core rev: 2f922357287129f7d216393531886ed1f3ce8185)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-05 09:05:42 +01:00
Paul Eggleton 9e7b0ca383 scripts/contrib/dialog-power-control: add a trivial power prompt script
If you want to do automated hardware testing but don't have a
controllable power strip this script can be useful so that you know when
you need to cycle the power.

(From OE-Core rev: f71e9fe7c31fa44f5185d9ab64813ba2af57ca2a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30 21:52:33 +01:00
Paul Eggleton d20eedb18d scripts/contrib/serdevtry: add script to handle transient serial terminals
When running automated tests (or just generally interacting with)
boards whose serial console devices are on the board itself and thus
disappear when powered down or practically disconnected, such as the
BeagleBone white, some terminal programs (e.g. picocom) will exit when
the device disappears and need to be restarted after the serial device
returns. This script handles this automatically for such terminal
programs.

(From OE-Core rev: 0537269df779532245eb2954e04fc26b3edfed85)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30 21:52:32 +01:00
Jacob Kroon b3c688cf1f sstate-cache-management: Minor cleanup of help text
(From OE-Core rev: a039ef9d116f0bab0bbb6d25867666b10057f2ad)

(From OE-Core rev: 2f22c098c3ada8c0952c7711f7a7f5b6421e6aea)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-29 17:20:11 +01:00
Otavio Salvador 1528e596d4 Globally replace 'base_contains' calls with 'bb.utils.contains'
The base_contains is kept as a compatibility method and we ought to
not use it in OE-Core so we can remove it from base metadata in
future.

(From meta-yocto rev: 5021839af713cb34bea5888981f2184104b6d35e)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25 17:20:28 +01:00
Saul Wold b882c0f995 report-error: Add posting in the public note
(From OE-Core rev: c2eb5cd1aa4632f7ee8c261414e599dcb6f40a8b)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24 17:55:15 +01:00
Stefan Stanacar e2661d7367 scripts/send-error-report: simple hack to use proxy from the enviroment
People behind a proxy couldn't send an error report to an upstream server,
this should fix the issue if they use a proxy that doesn't require authentication,
or one that uses basic http authentication and it's correctly exported in the enviroment.

(From OE-Core rev: a8511ee80246b4e2caa353b87f4b586f1539e6d4)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23 11:43:27 +01:00
Stefan Stanacar 0c4d56c86f scripts/send-error-report: use a real server as the default
Now that there is a public instance [1] of the error report web interface [2],
we should set it as the default.

[1] http://errors.yoctoproject.org/
[2] http://git.yoctoproject.org/cgit/cgit.cgi/error-report-web/

(From OE-Core rev: 90a955761db4724f0222527a129a3904d6d8aa6e)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-19 11:04:40 +01:00
Tom Zanussi bb20d3afbf yocto-bsp: Update templates to 3.14 kernel
Add 3.14 kernel support, and remove support for 3.4.

(From meta-yocto rev: 342dce5873a9f1844fd7ce52a1c2656dcfb43053)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-09 09:53:14 +01:00
Martin Jansa 025021ee5c test-dependencies.sh: Redirect stderr
* newer bitbake is printing some messages to stderr, we want to log
  them as well

(From OE-Core rev: f442c15aaeb8c0641093e92f2b832dfaa2d9a486)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05 23:24:01 +01:00
Martin Jansa d2c395a618 send-error-report: show response
* useful when debuging why it was refused by server

(From OE-Core rev: 0b8ff2231a36755a71d8bf8c7854364d69ef2df8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 11:53:51 +01:00
Ross Burton 1eae7d2503 gdk-pixbuf: pass GDK_PIXBUF_FATAL_LOADER where relevant
Pass GDK_PIXBUF_FATAL_LOADER to the sstate postinst and intercept so that any
problems are flagged as errors instead of being silently ignored.

(From OE-Core rev: 0a97b1571821848af11d8651c7145ed9592f9e31)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-01 23:39:14 +01:00
Richard Purdie 7254dfb642 Drop beagleboard, replaced by beaglebone
(From meta-yocto rev: b125761e5e31fc506f7b5b87308850cd573ab1b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-31 23:04:36 +01:00
Martin Jansa 3f0425dc12 sstate-cache-management: rm_by_stamps - discover all suffixes like remove_duplicated does
* instead of hard coding list of sstate enabled task use
  the same function as remove_duplicated to find them in
  sstate-cache directory

(From OE-Core rev: dfdb397db5865c3287cd9ccb5ea9a336eb77ca90)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa fec6bd763f sstate-cache-management: skip populate_lic archives when removing duplicates
* there are 2 issues

* all *gcc* recipes produce "duplicate" files and we cannot keep just the newest one:
  OE qemux86@ ~/build/oe-core $ find sstate-cache/ | grep gcc.*populate_lic
  sstate-cache/cd/sstate:gcc::4.8.2:r0::3:cd8d1a33b832662b624f5e4bd9f55154_populate_lic.tgz
  sstate-cache/cd/sstate:gcc::4.8.2:r0::3:cd8d1a33b832662b624f5e4bd9f55154_populate_lic.tgz.siginfo
  sstate-cache/d5/sstate:gcc::4.8.2:r0::3:d591af812395cc386e017fa2c8fa0722_populate_lic.tgz
  sstate-cache/d5/sstate:gcc::4.8.2:r0::3:d591af812395cc386e017fa2c8fa0722_populate_lic.tgz.siginfo
  sstate-cache/f7/sstate:gcc::4.8.2:r0::3:f74cfd4982fd7c349a5418f07297f955_populate_lic.tgz
  sstate-cache/f7/sstate:gcc::4.8.2:r0::3:f74cfd4982fd7c349a5418f07297f955_populate_lic.tgz.siginfo
  sstate-cache/74/sstate:gcc::4.8.2:r0::3:7489e4502cb446506b9829cda13c7630_populate_lic.tgz
  sstate-cache/74/sstate:gcc::4.8.2:r0::3:7489e4502cb446506b9829cda13c7630_populate_lic.tgz.siginfo

  OE qemux86@ ~/build/oe-core $ find tmp-eglibc/stamps/ | grep gcc.*populate_lic
  tmp-eglibc/stamps/i586-oe-linux/gcc-cross-initial/4.8.2-r0.do_populate_lic_setscene.cd8d1a33b832662b624f5e4bd9f55154
  tmp-eglibc/stamps/i586-oe-linux/libgcc/4.8.2-r0.do_populate_lic_setscene.f74cfd4982fd7c349a5418f07297f955
  tmp-eglibc/stamps/i586-oe-linux/gcc-cross/4.8.2-r0.do_populate_lic_setscene.d591af812395cc386e017fa2c8fa0722
  tmp-eglibc/stamps/i586-oe-linux/gcc-runtime/4.8.2-r0.do_populate_lic_setscene.7489e4502cb446506b9829cda13c7630

* the same for target and native versions of the same recipe:
  OE qemux86@ ~/build/oe-core $ find tmp-eglibc/stamps/ | grep opkg-utils.*populate_lic
  tmp-eglibc/stamps/x86_64-linux/opkg-utils-native/0.1.8+gitAUTOINC+c33b217016-r0.do_populate_lic_setscene.dd21a3c5444482ce90be4c9a33d806f1
  tmp-eglibc/stamps/i586-oe-linux/opkg-utils/0.1.8+gitAUTOINC+c33b217016-r0.do_populate_lic_setscene.8571422f9e311dc41bb6b21e71a09bc0

  OE qemux86@ ~/build/oe-core $ find sstate-cache/ | grep opkg-utils.*populate_lic
  sstate-cache/dd/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:dd21a3c5444482ce90be4c9a33d806f1_populate_lic.tgz.siginfo
  sstate-cache/dd/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:dd21a3c5444482ce90be4c9a33d806f1_populate_lic.tgz
  sstate-cache/85/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:8571422f9e311dc41bb6b21e71a09bc0_populate_lic.tgz.siginfo
  sstate-cache/85/sstate:opkg-utils::0.1.8+gitAUTOINC+c33b217016:r0::3:8571422f9e311dc41bb6b21e71a09bc0_populate_lic.tgz

* similar problem for .siginfo file of do_patch:
  OE qemux86@ ~/build/oe-core $ find sstate-cache/ | grep eglibc.*patch
  sstate-cache/99/sstate:eglibc::2.19:r0::3:99b7e1d688e4c6c659b458c9c57611df_patch.tgz.siginfo
  sstate-cache/11/sstate:eglibc::2.19:r0::3:11401ddd208a753fee17696b14dc1e52_patch.tgz.siginfo

  OE qemux86@ ~/build/oe-core $ find tmp-eglibc/stamps/  | grep /eglibc.*patch
  tmp-eglibc/stamps/i586-oe-linux/eglibc-initial/2.19-r0.do_patch.sigdata.99b7e1d688e4c6c659b458c9c57611df
  tmp-eglibc/stamps/i586-oe-linux/eglibc/2.19-r0.do_patch.sigdata.11401ddd208a753fee17696b14dc1e52

* maybe these should have ideally identical signatures, but before it's fixed lets
  just skip removing them

(From OE-Core rev: 9ae16469e70714acf7cb1e6c5238934a6b20d58a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa 07e632a26c sstate-cache-management: rm_by_stamps - remove .siginfo and .done files
* it's possible that corresponding .tgz files were already removed
  (e.g. with -d option and older version of this script) and this
  won't find orphaned .siginfo or .done files to remove
* add sort -u to count files found multiple times only once

(From OE-Core rev: 5a58cd2474ed96d6f58576203bedf8211d309c99)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
Martin Jansa 42b12dc544 sstate-cache-management: rm_by_stamps - include signatures of .sigdata. files
* there are .siginfo files in sstate-cache, but STAMPS_DIR calls them
  .sigdata, make sure that such signatures are kept, because some tasks
  like do_package, don't have _setscene or main task entry and are
  removed:

  stamps:
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_package.sigdata.cd6f625471ef1b20a9379e90519db6f1
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_package_write_ipk.f20fe66285219f23373fc64d5de1d412
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_package_write_ipk.sigdata.f20fe66285219f23373fc64d5de1d412
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_packagedata.sigdata.c55a3dbe90010c15aa3294753fbd402e
  tmp-eglibc/stamps/i586-oe-linux/busybox/1.22.1-r0.do_packagedata_setscene.c55a3dbe90010c15aa3294753fbd402e.qemux86
  sstate (we want to keep all in this case):
  sstate-cache/c5/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:c55a3dbe90010c15aa3294753fbd402e_packagedata.tgz
  sstate-cache/c5/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:c55a3dbe90010c15aa3294753fbd402e_packagedata.tgz.siginfo
  sstate-cache/cd/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:cd6f625471ef1b20a9379e90519db6f1_package.tgz
  sstate-cache/cd/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:cd6f625471ef1b20a9379e90519db6f1_package.tgz.siginfo
  sstate-cache/f2/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:f20fe66285219f23373fc64d5de1d412_package_write_ipk.tgz
  sstate-cache/f2/sstate:busybox:i586-oe-linux:1.22.1:r0:i586:3:f20fe66285219f23373fc64d5de1d412_package_write_ipk.tgz.siginfo

(From OE-Core rev: c2e5c0b6bdc432449ad1792176aa28667c3d34b9)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
João Henrique Ferreira de Freitas ba65fe654a wic: Extend --rootfs-dir to connect rootfs-dirs
The wic command-line param --rootfs-dir gets generalized to support
multiple directories. Each '--rootfs-dir' could be connected using a
special string, that should be present in .wks. I.e:

wic create ... --rootfs-dir rootfs1=/some/rootfs/dir \
  --rootfs-dir rootfs2=/some/other/rootfs/dir

  part / --source rootfs --rootfs-dir="rootfs1" --ondisk sda --fstype=ext3 \
    --label primary --align 1024

  part /standby --source rootfs --rootfs-dir="rootfs2" \
    --ondisk sda --fstype=ext3 --label secondary --align 1024

The user could use harded-code directory instead of connectors. Like this:

  wic create ... hard-coded-path.wks -r /some/rootfs/dir

  part / --source rootfs --ondisk sda --fstype=ext3 --label primary --align 1024

  part /standby --source rootfs --rootfs-dir=/some/rootfs/dir \
    --ondisk sda --fstype=ext3 --label secondary --align 1024

(From OE-Core rev: 719d093c40e4c259a4c97d6c8a5efb5aeef5fd38)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
João Henrique Ferreira de Freitas 3c00384884 wic: Report all ROOTFS_DIR artifacts
When a .wks has more than one ROOTFS_DIR it's better to report
all ROOTFS_DIR that was used to create the image.

(From OE-Core rev: a8762f3be215678a6806cabe49647083f42323a8)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
João Henrique Ferreira de Freitas 13afd35868 wic: Add option --rootfs-dir to --source
The '--rootfs-dir' option is optional and only takes efect is a
partition is set up like this:

  part /standby --source rootfs --rootfs-dir=<special rootfs> ...

So '--rootfs-dir' is used instead of bitbake ROOTFS_DIR variable or
'-r' param.

(From OE-Core rev: d486db593e6643bd10b8fe90257d547a9f341043)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
João Henrique Ferreira de Freitas cbee7cb5f8 wic: Use partition label to be part of rootfs filename
When a partition from .wks file is set up like this:

  part /standby --source rootfs --rootfs-dir=<special rootfs> ... --label \
    --label secondary

This means that 'rootfs' must use '<special rootfs>' as rootfs and
the default partition filename in /var/tmp/wic/build/ will be create
using the '--label' as part of the name. E.g:

  /var/tmp/wic/build/rootfs_secondary.ext3

(From OE-Core rev: c7efb3a21618ce3069811042279a0d898237ac0f)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
João Henrique Ferreira de Freitas 550e931734 wic: Add rootfs_dir argument to do_prepare_partition() method
The do_prepare_partition() method from RootfsPlugin class need
to know what will be the rootfs_dir. This makes sense when .wks
file has a partition set up like this:

  part /standby --source rootfs --rootfs-dir=<special rootfs> ...

then do_prepare_partition() will work with the correct rootfs.

(From OE-Core rev: 6042b097a8fc24f2b85eb9848fb007a3c6c090a9)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:35 +01:00
João Henrique Ferreira de Freitas 25d16c4934 wic: Hook up RootfsPlugin plugin
Remove the 'rootfs' case when internal call code is used and
replace to call the general-purpose plugin.

For now RootfsPluing class continues to invoke prepare_rootfs()
method from Wic_PartData. However RootfsPlugin could implement them.

(From OE-Core rev: 26cd93b79318cbfaebb971d1e728041904e015f1)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:34 +01:00
João Henrique Ferreira de Freitas 66bb67d0ff wic: Add RootfsPlugin
Implement RootfsPlugin class. The do_prepare_partition() method
is implemented using code in Wic_PartData class.

This class have 'rootfs' name, which is the name that should
be used in the --source parameters of the .wks partition commands.

(From OE-Core rev: 68dd66849bbaca6e3a0cf00beec0dba1c08e9070)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:34 +01:00
Tom Zanussi 7cb65151f8 wic: Fix bitbake_env_command for 'None' case
bitbake_env_command will choke if it isn't given an image, make sure
it does the right thing in that case.

(From OE-Core rev: a17f879cd5bc7401597ccee908801f8e3efa34c0)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:34 +01:00
Richard Purdie 2651e11cae scripts: Update after addtion of parameter to bitbake -S
(From OE-Core rev: fe2692c1ad1fcdbcdbc0ba419db8ff9ddb390fa7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27 09:42:06 +00:00