Commit Graph

1224 Commits

Author SHA1 Message Date
Corneliu Stoicescu a9710bcfef scripts/test-remote-image: use the scriptpath module
Use the scripts/lib/scriptpath module in order to standardize the adding of bitbake/lib and meta/lib to sys.path.

(From OE-Core rev: 32c5b31d8a22bb8ba49db8a5c797ad0f421e67a3)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:01 +01:00
Corneliu Stoicescu 03e2fb2532 scripts/oe-selftest: add command-line parsing and options
[YOCTO #6453]

(From OE-Core rev: d9291390d56cae9c9d0f5e44d5e7293260dad077)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart 172c5601d4 mkefidisk.sh: Reduce output and add verbose flag
Remove superfluous output from commands, add a -v verbose flag, and
cleanup output.

(From OE-Core rev: 0742bcd437362eb31b40e35f7331f191a1e070d0)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart 049100a9a7 mkefidisk.sh: Make the rootfs copy the last step
Copying the rootfs is the most time intensive task. Move it last so if
we are to encounter other errors, we do so quickly and error out.

(From OE-Core rev: 38a485aabfb57d42fa4663386c22aa9260d0a944)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart db162c6f56 mkefidisk.sh: Add die() and cleanup() routines
Currently the script will attempt to continue even after a fatal error.
Add a die() routine which will abort in the case of a fatal error and
call a cleanup() routine to unmount any images or devices and remove the
TMPDIR.

Move the variable assignment and directory creation earlier in the
script, making it more obvious what we need to clean up.

(From OE-Core rev: 40fe82fecf7a94b24893862ac17ee2bc749fc5e8)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart fd8a230e1a mkefidisk.sh: Improve logging
Add logging functions: error, warn, info, and success, using tput to add
color highlighting.

Use these routines throughout the script, replacing echo statements and
adding "|| error" in several places to eliminate silent failures. Add a
simple exit block which checks for issues encountered while running.

(From OE-Core rev: b5a3f6465a7fd8e821b81da053bf7e11535f1652)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart da682642ba mkefidisk.sh: Copy the EFI dir recursively
Rather than only copying the EFI/BOOT dir, copy the entire EFI dir
recursively. This allows for custom configurations to be enabled
implicitly with no extra work required.

(From OE-Core rev: f6f243bff4fa7c0e876a506a7013c86e0141556c)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart 88045c9db7 mkefidisk.sh: Add gummiboot support
Fixes [YOCTO 6295]

Add gummiboot support for images built using:

EFI_PROVIDER="gummiboot"

Add conditional configuration for GRUB and gummiboot. Provide some
messaging about which is being performed.

(From OE-Core rev: b0c86d8149dffd72d0dbd2451031f30953e36dc7)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart 7f595ea896 mkefidisk.sh: Add mount error checking
Provide reasonable feedabck if the mount commands fail.

(From OE-Core rev: 07cf8cfb843311d7f868c502d542af51f64d71bd)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Darren Hart 3213ab465c mkefidisk.sh: Use all caps for volume names
Avoid some mkfs warnings by using all caps in the volume names.

(From OE-Core rev: d80d730a5fa84d3a036d1fc8290620e90d5db460)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Corneliu Stoicescu d2c59d31d7 scripts/test-remote-image: add --skip-download option
Adding the possibility to skip the download phase completely.
This is useful for repeating runs with the same image types and similar configurations.

(From OE-Core rev: 3cc3f8a069b3d6d895afa6f192b36443b8328f40)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16 10:20:50 +01:00
Tom Zanussi eca8a56a4e wic: Error on zero-sized partitions
It doesn't make sense to create zero-sized partitions so assume user
error and notify the user they should be using a non-zero --size for
partitions that don't specify a --source.

(From OE-Core rev: 3231562c3c9f8173ddcc0812001aadf0988c8892)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16 10:20:48 +01:00
Tom Zanussi d08c2ce0d6 wic: Add kickstart reference to help system
Add a 'wic kickstart' help section to make it easy for users to access
the kickstart reference without having to go to an external website.

(From OE-Core rev: 136137ec1c124aee89d2120abded60a5cf0562b0)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16 10:20:48 +01:00
Tom Zanussi d8b65a55d2 wic: Add wic overview to help system
Add a general overview of wic to the help system as 'wic overview',
along with some introductory examples.

(From OE-Core rev: fa108caaa53878152e4856d32ce1ab7fe3802287)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16 10:20:48 +01:00
Tom Zanussi 83e5c09d2f wic: Add vfat support
Add vfat as a supported rootfs type (in addition to the current
ext2/3/4 and btrfs support).

vfat partitions can now be created using --source rootfs along with
--fstype=vfat, or without --source but specifying a --size.

(From OE-Core rev: d9efc110fd73822629b2a3326761f2256b9f23b0)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16 10:20:48 +01:00
Tom Zanussi f3986878ed wic: Error on parted non-zero error code
The current code uses msger.debug() to note errors, effectively
squelching them if --debug isn't used.  Apparently this is because it
can return non-zero for some loop device failures.  We don't care
about loop devices, and not paying attention to the error code
actually results in invalid images, so error out on parted failures as
we should be.

(From OE-Core rev: b1c68e5446080f0743f7f8a530f3b00f90c8717d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16 10:20:48 +01:00
Tom Zanussi d8ef35557e wic: Add general 'plugins' help topic
Add a category for help topics with an initial help topic discussing
source plugins.

(From OE-Core rev: a3dbe46dd28a6fd9e6c21f6bbb6a12578df9dff3)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:34 +01:00
Tom Zanussi f2ab619681 wic: Add dummy subcommand and usage strings
In order to reuse the existing subcommand infrastructure to display
various general-purpose help topics, add a dummy 'help_topic'
subcommand and usage string.  This allows users to invoke general help
topics by the natural form 'wic help <topic>' even though topic
doesn't correspond to a real subcommand.

(From OE-Core rev: d03f39a99058c2393d7b50ac4909bdaa84b09920)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:34 +01:00
Tom Zanussi b5dceca436 wic: Print error if a partition specifies an invalid --source
If a partition specified in a .wks file specifies a nonexistent
--source, print an error to that effect and exit.  The error text also
points the user to a command listing valid sources, and help on adding
a new source plugin.

(From OE-Core rev: 4dff6945d2606cebc0ab26e877c5d8c7b457e179)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:34 +01:00
Tom Zanussi 1908751b32 wic: Add help text for 'wic list source-plugins'
Add both short and long text for the new 'wic list source-plugins'
command.

(From OE-Core rev: 4f20acc10b18c7353bd73f253943372dacd957ca)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:34 +01:00
Tom Zanussi 40769b7cc0 wic: Add command to list available source plugins
Add a 'wic list source-plugins' command enabling users to get a list
of valid partition --sources.  This is useful not only for determining
sources to use in .wks partition statements, but also for making sense
of errors in .wks partition processing.

(From OE-Core rev: 37db9423e7872012fabde67e8858db5b512832f6)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-10 17:38:34 +01:00
Richard Purdie 359f08766f yocto-bsp: Drop GLIBC_ADDONS setting
This has been copied and pasted around and is not needed, simply drop it.
The defaults in the recipe work just fine.

(From meta-yocto rev: 037bce9a5f196df3cded9dfe6200188c1dd1d84a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-04 09:12:35 +01:00
Richard Purdie 05c47cc68e yocto-bsp: Update qemu inclusion lists
Update qemu tune definitions to match changes in main qemu machines.

[YOCTO #6482]

(From meta-yocto rev: 0d78ffd509c6caba6c74c6e75c485fb8d923cd31)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-04 09:12:35 +01:00
Chong Lu fd4eca071c scripts/contrib/verify-homepage.py: add a script to verify HOMEPAGE
Add a script to verify all the recipes' HOMEPAGE.

[YOCTO #5689]

(From OE-Core rev: 2dfb2ef06763cb6044dc1630875024e7310b3df4)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03 17:41:17 +01:00
Chen Qi 3bc357f703 runqemu-extract-sdk: normalize paths to improve output
Previously, we would have output like below from runqemu-extract-sdk.

    Creating directory /home/chenqi/poky/build-systemd/./nfs-root

Normalize paths for runqemu-extract-sdk so that we have output like below.

    Creating directory /home/chenqi/poky/build-systemd/nfs-root

(From OE-Core rev: c85f5ec502fecb1ff63f8e795a0da5fc92eca0c1)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03 17:41:16 +01:00
Robert Yang 1adedecc0d scripts: fix no newline at end of file
Add a '\n' to the last line of the file to fix:

No newline at end of file

(From meta-yocto rev: 58cc5c502bd0309feed65ab7836ed8fbaab6ced9)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03 13:57:12 +01:00
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
João Henrique Ferreira de Freitas 7f880e2980 wic: Add SD/MMC-Cards support to '--ondisk' param
The special case when wic is set up to use SD/MMC-Cards in place
of sdX disks is not handled properly.

Append 'p' to the rootdev when disk is SD/MMC-Cards fix this situation.

(From OE-Core rev: 3a95c4549f743aa47456c76e687a863c64c7a7f4)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27 09:42:06 +00:00
Paul Eggleton 7df7404d7b python3: sync module dependencies from 2.7
These have been added recently to 2.7 but were missing in the 3.3
script/inc file.

(From OE-Core rev: 4669afac1004a89e6b87ec46136ca3e7448700d4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:55 +00:00
Paul Eggleton dd1e12a585 generate-manifest-3.3.py: sync descriptions with 2.7 version
(From OE-Core rev: 081bc11c347d11d285f2948127bca81a285ada84)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:55 +00:00
Ricardo Neri 68acafd7dc runqemu: Add option for custom BIOS directory
Add support to specify a directory for custom BIOS, VGA BIOS and
keymaps as supported by qemu (-L option). Even though this can be
done through qemuparams, having this option provides better user
experience by not having to specify a long and cluttered path along
with other qemuparams that the user might want to specify.

This new options assumes first that the path provided is relative to
OECORE_NATIVE_SYSROOT and will check whether it exists before proceeding.
If not, it will treat the provided path as absolute. This provides
the user flexibility to use BIOS binaries generated inside or outside
the OE build environment.

(From OE-Core rev: d302f5683dd736ac4cd4b601a046d22000d41e68)

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:54 +00:00
Otavio Salvador 0e849f08d3 scripts/cleanup-workdir: Fix a comment typo
s/Romve/Remove/

(From OE-Core rev: 5f8924a8f76f314e3741dad6ab567452ae117114)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:51 +00:00
Paul Eggleton b3f83a2193 generate-manifest-2.7.py: sync with python-2.7-manifest.inc
Some changes were made earlier by me to SUMMARY values in
python-2.7-manifest.inc without changing the manifest script.

(From OE-Core rev: 45779941cec4f53a8ca7f8350402e5d9e866c916)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:50 +00:00
Paul Eggleton 6bffd21b82 generate-manifest-*.py: set SUMMARY instead of DESCRIPTION
Typically what's being set here is a short description, so it makes much
more sense to set SUMMARY.

(From OE-Core rev: d3941c88e2639637a8bc0b2c31c1d892d2ae40e3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:50 +00:00
Paul Eggleton 7425f3b117 python: add python-mmap to python-multiprocessing RDEPENDS
The multiprocessing module needs the mmap module. We got away with not
having this for the build appliance because python-mmap was added to
packagegroup-self-hosted, but this is the proper place to have it.

(From OE-Core rev: 1c031c627a362b3f18ffa2e9caeb6cfb299b9948)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 12:05:50 +00:00
Tom Zanussi f7fabf100c wic: Use pseudo for ext mkfs command
The switchover from populate-exfs.sh to mke2fs forgot to preserve
pseudo, add it back.

(From OE-Core rev: 032309928f931b32cf63a0ebf174de029ba17401)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-12 15:06:47 -07:00
João Henrique Ferreira de Freitas 2b4a00a65a wic: Use mke2fs to create the ext2/3/4 image
OE-core commit f3a95ca6886b55e5819b068bdbd2cceb882d91a6 removed the
populate-extfs.sh. So mke2fs should be used to create ext2/3/4 image.

(From OE-Core rev: 4dea928eef325364922b1e0cbabc2a581356e804)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-12 15:06:47 -07:00
Matthieu Crapet 9a928c5f12 oe-setup-builddir: small rework
Changes:
- drop useless subshell creation in test:
if ! (test -r "$BUILDDIR/conf/local.conf"); then$
- replace "source" builtin by "." (bashsism)
- fix indentation 4 spaces (drop some tabs too)
- fix return => exit  (return is not allowed in main)
- drop "sed -i" (doesn't exist in BSD sed)
- for homogeneity, always use [ ] (instead of test)
- replace old [ "x" = "x$VAR" ] by [ -z "$VAR" ]

(From OE-Core rev: 3a116577446f02bda0ef4e035360293ff73c9eef)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-12 06:04:53 -07:00
Gary Thomas 5662ab61b4 scripts/oe-setup-builddir: Keep track of TEMPLATECONF setting
Keeping track of the TEMPLATECONF variable in the build
tree will let this script produce the same output when
listing 'conf-notes.txt' every time the script is run,
regardless of whether or not TEMPLATECONF has been
provided by the user.

Note that the default value for TEMPLATECONF now comes from
an easily customizable file $OEROOT/.templateconf

(From OE-Core rev: 4474357faf2cbca250e99630d749776fbc80d44b)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11 08:14:01 -07:00
Ross Burton 1412dda560 scripts: add lnr (link relative)
lnr is a simple script to generate relative symlinks from absolute paths,
similar to "ln -r" but without requiring coreutils 8.16 (Ubuntu 12.04 and others
currently ship 8.13).

(From OE-Core rev: 6ae3b85eaffd1b0b6914422e8de7c1230723157d)

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>
2014-03-07 14:58:45 +00:00
Martin Jansa 8615d574a8 sstate-cache-management.sh: Don't use echo -n
* when debug is enabled it causes more confusion than what it's gaining
  without debug enabled

(From OE-Core rev: 53899da20cd439ae53974e507f3dd86cd6879455)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 15:50:20 +00:00
Martin Jansa 99183f9c45 sstate-cache-management.sh: Allow to remove old .siginfo and .done files for all tasks
* this allows to remove them even for tasks without sstate archives (e.g. rm_work, multilib_install, ..)
  whole list of tasks found in one of my sstate-cache directories:
  sstate:xxx_boostconfig.tgz ... 6
  sstate:xxx_bundle_initramfs.tgz ... 31
  sstate:xxx_compile.tgz ... 47894
  sstate:xxx_compile_kernelmodules.tgz ... 31
  sstate:xxx_compile_ptest_base.tgz ... 68
  sstate:xxx_configure.tgz ... 48247
  sstate:xxx_configure_ptest_base.tgz ... 68
  sstate:xxx_deploy.tgz ... 8
  sstate:xxx_evacuate_scripts.tgz ... 58
  sstate:xxx_fetch.tgz ... 7045
  sstate:xxx_generate.tgz ... 812
  sstate:xxx_generate_qt_config_file.tgz ... 576
  sstate:xxx_generate_toolchain_file.tgz ... 219
  sstate:xxx_install.tgz ... 48273
  sstate:xxx_install_locale.tgz ... 58
  sstate:xxx_install_ptest_base.tgz ... 68
  sstate:xxx_kernel_checkout.tgz ... 14
  sstate:xxx_kernel_configcheck.tgz ... 34
  sstate:xxx_kernel_configme.tgz ... 17
  sstate:xxx_kernel_link_vmlinux.tgz ... 30
  sstate:xxx_make_scripts.tgz ... 42
  sstate:xxx_multilib_install.tgz ... 29
  sstate:xxx_package.tgz ... 13848
  sstate:xxx_package_write_ipk.tgz ... 4615
  sstate:xxx_packagedata.tgz ... 4613
  sstate:xxx_pam_sanity.tgz ... 3
  sstate:xxx_patch.tgz ... 7883
  sstate:xxx_populate_adt.tgz ... 28
  sstate:xxx_populate_ide_support.tgz ... 33
  sstate:xxx_populate_lic.tgz ... 1718
  sstate:xxx_populate_sysroot.tgz ... 5094
  sstate:xxx_prepare_qmake_symlink.tgz ... 6
  sstate:xxx_prepsources.tgz ... 168
  sstate:xxx_rm_work.tgz ... 107630
  sstate:xxx_rm_work_all.tgz ... 52563
  sstate:xxx_rootfs.tgz ... 13
  sstate:xxx_sanitize_sources.tgz ... 8
  sstate:xxx_sizecheck.tgz ... 31
  sstate:xxx_strip.tgz ... 31
  sstate:xxx_uboot_mkimage.tgz ... 31
  sstate:xxx_unpack.tgz ... 7857
  sstate:xxx_unpack_extra.tgz ... 6
  sstate:xxx_validate_branches.tgz ... 14

* with this patches most of these files are removed as well
  Figuring out the sstate:xxx_compile ... (0 from 0 .tgz files for
  compile suffix will be removed or 42310 from 47795 when counting also
  .siginfo and .done files)

(From OE-Core rev: 66c6505e7ee0ea2efa13d1257982f721b26d83ae)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 15:50:19 +00:00
Martin Jansa 6bfa52afee sstate-cache-management: improve shown numbers of removed files
* deleted files were counting .siginfo and .done files, but total_files were counting only .tgz archives
  so it could show confusing output like:
  Figuring out the sstate:xxx_packagedata.tgz ... (21098 from 15162 files for packagedata suffix will be removed)
* split the counts and show both
* fix .sigdata sometimes used instead of .siginfo
* this will also show new "suffixes" which have only .siginfo files but
  no .tgz, e.g.:
  Figuring out the sstate:xxx_rm_work.tgz ... (0 from 0 .tgz files for
  rm_work suffix will be removed or 0 from 107630 when counting also
  .siginfo and .done files)
  because now we're storing siginfo files from all intermediate tasks,
  but they are not being removed by this script

(From OE-Core rev: ec881997c748ed8bfb3fc75797367ce3599bd5b4)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 15:50:19 +00:00
Saul Wold e47afff7d8 runqemu: Use readlink instead of realpath
(From OE-Core rev: 5a4b5c6b8ebd5f8d29888aafcd9608e03717bcd5)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-25 21:29:53 +00:00
Saul Wold 425dc69bc7 runqemu: Ensure ROOTFS path is absolute
There is a problem if a relative path is passed to the kernel for NFS usage
that it will not correctly find it, so ensure that the ROOTFS path is absolute.

[YOCTO #2807]

(From OE-Core rev: 5722be0ddda4ec3c96c06b425e5c7e0194326253)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-21 16:09:08 +00:00
Tom Zanussi bb0c26960d wic: Make exec_native_command() fail if a command isn't found
Because exec_cmd() return values can in certain cases be non-zero yet
non-fatal, we don't want to automatically make them fatal (though
there should at least be a warning in such cases, which this patch
also does); non-zero return values are definitely fatal however if
they mean that a native command wasn't found, so have
exec_native_cmd() check the return value of exec_cmd() for that case,
and bail out if so.

[YOCTO #5835]

(From OE-Core rev: 43ac6e3216c5d985d6f90a28e727e397df616267)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 14:28:13 +00:00
Tom Zanussi 8e894d111d wic: Fix exec_native_cmd() path
The path exported in exec_native_cmd() includes bogus 'PATH=' which
means the native paths for all but the first will be ignored.

(From OE-Core rev: e10c1102d958ffc6b521fb36c6bc51d896503218)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 14:28:13 +00:00
Saul Wold 39b98e49f2 runqemu-export-rootfs: Fix missing # in comment
(From OE-Core rev: 38785af0ca0b020574b32b9e3b21129469a35c94)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 12:04:44 +00:00
Koen Kooi d66b3d8b4e bitbake-prserv-tool: make help text show .conf suffix
'export' will accept any output filename, but 'import' needs a '.conf'
suffix to work. Otherwise you'll get:

koen@beast:/build/v2013.12$ bitbake-prserv-tool import x.txt
ERROR: Traceback (most recent call last):
  File "/build/v2013.12/sources/bitbake/lib/bb/cookerdata.py", line 162,
in wrapped
    return func(fn, *args)
  File "/build/v2013.12/sources/bitbake/lib/bb/cookerdata.py", line 172,
in parse_config_file
    return bb.parse.handle(fn, data, include)
  File "/build/v2013.12/sources/bitbake/lib/bb/parse/__init__.py", line
100, in handle
    raise ParseError("not a BitBake file", fn)
ParseError: ParseError in x.txt: not a BitBake file

ERROR: Unable to parse x.txt: ParseError in x.txt: not a BitBake file
Importing from file x.txt failed!

(From OE-Core rev: 704878ba025fda931be6accbb74cfdb14ffb55e9)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 15:37:17 +00:00
Scott Garman 46bc59d87d runqemu: add ability to skip using an existing tap device
Support the sitauation where a user could have another VM running
which uses tap devices. To prevent runqemu from trying to use the
same tap device, runqemu will skip using a tap device if it finds
a filename tapX.skip within its lock directory.

This fixes [YOCTO #5815]

(From OE-Core rev: 2e490f3b08176b20fe41c64cf17ecf3b5af61f39)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 15:37:17 +00:00
Andreea Proca da0a4c7f8d report-error.bbclass: new class to save build information when errors occur
Class is used to save data about errors after every task that failed.
Errors saved as json files in ERROR_REPORT_DIR (defaults to tmp/log/error-report).
To use this class one has to add INHERIT += "report-error" to local.conf.

scripts/send-error-report is a simple script that sends the json file
to a HTTP server that collects data (git://git.yoctoproject.org/error-report-web
is a Django web interface that can be used to receive and visualize
the error reports). The script will give you an URL where you can
find your report.

(From OE-Core rev: f186b4c7c6c975638e60b30a512d669dc6dc390f)

Signed-off-by: Andreea Proca <andreea.b.proca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14 12:30:20 +00:00
Cristian Iorga a2a20adbfd runqemu: enforce right CPU type for qemux86/x86-64
Set in accordance with qemu machines configs.

Fixes [YOCTO #5817].

(From OE-Core rev: 0e5cfef90ff762b33da6dc301dfc9cb3947c8a02)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13 17:53:30 +00:00
Laurentiu Palcu a150272845 scripts/postinst-intercepts: do not redirect errors to /dev/null
The redirection was necessary with the old bash code because the log
checking routine was searching for error strings in the log and abort
the build in case failures occured. With the new python code,
redirecting the intercept stderr is no longer necessary. This also makes
the intercept hooks easier to debug.

(From OE-Core rev: e2c3c59b26d84cd4052a953adafcd4d456264c26)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Stefan Stanacar ac656fb21b scripts/oe-selftest: return based on the test results
Regardless if the tests passed or not the script returned 0,
which isn't what one would expect.

(From OE-Core rev: c38f943c7fbb1fc077c875099dce8f73f41043b9)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-09 09:40:01 +00:00
Tom Zanussi df634f3b1e wic: Honor --size for --source partititions
Instead of simply creating partitions large enough to contain the
contents of a --source partition (and adding a pre-specified amount of
padding), use the --size used in the partition .wks statement.

If --size isn't used, or is smaller than the actual --source size,
retain the current behavior.

(From OE-Core rev: 23b6c5ea4d48cdf731e5202991961a0e4b10ff29)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-09 09:40:01 +00:00
Tom Zanussi 82f9c2bcff wic: Hook up --debug option
Hook up the existing --debug option to toggle the wic debug loglevel,
which is indispensible when things go wrong, and make it easy to use
from the command-line.

(From OE-Core rev: a5ece6f37656fa56b97fd8faf52917345238d015)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:36 +00:00
Tom Zanussi 94b805f1b4 wic: Hook up BootimgEFIPlugin and BootimgPcbiosPlugin plugins
Remove all the Wic_PartData and DirectImageCreator code now
implemented by the BootimgEFIPlugin and BootimgPcbiosPlugin plugins,
as well as all the special-cased boot_type code, significantly
cleaning up the code.

Replace the calling code with general-purpose plugin invocations, in
essence calling the appropriate implementations at run-time based on
the --source value in effect.

Change the directdisk.wks and mkefidisk.wks scripts to make use of the
new plugins.

(From OE-Core rev: 43558610a5793888ff2b18bd3a27c7ab558e5ad0)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:36 +00:00
Tom Zanussi e663d2f5c1 wic: Add BootimgEFIPlugin and BootimgPcbiosPlugin
Implement the BootimgPcbiosPlugin and BootimgEFIPlugin SourcePlugin
classes.  The configure/prepare_partition() methods are implemented
using code derived from similar code in the Wic_PartData class.

These classes have the corresponding names 'bootimg-pcbios' and
'bootimg-efi', which are the names that should be used in the --source
parameters of the .wks partition commands.

(From OE-Core rev: 6e147488b40f730e07f1e0f232083ed75388daa0)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:35 +00:00
Tom Zanussi 73ce09065f wic: Add SourcePlugin class
Define the SourcePlugin class, which is the class that should be
subclassed to create a 'source' plugin.

'Source' plugins provide a mechanism to customize various aspects of
the image generation process in wic, mainly the contents of
partitions.

The initial version of wic defined a --source param for partitions,
which was in the first revision hard-coded to two possible values:
rootfs and bootimg.

This patch essentially removes the hard-coded --bootimg param and
replaces it with a plugin system that maps the value specified as
--source to a particular 'source' plugin instead.

A 'source' plugin is created as a subclass of SourcePlugin and the
plugin file containing it is added to scriptsl/lib/mic/plugins/source/
to make the plugin implementation available to the wic implementation.

When the wic implementation needs to invoke a partition-specific
implementation, it looks for the plugin that has the same name as the
--source param given to that partition.  For example, if the partition
is set up like this:

  part /boot --source bootimg-pcbios   ...

then the methods defined as class members of the plugin having the
matching .name class member would be used.

To be more concrete, here's the plugin definition that would match a
'--source bootimg-pcbios' usage, along with an example method that
would be called by the wic implementation when it needed to invoke an
implementation-specific partition-preparation function:

  class BootimgPcbiosPlugin(SourcePlugin):
      name = 'bootimg-pcbios'

  @classmethod
      def do_prepare_partition(self, part, ...)

If the subclass itself doesn't implement a function, a 'default'
version in a superclass will be located and used, which is why all
plugins must be derived from SourcePlugin.

This scheme is extensible - adding more hooks is a simple matter of
adding more plugin methods to SourcePlugin and derived classes.  The
code that then needs to call the plugin methods the uses
plugin.get_source_plugin_methods() to find the method(s) needed by the
call; this is done by filling up a dict with keys containing the
methon names of interest - on success, these will be filled in with
the actual methods. fPlease see the implementation for examples and
details.

Note that a source plugin need not restrict itself to methods that
apply directly to partitions - methods can also be defined for higher
level processing such as at the 'disk' level.  The
get_default_source_plugin() of DirectImageCreator allows the default
source plugin to be retrieved; by default this is set to be the same
plugin used for the /boot partition, but that can be overridden by
specifying a different --source and therefore different plugin on the
'bootloader' line.  This isn't ideal, but it avoids forcing a new
high-level object to be defined for that purpose.

Note that the '--source rootfs' param remains as its current
hard-coded value, which is just the rootfs to be used to populate the
partition - by default, that's just the value of the bitbake
ROOTFS_DIR variable (or whatever was passed in using the -r param).
Note that this also could also be overridden by creating a source
plugin using a different name; at this point, unlike with bootimg,
there's been no need to do so.

(From OE-Core rev: 663833d8ecccb36ab42150bc5c9c00be79fa5b93)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:35 +00:00
Tom Zanussi 363488fc9a wic: Add wic-specific bootloader subclass
Add a new wic-specific bootloader subclass so we can add a --source
param to hang non-partition plugin off of.

By default, the bootloader gets the /boot partition source plugin, but
this can be overridden by the --source bootloader param if needed.

(From OE-Core rev: f90e4097c4e69d4f61c69923cb5d1ebb6b74d2ff)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:35 +00:00
Tom Zanussi 3cb93017e6 wic: Create and use new functions for getting bitbake variables
Add get_bitbake_var() and bitbake_env_lines() functions for use by
plugins, which will need access to them for customization.

(From OE-Core rev: f0bb47b0d7ab6520c105ce131844269172de3efd)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:35 +00:00
Tom Zanussi 534d9ba70a wic: Move some common items to oe.misc
Move a couple items into a more common location since they're going to
need to be accessible from source plugins.

(From OE-Core rev: 95ca523949e838850b5afa090ba16f91b8557c12)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04 12:57:35 +00:00
Khem Raj 31a48f4845 generate-manifest-3.3.py: Add script to generate python 3.3 manifests
Bases on python 2.7.x generator

Package collections/ in python-core

(From OE-Core rev: 468115573275d6c32924e56bff660b9f6d38de84)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 22:37:38 +00:00
Martin Jansa 358dd840c5 sstate-cache-management.sh: don't remove all packagedata sstate archives
* packagedata task was introduced in:
  commit 6107ee294afde395e39d084c33e8e94013c625a9
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Wed Jan 23 14:27:33 2013 +0000
  Subject: Split do_packagedata task from do_package
* rm_by_stamps wasn't using do_packagedata or do_packagedata_setscene
  stamp files to find which sstate archives to keep, so it was removing
  all of them

(From OE-Core rev: 66ef2e62a7b5fe36c718f56a8ea9d7f6fd77c393)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:34 +00:00
Martin Jansa 7010358190 sstate-cache-management.sh: Fix available architectures
* grep for AVAILTUNES isn't enough in cases where AVAILTUNE doesn't
  match exactly with TUNE_PKGARCH, e.g. AVAILTUNE "cortexa8thf-neon"
  and TUNE_PKGARCH "cortexa8t2hf-vfp-neon", instead of trying to find
  dynamically every available TUNE_PKGARCH (we have _a lot_ of them
  even with oe-core only), add parameter --extra-archs where user can
  define extra architectures he supports in given build
* Don't replace '-' with '_' for extra-archs, it does apply to MACHINE
  names and some AVAILTUNES, but e.g. cortexa8thf-neon shouldn't be
  converted to cortexa8thf_neon
* Add empty architecture for populate_lic sstate archives
* Add ${build_arch}_${arch} combinations for toolchain recipes (e.g.
  gcc-cross is using x86_64_i586

(From OE-Core rev: a27cc54fb2d0e59f3a800893c1848cb26a7c5335)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:34 +00:00
Martin Jansa 6d295ce0c5 sstate-cache-management.sh: Show total number of files when showing how many will be deleted
* it's good to see some the ratio of delted files until now it was
  showing only when all or none files were to be removed

(From OE-Core rev: 54e6e25f1a369fa6c21ce0f9db3479b1a481825f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:34 +00:00
Martin Jansa a397dec90b sstate-cache-management.sh: Fix rm_by_stamps() to work after SSTATE_SWSPEC change
* format of filenames for sstate archives was changed in:
  commit 6f823a23c5f1d0ffa0a27db1c1bc1907de788505
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Fri Dec 20 12:06:02 2013 +0000
  Subject: sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
* this one doesn't need special care for old sstate- names
  they will be removed automatically as they don't match with
  any checksum in rigth format from stamps directory

(From OE-Core rev: aa36f9c9b5abac58de899f98803d1c4375678044)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:33 +00:00
Martin Jansa a8a7e7b289 sstate-cache-management.sh: Fix remove_duplicated() to work after SSTATE_SWSPEC change
* format of filenames for sstate archives was changed in:
  commit 6f823a23c5f1d0ffa0a27db1c1bc1907de788505
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Fri Dec 20 12:06:02 2013 +0000
  Subject: sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
* remove_duplicated() wasn't able to find available architectures and
  duplicate files since this change
* add extra step to remove old sstate archives starting with sstate-
  (instead of sstate:)

(From OE-Core rev: ddb26341611c3dff41ea92a73d93ec01ae2865de)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:30:33 +00:00
Richard Purdie 731a7455ef scripts/cp-noerror: Avoid a race
Its possible something can delete $1 (since it may be empty) whilst cp-noerror
is starting. Add an exception to handle this issue since if this happens, we
shouldn't return an error.

(From OE-Core rev: 13061ed1e1f347589d6955d5cc50a50574b00218)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 11:23:45 +00:00
Stefan Stanacar 9532004b52 scripts/runqemu-internal: use -cpu core2duo for qemux86-64
Now that the tune for qemux86-64 changed to core2-64 we need to
tell the emulator to use a proper CPU model. With the default setting
of qemu64 we'll get things like:

root@qemux86-64:~# smart --help
traps: python[758] trap invalid opcode ip:7f2af01f6be7 sp:7fff49466ef0 error:0 in strop.so[7f2af01f5000+6000]
Illegal instruction

If the tune for qemux86 changes, that needs to be updated too.

(From OE-Core rev: e6ade33a6f52434e884dd97549b8ac731347d9ad)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 18:01:47 +00:00
Saul Wold 51cccb7fb9 combo-layer: Make directories only if they don't exisit yet
(From OE-Core rev: 24188967209bad291545909ddb89af35ab3f6021)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:37 +00:00
Jason Wessel 2fedfdca12 runqemu, runqemu-internal: Allow slirp for NFS and KVM use
The default slirp address for the NFS server is 10.0.2.2.  If not
using a tap interface this address must be used or the target system
cannot connect properly.  Also the ip=... kernel arguments need to be
set to dhcp when using slirp or the root NFS will not get setup
properly.

The call to cleanup() results in a routine which is not defined when
setting up the NFS because it is called before acquire() for the
locking of the tap interfaces, the solution being to simply not call
cleanup() that early.

When using slirp, kvm should not execute the vhost net checks because
the vhost net will not be configure or used.

(From OE-Core rev: 1ea04d87525f26c2cd32ba29c0f14c6226f60729)

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>
2014-01-28 00:52:36 +00:00
Jason Wessel 96b24e7bd5 runqemu-export-rootfs: update for unfs3
The unfs3 no longer has an rpc.mountd component. There is just a
single server for mountd and nfsd requests.  This means changing
the name of the server in the scripts that check for it.

[YOCTO #5639]

(From OE-Core rev: ea126a7d4a63e27755046ddd2eb0be079e20c334)

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>
2014-01-28 00:52:36 +00:00
Saul Wold 8dd861d471 runqemu: Use the newer unfs3 for serving user space nfs
This new version correctly handles the 64bit ext3 / ext4 issues we
were seeing with the older unfs-server which did not handle 64bit file
systems correctly, producing the duplicate cookies.

[YOCTO #5639]

(From OE-Core rev: 2a59d55f712bbd79b1edf3ccb90ccabf609c9f0d)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:35 +00:00
Darren Hart 5612e2652d yocto-bsp: Add core2 and corei7 tune choice to x86_64
Update the x86_64 architecture bsp creator to include choices for core2
and corei7 tune files.

(From meta-yocto rev: 06a16db32eae5b2280642643009fa653dc6f7839)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Paul Eggleton <paul.eggleton@intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Cc: Nitin Kamble <nitin.a.kamble@intel.com>
Cc: Mark Hatle <mark.hatle@windriver.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:51:58 +00:00
Darren Hart 279af938ed yocto-bsp: Update substrate to use the new x86 tune files
Update the substrates to use x86-base instead of ia32-base and core2-64
instead of x86-64. Update the core2 bit to include the DEFAULTTUNE to be
explicit.

(From meta-yocto rev: 3ccc079192ca147382231f0379bae1d04d47a89c)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Paul Eggleton <paul.eggleton@intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Cc: Nitin Kamble <nitin.a.kamble@intel.com>
Cc: Mark Hatle <mark.hatle@windriver.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:51:57 +00:00
Peter Kjellerstedt 7b171ed393 pybootchartgui: Add option -T to allways use the full time
When --full-time (or -T) is used, the graph allways shows the full
time regardless of which processes are currently shown. This is
especially useful in combinationm with the -s flag when outputting to
multiple files.

(From OE-Core rev: c6e88199ddf2c4ae243d42afc403d28ab56f00f0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-23 10:17:36 +00:00
Peter Kjellerstedt 57c93e3507 pybootchartgui: Adopt the width of the index in split output files
Add minimum width zero-padding to the index used in split output files
with -s and -o. I.e., if -s 200 is used, then the index will be
zero-padded to three digits width.

(From OE-Core rev: 45565b24651ab502ae49dc49261dc3ad5634191f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-23 10:17:33 +00:00
Peter Kjellerstedt 9d492a46fa pybootchartgui: Simplify adding processes to the trace
(From OE-Core rev: 5fa869007b5ba762bf5679197cf98b1d14a34a22)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-23 10:17:33 +00:00
Peter Kjellerstedt ea27845a67 pybootchartgui: Correct the legend
(From OE-Core rev: 1ca2e1a2ae3dc4d1e62a9daf25df588ec27a195a)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-23 10:17:33 +00:00
Peter Kjellerstedt 34a5d1e9cd pybootchartgui: Make the -s option work again
[YOCTO #5588]

(From OE-Core rev: 8245ceab3acd02618f24665ff5dc203c1e5cce1d)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-23 10:17:32 +00:00
Ross Burton da9b4fa15c wipe-sysroot: explain what is being deleted, and check for arguments
Print the directories that will be deleted, and add a rudimentary check for
arguments and display a message if arguments were passed.

[ YOCTO #5423 ]

(From OE-Core rev: e46b00a6810eaed27a24495cacb19e565de59fec)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 13:08:40 +00:00
Jackie Huang 6710c395f4 test-dependencies.sh: avoid showing misleading error messages
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

(From OE-Core rev: 2492bec586d407b1a89491aed7e81e80af997248)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 12:56:28 +00:00
Tom Zanussi 08a8c90e95 yocto-bsp: Add missing interfaces file for qemu BSP templates
The qemu BSPs were picking up the wrong interfaces file, resulting in
some erratic interface behavior seen with qemu-based BSPs - this fixes
the problem.

[YOCTO #5636]

(From meta-yocto rev: bbc3d56d6ec28b4cd92874fe4f98e1cd499415be)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 17:10:52 +00:00
Valentin Popa dd50c4d8a0 runqemu: Allow user to set -vga option with qemuparams
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.

(From OE-Core rev: 54a43397c48c974570e3eade55163eb766994a55)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:30 +00:00
Paul Eggleton 1a0a0eaeda scripts/contrib: Add graph-tool
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].

(From OE-Core rev: 0b76f034dd0320ec545229872be8095c44ddee73)

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-12-18 11:21:27 +00:00
Scott Garman fc0bb31aa7 runqemu: remove core-image-* whitelist
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].

(From OE-Core rev: 9f69e00200cdbd5ba2e46a54f33c29797816e43f)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09 18:01:46 +00:00
Mike Looijmans 2b898fe10b python: Add missing RDEPENDS for python-unittest
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.

(From OE-Core rev: 496adfe84ef05d031444988d41451a018133f5a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-06 13:54:23 +00:00
Stefan Stanacar f17a6937ab lib/oeqa/selftest/base, scripts/oe-selftest: fix wrong remove path and do a 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.

(From OE-Core rev: 6008745c56800e0f5f01a756be0701cebd9de4ae)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:24:43 +00:00
Stefan Stanacar 645dd61cd2 scripts/oe-selftest: script to run builds as unittest against bitbake or 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 ]

(From OE-Core rev: 41a4f8fb005328d3a631a9036ceb6dcf75754410)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton f4e91404f8 classes/package: record PKGSIZE as total file size in pkgdata
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]

(From OE-Core rev: 29615b36fca696822a715ece2afbe0bf9a43ed61)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton 4a75e83b29 classes/package: fix FILES_INFO serialisation in pkgdata
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].

(From OE-Core rev: ca86603607a69a17cc5540d69de0e242b33382d3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton 960e305d9a classes/image: write image manifest
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]

(From OE-Core rev: 2978d1f2617a33e2e3a77e249d73e998d79b4ec9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26 23:01:32 +00:00
Bastien JAUNY d60b4ff351 yocto-bsp: Add missing format specifier in bblayers error message
If the build environment is misconfigured (e.g. a bad path
for a layer in bblayers.conf) the yocto-bsp script crashes with a
standard python error, not very explicit.  This fixes the problem.

 Signed-off-by: Bastien JAUNY <bastien.jauny@gmail.com>

(From meta-yocto rev: 4a8e80b812eebdc1c9570b5d88aa0f3b34824b68)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-21 14:20:28 +00:00
Peter Kjellerstedt b0281b3a19 pybootchartgui: Add option --minutes to show time in minutes
(From OE-Core rev: b93eefd039a956b7d1d184592dd4342eb43f9341)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:56 +00:00
Peter Kjellerstedt 8c26891e1d pybootchartgui: Add a color for the package_write_* tasks
(From OE-Core rev: 2cec29b47a1de5da712cf4e2c6e25daf45d9f265)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:56 +00:00
Peter Kjellerstedt 85fca34bd9 pybootchartgui: Reorder the legend to match the task execution order
(From OE-Core rev: a12cf87471de40ce432d0176eabfb111de5310c6)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:56 +00:00
Peter Kjellerstedt d5f88f0f3b pybootchartgui: Make bars without a specified color white
Previously they were transparent.

(From OE-Core rev: 4ebdd8672cc5589a3e2f8d1b75cde7fae9fd6c99)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:56 +00:00
Peter Kjellerstedt 46c45853f0 pybootchartgui: Make "Show more" show all processes
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.

(From OE-Core rev: 5f1b8730f90099c0f73a6b08599990ee71e831b5)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:56 +00:00
Peter Kjellerstedt 65d43843b6 pybootchartgui: Draw a lot less ticks
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.

(From OE-Core rev: bd0bde6d04fd6cd9f8e7773d68da127144afa7de)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:07 +00:00
Peter Kjellerstedt 80cce56e82 pybootchartgui: Disable options that do not make sense
(From OE-Core rev: e1cde0c8b65a56657a5a5669890dad442223fef4)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:07 +00:00
Peter Kjellerstedt 730e350f04 pybootchartgui: No need to do a double list comprehension over files
(From OE-Core rev: bd00a768d88c22eabee90407684f1fb84139acfb)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:07 +00:00
Peter Kjellerstedt c10abc74d8 pybootchartgui: Avoid having overlapping process bars
(From OE-Core rev: 901afb35da814661ed20b2895f1d4055bf73fae2)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:07 +00:00
Peter Kjellerstedt 94caf6f6e5 pybootchartgui: Use correct header height
(From OE-Core rev: f7d1f49aa46a46ecb881386f0399aa7da288d805)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:06 +00:00
Peter Kjellerstedt 2020eb2e5f pybootchartgui: Correct the X offset for the chart
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.

(From OE-Core rev: 388daa9a8ce7f2216fb55ce65cab1d4060f6c41d)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:06 +00:00
Peter Kjellerstedt 1a539bb131 pybootchartgui: Set the initial state of "Show more" correctly
(From OE-Core rev: 55fa7f768bb7618f2daaf43f147609c76e077b8b)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:06 +00:00
Peter Kjellerstedt cacd502cd3 pybootchartgui: Make the horizontal scaling stay within bounds
(From OE-Core rev: 50c2c3435915ef1ecbde395c71c5c9581c83fb2e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:06 +00:00
Peter Kjellerstedt d0e513d437 pybootchartgui: Import pybootchartgui 0.14.5
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.

(From OE-Core rev: 6f1568e54a7808b2ab568618fc5bb244249579f1)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18 12:44:06 +00:00
Paul Eggleton 6f54fa277d scripts/create-recipe: fix handling of --help
If --help is specified as the first argument, show the standard help
text instead of trying to process it as a URL.

(From OE-Core rev: abb139b10c3f431bcebb1847621f97d7ec6249ce)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-14 13:39:48 +00:00
Tom Zanussi 2342fdc7b4 wic: Remove selinux_check()
This seems to be an obsolete check - we don't have any problems with
image creation under selinux, so remove it.

(From OE-Core rev: 12e81eceab9e0a483765566ad3791b14718195b5)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30 13:39:09 +00:00
Paul Eggleton d69931da48 scripts/oe-pkgdata-util: fix global name 'debug' is not defined
This global variable is no longer present, so pass in the value
specified via the command line.

(From OE-Core rev: fa90f92e52330a9bf5836c0832412af0927b19a9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 15:24:07 +00:00
Darren Hart 91c00fb70e scripts: Add ksize.py and dirsize.py
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.

(From OE-Core rev: 26099eb8ac855aa08e5e1a307affe42fe5f43859)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:39 +00:00
Paul Eggleton 6ce287937e scripts/oe-pkgdata-util: add ability to find a recipe from a target package
Add a "lookup-recipe" command to show which recipe produced a particular
package.

(From OE-Core rev: 4ab561ac3df105b4b6487271b6ccc29445518d52)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:35 +00:00
Paul Eggleton 948a714767 scripts/oe-pkgdata-util: add ability to look up runtime package names
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).

(From OE-Core rev: d923846d91ae307372f1e48483e86807feeeb09d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:34 +00:00
Paul Eggleton 48755f1a4a scripts/oe-pkgdata-util: add ability to search for a target path
Add ability to search for a target path in produced packages, in order
to find which package provides a specific file.

(From OE-Core rev: 0824f2f5cf4e05f82b6986ce6fb22fa1392b7776)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:34 +00:00
Paul Eggleton 4ec1f8c018 scripts/oe-pkgdata-util: check path arguments to ensure they exist
Show an error if the specified paths don't exist.

(From OE-Core rev: eff2690f7976664e6257c1c19c89feea9152eb9e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:34 +00:00
Paul Eggleton 8b42409dca scripts/oe-pkgdata-util: improve help text and command line parsing
* 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

(From OE-Core rev: feb317513fff638ad7abdba8ab34b8413f0ab055)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:33 +00:00
Paul Eggleton 9ce903bd3c scripts/oe-pkgdata-util: remove remnants of former pkgdata structure
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.

(From OE-Core rev: 8b9ee57afbbcf633cba66e4b6e8ab7339ad6d391)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-29 10:41:33 +00:00
Konrad Scherer 39356f622d relocate_sdk.py: Allow script to work with Python 2.4 and 3.
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.

(From OE-Core rev: 1e2ec5f576f167673d7980737826987fefdc74a9)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-26 15:59:18 +01:00
Chen Qi 7a2de0091d runqemu-extract-sdk: add --numeric-owner option to tar command
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]

(From OE-Core rev: acce6ff1a77cfd29e3868faa89b120becb58bbbf)

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-10-26 15:59:17 +01:00
Paul Eggleton f995febd2e buildhistory-diff: add ability to report version changes
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].

(From OE-Core rev: b7de1eaac9eed559b2d68058f5de67de74a6cb58)

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-10-26 15:59:13 +01:00
Tom Zanussi cf66584b65 wic: Update and generalize pseudo setup for rootfs generation
Remove unnecessary pseudo exports i.e. PSEUDO_DISABLED and move the
setup to the top-level prepare_rootfs().

(From OE-Core rev: 4bf11cd7d7301da664c098c8a0ae9c0294a6f423)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:12 +01:00
Tom Zanussi 8ac545481f wic: Make find_binary_path() more user-friendly
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.

(From OE-Core rev: 0d9eef0eaa267500e8eedab8b72ddf24eb0516db)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:12 +01:00
Tom Zanussi cb0df94a4e wic: Remove binary dependencies
Current functionality doesn't make use of kpartx, mount, or unmount,
and we use native mkswap, so remove the binary checks for those.

(From OE-Core rev: 76293d2d6bbdeacd7b34f39f26fb97c3d7f9496f)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:12 +01:00
Tom Zanussi 51fdae503a wic: Remove rpmmisc call from livecd
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.

(From OE-Core rev: e10ae516cfc10900ed12e84c743e3a7127372135)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:12 +01:00
Tom Zanussi f2ca93e61e wic: Remove rpm and grabber dependencies from BaseImageCreator
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

(From OE-Core rev: a1e24c4a5f5771b7ad35e53ce96c6d82212e4d7e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:11 +01:00
Tom Zanussi 39c9af56ed wic: remove rpm warning code from BackendPlugin
We don't currently use rpm functionality, so we don't need to silence
rpm warnings.

(From OE-Core rev: dd3cc03d4fa3347f8ef2db23d8ff98bdbdb73baa)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:11 +01:00
Tom Zanussi 2a8399988e wic: Remove dependency on myurlgrab module
mylrlgrab is in grabber, which imports rpm.  For current
functionality, we don't need to grab urls or import rpm, so remove the
dependency.

(From OE-Core rev: 429ecc2afa499df35a1ae9da6f92b88c6f2d8d11)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:11 +01:00
Tom Zanussi c4a4fc524c wic: Remove dependency on rpmmisc
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.

(From OE-Core rev: 2d59b6eeb418cf23eef3e32b43354b4ab16a40b9)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:10 +01:00
Tom Zanussi db034f07bf wic: eliminate module checks
We're removing all external dependencies including rpm and urlgrabber,
so we don't need this check.

(From OE-Core rev: 429c0d72b9b8bfed34832e283be92996e074b9ac)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:10 +01:00
Tom Zanussi ce2dabd393 wic: Remove dependency on rt_util module
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.

(From OE-Core rev: 3103f0cb908eced7b751128c2bba898d12017c80)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23 07:14:10 +01:00
Tom Zanussi 505114c13d wic: add pseudo to the populate-extfs step
Without this, files in the generated filesystem pick up the wrong
ownership.

(From OE-Core rev: 24a6b1324965080fef6c363edcb37768090eebea)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 16:03:39 +01:00
Tom Zanussi 67378fbcbe wic: Initialize return values in find_artifacts()
If one of these isn't found, it won't be initialized and will throw an
UnboundLocalError.

(From OE-Core rev: ce6c3ec0e5f4822e85b8f957e9e31fa9de438c55)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 15:58:16 +01:00
Tom Zanussi e22efb497a wic: Check for the existence/correctness of build artifacts
If a user uses the -e option and specifies a machine that hasn't been
built or uses the wrong .wks script for the build artifacts pointed to
by the current machine, we should point that out for obvious cases.

(From OE-Core rev: a5b9ccadc0603c70c65f74fa386995c585a951db)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 15:58:16 +01:00
Darren Hart 024bd68f64 wic: Check for external modules
Since eight unique files import rpm, perform a check at the top level
for the existence of the rpm module print a sensible error message if it
is not. This may be able to be removed if some of the core rpm
dependencies are removed from the mic libs.

Also check for urlgrabber.

This avoids a bracktrace in the event the modules are not installed
which can be very off-putting to would-be users.

(From OE-Core rev: b11bfadba20c1f39a63e396e605a8316c2ed2a94)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Darren Hart c7b0165088 wic: Force lba off for FAT16 partitions
If fat16 is specified to the mkpart parted command, parted will
default to setting the lba flag which causes certain EFI firmware
to fail to detect the filesystem. lba shouldn't be necessary for
FAT16 filesystems anyway, explicitly disable it.

(From OE-Core rev: 30442d432e203e655b7d40b93f7307f475de1614)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Tom Zanussi 71454f961e wic: check passed-in build artifact directories
Make sure they exist - complain if they don't.

(From OE-Core rev: 24a585e3fd0ea0166991a6aa834bba15bcd8295d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Tom Zanussi 040bd3d6d3 wic: check for build artifacts
wic needs to be given one form of build artifacts or another -
complain if the user doesn't do that.

(From OE-Core rev: 9116a17efd42447f276000927d0c2ea63776865b)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01:00
Tom Zanussi 104166c804 yocto-kernel: Use variable-substituted BBLAYERS
The current find_bblayers() code finds and parses the BBLAYERS
variable manually, and therefore doesn't handle variable substitution,
which causes problems if used.

This change makes find_bblayers() use the variable-substituted
BBLAYERS instead.

Fixes [YOCTO #5106]

(From meta-yocto rev: 1629ac04e909143dc2c275c256094cb44c6cc43c)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 16:07:46 +01:00
Tom Zanussi 75c143a7ae wic: Add OpenEmbedded-specific implementation
Reuses the mic/livecd infrastructure but heavily subclasses and
modifies it to adapt to the special needs of building images from
existing OpenEmbedded build artifacts.

In addition to the OE-specific mic objects and modifications to the
underlying infrastructure, this adds a mechanism to allow OE kickstart
files to be 'canned' and made available to users via the 'wic list
images' command.

Two initial OE kickstart files have been added as canned .wks files:
directdisk, which implements the same thing as the images created by
directdisk.bbclass, and mkefidisk, which can essentially be used as a
replacement for mkefidisk.sh.  Of course, since creation of these
images are now driven by .wks files rather than being hard-coded into
class files or scripts, they can be easily modified to generate
different variations on those images.  They also don't require root
priveleges, since they don't use mount to create the images.  They
don't however write to media like mkefidisk.sh does, but rather create
images that can be written onto media.

(From OE-Core rev: f87acc5e59d3c2c39ff171b5557977dab4c8f4a6)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-01 22:56:03 +01:00
Tom Zanussi 9fc88f96d4 wic: Add mic w/pykickstart
This is the starting point for the implemention described in [YOCTO
3847] which came to the conclusion that it would make sense to use
kickstart syntax to implement image creation in OpenEmbedded.  I
subsequently realized that there was an existing tool that already
implemented image creation using kickstart syntax, the Tizen/Meego mic
tool.  As such, it made sense to use that as a starting point - this
commit essentially just copies the relevant Python code from the MIC
tool to the scripts/lib dir, where it can be accessed by the
previously created wic tool.

Most of this will be removed or renamed by later commits, since we're
initially focusing on partitioning only.  Care should be taken so that
we can easily add back any additional functionality should we decide
later to expand the tool, though (we may also want to contribute our
local changes to the mic tool to the Tizen project if it makes sense,
and therefore should avoid gratuitous changes to the original code if
possible).

Added the /mic subdir from Tizen mic repo as a starting point:

 git clone git://review.tizen.org/tools/mic.git

 For reference, the top commit:

 commit 20164175ddc234a17b8a12c33d04b012347b1530
 Author: Gui Chen <gui.chen@intel.com>
 Date:   Sun Jun 30 22:32:16 2013 -0400

    bump up to 0.19.2

Also added the /plugins subdir, moved to under the /mic subdir (to
match the default plugin_dir location in mic.conf.in, which was
renamed to yocto-image.conf (moved and renamed by later patches) and
put into /scripts.

(From OE-Core rev: 31f0360f1fd4ebc9dfcaed42d1c50d2448b4632e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-01 22:56:03 +01:00
Tom Zanussi 53a1d9a788 wic: Initial code for wic (OpenEmbedded Image Creator)
Initial implementation of the 'wic' command.

The 'wic' command generates partitioned images from existing
OpenEmbedded build artifacts.  Image generation is driven by
partitioning commands contained in an 'Openembedded kickstart' (.wks)
file specified either directly on the command-line or as one of a
selection of canned .wks files (see 'wic list images').  When applied
to a given set of build artifacts, the result is an image or set of
images that can be directly written onto media and used on a
particular system.

'wic' is based loosely on the 'mic' (Meego Image Creator) framework,
but heavily modified to make direct use of OpenEmbedded build
artifacts instead of package installation and configuration, things
already incorporated int the OE artifacts.

The name 'wic' comes from 'oeic' with the 'oe' diphthong promoted to
the letter 'w', because 'oeic' is impossible to remember or pronounce.

This covers the mechanics of invoking and providing help for the
command and sub-commands; it contains hooks for future commits to
connect with the actual functionality, once implemented.

Help is integrated into the 'wic' command - see that for details on
usage.

(From OE-Core rev: 95455ae4251e06d66e60945092b784d2d9ef165c)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-01 22:56:03 +01:00
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
Richard Purdie b8819b02dc runqemu: Use correct kvm CPU options for qemux86* with kvm
The existing -cpu host option caused kernel panics when people attempted to use
the kvm option. After research and discussion, the best options appear to
be the kvm32/kvm64 cpu types so lets use these instead. These resolve
the kernel issues for me.

[YOCTO #3908]

(From OE-Core rev: bdc6d3be6ffa4ed358153f9c9332b632324f5833)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 16:37:56 +01:00
Laurentiu Palcu 5b5e1b9008 relocate_sdk.py: make it work also with python 3
Strings in Python 3, by default, are assumed to contain unicode
characters. In previous versions of python (<3), unicode strings are
explicitly declared with u"abc". If not, than they're automatically
converted to bytes. This doesn't happen anymore in Python 3.

Since we're dealing with binary files, opened in byte mode, make sure
that we explicitly convert all strings to bytes to make both python 2
and 3 happy.

Other changes:
 * add a safety check to make sure relocation did not change the file
   size;
 * a couple of cosmetic changes (wrap long lines so that we don't have
   to scroll to reach the end of them);

(From OE-Core rev: 175f20e27eadc79df16109961f5ce6232705e96f)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26 16:37:55 +01:00
Paul Eggleton f79b21a57b scripts/runqemu: write temp file into correct location
We want the temporary file to be written in /tmp not the current
directory.

(From OE-Core rev: fcb40c11998030eb5fce89ce5a9ca567870aafa9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 17:57:03 +01:00
Tom Zanussi 0fc8317c63 yocto-bsp: add 3.10/remove 3.8 kernel from templates
For Yocto 1.5, 3.10 is the preferred kernel and 3.8 is obsolete.

This also removes any mention of emgd from the templates - we want to
discourage users from using it - it will be obsolete soon in any case.

Fixes [YOCTO #5107]

(From meta-yocto rev: 4dd4bf6ac2dcc7652ec8f807df02298546bdb41b)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 12:01:47 +01:00
Laurentiu Palcu 405be52d26 runqemu: set qemuarm memory size back to 128MB
The following commit, 6ccd4d6, increased the RAM size for qemu machines
to 256MB due to some smart sanity tests failing on autobuilder because
more memory was needed.

Unfortunately this leads to various, potentially dangerous, issues like
the one observed during sudoku-savant project compilation:

collect: relinking
collect2: error: '_ZNK6sudoku5ClearINS_6SquareEEclERS1_' was assigned to
'board.rpo', but was not defined during recompilation, or vice versa
board.o:(.rodata+0x8): undefined reference to
`sudoku::Clear<sudoku::Square>::operator()(sudoku::Square&) const'
board.o:(.rodata+0x20): undefined reference to
`sudoku::Clear<sudoku::Sequence>::operator()(sudoku::Sequence&) const'
board.o:(.rodata+0x34): undefined reference to `typeinfo for
sudoku::Action<sudoku::Sequence>'
...AND THE LIST CONTINUES...
collect2: error: ld returned 1 exit status
make: *** [sudoku-savant] Error 1

After some tests, I found that the maximum amount of memory needed for
sudoku to compile properly is 146MB(!?!).

My attempts to create a simpler test case (using templates), in order to
replicate and isolate the issue failed. All the tests compiled just
fine.

So, my guess is that this problem is certainly memory related but the
cause might be hidden in any of the following: qemu versatile hw model,
in the kernel or, highly unlikely but not impossible, the toolchain
itself. The reason I don't really think the cause is in the toolchain is
the fact that the compilation completes just fine for 128MB on qemuarm but
also on other qemu machines (with 256MB of memory).

Since this issue might need lots of time to have a proper fix, I'll revert back
to using 128MB for qemuarm for the time being.

[YOCTO #5133]

(From OE-Core rev: 06605bd6ddd4d6a788e1a107dcf15dde1027c094)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:41 +01:00
Paul Eggleton d652987612 classes/imagetest-qemu: remove old image testing class
This has now been superseded by testimage.

(From OE-Core rev: d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:41 +01:00
Ross Burton 77ae0d905a wipe-sysroot: delete pkgdata stamps
The pkgdata stamps now need to be wiped away if the sysroot is destroyed.

(From OE-Core rev: e6ef8399cd8e97b9cd59855e11f1792445f0e65b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:32 +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
Richard Purdie 8ebe7be3d9 bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.

This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.

With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.

The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.

It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.

(From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +01:00
Paul Eggleton 6670be71f7 bitbake.conf: include machine name in DEPLOY_DIR_IMAGE
This allows a clean seperation between image outputs from different
machines, and makes it possible to have convenience symlinks to make
the output ready to deploy.

This did require some surgery in runqemu; if explicit paths to the image
and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined
from bitbake or set in the environment. However the script does try to
avoid requiring it unless it really is needed. Corresponding changes
were made in the automated testing code as well.

Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net>

(From OE-Core rev: 7e90261aec61f79680b5eaeaf5b18c7b795412a4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +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
Ross Burton 40232ed397 yocto-bsp: conditionalise mesa-swrast on opengl in templates
As per the similar commit in oe-core on the qemu machines, the templates should
respect the opengl DISTRO_FEATURE when adding mesa-driver-swrast to new qemu
machines.

(From meta-yocto rev: 8d42ea2b2566913642c759e48ffe1f5f5166c510)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 12:29:06 +01:00
Richard Purdie bd3164b9e6 image/populate_sdk: Ensure symlinks in target sysroot are relative
In the target sysroot of an SDK we can have target system absolute links
which don't make sense. This adds a script which fixes them up to become relative
paths instead.

[YOCTO #5020]

(From OE-Core rev: 57d6bdcad55c119e9ab8089d23d462436a0e4440)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11 11:05:05 +01:00
Saul Wold 0ca5d1fb38 yocto-bsp: remove apm as a default MACHINE_FEATURE
APM is not only obsolete, but also requires a kernel config enabled, which is not enabled by default

[YOCTO #5121]

(From meta-yocto rev: e25c43661f27b27e61aa7fae868237c1c60e3e25)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-09 16:28:47 +01:00
Mihai Prica 12d003a800 scripts/runqemu: Fix MACHINE regex
When runqemu tries to determine the MACHINE variable from a
kernel or vmdk filename that doesn't contain any known machine
name, the variable gets set to the filename. It should remain
unset and cause an error.

[YOCTO #2890]

(From OE-Core rev: 22c0668d9e0a22c095d78bab7b45ef4f803dd0d1)

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-04 14:17:29 +01:00
Paul Eggleton 6ccd4d6a9d runqemu: set memory size to 256M for most qemu machines
Set memory size to 256M for qemuarm, qemux86, qemux86-64, qemumips,
qemumips64, and qemuppc.

This allows the smart automated tests to run on machines with a GUI
environment (such as Sato) running at the same time, for which 128M is
too limiting. Setting this in runqemu allows users manually using
runqemu to avoid the same out-of-memory issues under similar conditions
using smart, on-target compilation or other uses.

Fixes [YOCTO #5045].

(From OE-Core rev: fe5dfdece98692f8fa731c8d11c907a272266ea5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-02 18:02:59 +01:00
Ross Burton 212f512e46 wipe-sysroot: fix removals
The previous changes were totally broken as quoting globs doesn't work.  Remove
the quotes so the rm commands actually delete the stamps.

(From OE-Core rev: 5eca43debd7fbc861d41f4e260b37282915bd053)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-02 18:02:59 +01:00
Peter A. Bigot 118d74e28c oe-setup-rpmrepo: add native sysroot so nativepython can be found by env
This avoids the following new behavior resulting from the create_wrapper
fixes:

  llc[11]$ ../poky/scripts/oe-setup-rpmrepo
  /usr/bin/env: nativepython: No such file or directory

(From OE-Core rev: ce37ef05c14ba28773823d1f14f629c37c76d827)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 18:06:31 +01:00
Chen Qi b2a0e3ad91 runqemu-ifdown: clean up the remaining iptables rules
The iptables rules for the tap interface are added by runqemu-ifup
everytime we use runqemu to start a qemu target. But it's not cleaned
up when runqemu exits.

This patch cleans up the remaining iptables rules for the tap interface
in runqemu-ifdown.

[YOCTO #5047]

(From OE-Core rev: ef38a0aed35357d035ca587162158cd2f55b958f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:47 +01:00
Chen Qi 5bffc4ff4d runqemu-internal: provide more info if a preconfigured tap is used
We should provide the user more information if a preconfigured tap
is used. This is because the user might have manually set up the tap
interface to be used by other qemu binaries.

So at a minimum, we should let the user know how to make runqemu skip
that tap interface.

[YOCTO #5047]

(From OE-Core rev: ec08d92641cc51c567cc3745937b1839d3faa095)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:47 +01:00
Chen Qi a78bf1ce7b runqemu-internal: don't bring down preconfigured tap interface
runqemu-ifup and runqemu-ifdown should be pairs. If we're using a
preconfigured tap interface, the runqemu-ifdown should not be invoked
to bring it down.

(From OE-Core rev: f60f215f74b5fe5a43943c9d3ccdbe0fa06b7828)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 16:23:47 +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
Ross Burton 26ce13ba62 runqemu-ifup: when tunctl can't be found, say what package builds it
If runqemu is used without actually building any qemu images (i.e. you
downloaded the images) it's likely that qemu-helper-native hasn't been built.
Instead of just saying what command can't be found, tell the user how to solve
their problem.

(From OE-Core rev: 45f80a0c46035dc73818ce4bd818a4f6197d954f)

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>
2013-08-26 11:47:17 +01:00
Paul Eggleton 752df39cd2 buildhistory-collect-srcrevs: match new buildhistory-diff command line parsing
* Default buildhistory directory to buildhistory/ under the current
  directory and require an option to set it
* Show a description in the help output

(From OE-Core rev: 64aa7d0b53f6ad45ab1a2121e917d7a512097407)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:44:17 +01:00
Paul Eggleton 2a9d9b6a99 buildhistory-diff: improve command-line handling
Improve command-line argument handling of buildhistory-diff to make it
easier to use.

* Default buildhistory directory to buildhistory/ under the current
  directory and require an option to set it (since most users will
  likely run buildhistory-diff from the build directory and keep
  BUILDHISTORY_DIR at its default location)
* Default from-revision to "build-minus-1" to get the difference from
  the previous build with no arguments
* Allow from/to revisions to be specified by from..to (since git accepts
  this form).

(From OE-Core rev: 5e2be70e89820ffc74208d225fe4414fe5182050)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:44:17 +01:00
Martin Jansa 855b3252d9 classes/buildhistory: record size of installed package not compressed archive
* usually it's more important to know how much space will each
  package take on target device then size of compressed package
* example for libewebkit0 with 4 different architectures, interesting
  that om_gta02 .ipk is bigger but it's smaller when installed

  before:
  MACHINE     DEFAULTTUNE       SIZE (.ipk file)
  om_gta04    cortexa8t-neon    15996 KiB libewebkit0
  qemux86_64  x86-64            16992 KiB libewebkit0
  spitz       xscale            16148 KiB libewebkit0
  om_gta02    arm920t           16260 KiB libewebkit0

  after:
  MACHINE     DEFAULTTUNE       SIZE (installed)
  om_gta04    cortexa8t-neon    60544 KiB libewebkit0
  qemux86_64  x86-64            63720 KiB libewebkit0
  spitz       xscale            60588 KiB libewebkit0
  om_gta02    arm920t           56268 KiB libewebkit0

(From OE-Core rev: 85e4a77138381a6086d5ebd3a28cb5a94bc26a19)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:44:16 +01:00
Chen Qi a7e8f83cbe runqemu-internal: fix to start X correctly in live images
The QEMUOPTIONS for ISOFS was not complete, leading to failures when
trying to start X in live images.

This patch fixes this problem.

[YOCTO #4103]
[YOCTO #4884]

(From OE-Core rev: 08947869917dc5a9dfff05b0ee19279f60cf6d2b)

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-16 11:14:35 +01:00
Ross Burton ca367d02fd wipe-sysroots: don't assume TMPDIR is under BUILDDIR
The previous code used the environment variable BUILDDIR and assumed that TMPDIR
was a subdirectory. This often isn't the case, so instead ask bitbake where the
directories we're about to delete are.

(From OE-Core rev: 29491a72acac81ebb7e9ecfbc9392fbeb9a7ea26)

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>
2013-08-16 11:14:33 +01:00
Ross Burton 70a16efaa6 oe-setup-builddir: substitute ##OEROOT## when using templates
oe-setup-builddir substitutes ##COREBASE## which seems like it should have the
same value as the variable ${COREBASE}.  In reality it doesn't as ##COREBASE##
is substituted with the value of $OEROOT (the location of the oe-init-build-env
script), whereas ${COREBASE} is set by oe-core to the parent directory of meta/.
If oe-core's meta/ isn't a top-level directory then ##COREBASE## and ${COREBASE}
have different values, which can lead to confusion.

To resolve this, deprecate (but still substitute) ##COREBASE## and substitute
 ##OEROOT# for $OEROOT.

(From OE-Core rev: 1890783928dd1c73105fae32fb6c588afc287ff6)

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>
2013-08-13 23:06:03 +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
Joe MacDonald 0224cb2de5 oe-find-native-sysroot: minor optimization
The middle 'cut' in OECORE_NATIVE_SYSROOT isn't doing anything useful, so
remove it from the pipeline.

(From OE-Core rev: 94495c5a11d31e258a42cabb5ca1487421fe5495)

Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-03 10:33:12 +01:00
Martin Jansa 5c4513daf6 test-dependencies: add simple script to detect missing or autoenabled dependencies
(From OE-Core rev: a2b3c9e01c871a395a93e162731db77a618306cb)

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>
2013-07-29 13:09:05 +01:00
Yi Zhao 3e2a680816 scripts/create-lsb-image: remove
This script is no longer maintained. Now we don't perform LSB test on
qemu image, so we don't need this script. Most of functions in this
script are implemented in LSB_Test.sh. So it is safe to remove.

(From OE-Core rev: 46a71cdd3a6e8f571610d73b8811c060d038e8bf)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:05 +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
Tom Zanussi 74e403705e yocto-kernel: make BBLAYERS parsing more robust
This allows the BBLAYERS parsing code to handle cases where BBLAYERS
is spread across multiple assignments or all on a single line, within
double or single quotes.

Fixes [YOCTO #3746].

(From meta-yocto rev: 4ab26d9e655bab0069ffe9b135557d943cf1f524)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-13 18:23:39 +01:00
Nathan Rossi f6538c3b64 scripts/runqemu: Add support for 'qemumicroblaze' machine
* Add support to boot the 'qemumicroblaze' machine in
  qemu-system-microblazeel
* Use the specific machine model for a MicroBlaze system 'petalogix-ml605'
* Use the DTB generated from the kernel build as the DTB for boot
* Force use of initrd rootfs (either in ext or cpio formats)

(From OE-Core rev: 2c164a5dfc877d180ef58d46c063573621297929)

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:41:51 +01:00
Nathan Rossi 41563388ed scripts/runqemu: Add support for 'qemuzynq' machine
* Add support to boot the 'qemuzynq' machine in qemu-system-arm
* Use the specific machine model for Zynq 'xilinx-zynq-a9'
* Use the DTB generated from the kernel build as the DTB for boot
* Force use of initrd rootfs (either in ext or cpio formats)

(From OE-Core rev: 1e4b1d95e1f47654e928f38cd091ffe272689844)

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:41:51 +01:00
Radu Moisan 88a6eb8027 lib/oeqa/utils/qemurunner.py: class to handle qemu instance
Handles qemu instances (launch, kill, restart, serial connection, logging)
Launch is blocking until login prompt and returns to the task. A qemu
serial connection is used to save the boot log and get the ip from the image.
Changed runqemu script not to error out when using custom serial option.

(From OE-Core rev: ee7d64dfcc02ba8f568b17d181e0a58d3c810076)

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-09 10:53:45 +01:00
Tom Zanussi f8c8c7d78a yocto-kernel: enforce exact match for BBLAYERS
The current code uses .startswith to find BBLAYERS, which causes false
positives when other variables such as BBLAYERS_NON_REMOVABLE exist.

This forces an exact match instead of a partial match.

Fixes [YOCTO #4743].

(From meta-yocto rev: c039def50ca6c02cb1b66fd4bf76664de42c068e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:40:30 +01:00
Tom Zanussi 04b36b14b6 yocto-bsp: filter out 'layer' from arch list
The yocto-layer tool added a new directory alongside the actual
architectures and 'common', which is already screened out as not an
actual architecture when displaying the architecures.

The same needs to be done for 'layer' which isn't actually an
architecuture and likewise needs to be screened out.

Fixes [YOCTO #4735].

(From meta-yocto rev: 7459485bf75855a40d124915d38284f737a25cc4)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:40:30 +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
Kai Kang 44011231ee cleanup-workdir: fix typo
Fix typo.

(From OE-Core rev: 07b4682250694c5783aa374814c95ba9a2974a69)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-25 17:57:29 +01:00
Richard Purdie 89023b76e5 yocto-bsp: Drop PRINC usage
We no longer need to manually bump PR values so lets not generate
code using this.

(From meta-yocto rev: ed23b0eee9791b06b0bae1ad17595e72ccaa86cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-21 14:23:31 +01:00
Richard Purdie bd30668838 oe-buildenv-internal: Ensure error messages got to stderr
(From OE-Core rev: 631a0ec8cc7e53c2df2fc62c5276f940ed45b39e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-18 17:33:15 +01:00
Richard Purdie 7abcaf14ec oe-buildenv-internal: Fix exit verses return
This script is sourced so we should return, not exit.

(From OE-Core rev: bde54b4c4f8de696666a8c79c8cb6cf224c246e1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 10:41:01 +01:00
Richard Purdie 98abb113a0 scripts/buildenv-internal/sanity: Update to python 2.7.3 as a minimum
We're finding bugs in python 2.6 and starting to require unittest
functionality in python 2.7.x. Its time to bump the minimum version
requirement. Anyone without python 2.7.x can use the buildtools-tarball
out to install a standalone python/git/tar setup which will work
with the system.

(From OE-Core rev: 8b90f1becd40a7f857d2fbe30eaffe218a976419)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie bd07f35bdb scripts/bitbake: Drop horrible double execution mess
There is no longer anything of value in the bitbake wrapper script since pseudo
is handled by bitbake internally. We can therefore drop it (yay).

(From OE-Core rev: d716d095751086e72fd789721005f0dc6d632997)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie ec7d9359b4 scripts/oe-buildenv-internal bitbake: Migrate python version checks
In preparation for removal of the bitbake wrapper script, move the
python version checks to the environment script. There are also
checks within bitbake itself but these may not always function
correctly on every version of python so this is really insurance.

(From OE-Core rev: 07792e4a83ca4f1c8152c228813c7f795fa6a545)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:52 +01:00
Richard Purdie cfbd13ff22 scripts/bitbake sanity.bbclass: Migrate tests for git and tar versions
Migrate tests for correct git and tar versions from the wrapper script
to the sanity class.

This sets the scene to allow us to remove the bitbake wrapper script.

(From OE-Core rev: 7b370e23594da5dcb53cd5507ec289c3ef2d9fb5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:53:51 +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
Ross Burton 68ffca3470 runqemu: when tunctl can't be found, say what package builds it
If runqemu is used without actually building any qemu images (i.e. you
downloaded the images) it's likely that qemu-helper-native hasn't been built.
Instead of just saying what command can't be found, tell the user how to solve
their problem.

(From OE-Core rev: 1498c431a161e8b3ddebefb5f03f4f11d5796c1d)

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>
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
Ning Zhang 96edb2002a yocto_kernel: modify the msg when adding duplicate items
Privious check-in "yocto_kernel: check current items before add a
new one" had been merged before I apply the feedback from Zanussi, Tom.
Now fix it as a new patch.

This fix modify the output message when customer adding duplicate
items.

[YOCTO #4558]

(From meta-yocto rev: 530c6efa85b1798d30db4c6c83a748b100b8c1c3)

Signed-off-by: Ning Zhang <ning.zhang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:47:23 +01:00
Ning Zhang 7285246deb yocto_kernel: check current items before add a new one
When use "yocto-kernel config add" to add the same config many times,
all of these are list when use "yocto-kernel config list" to check.

This fix modify routine yocto_kernel_config_add, if the new added
components already exist in current configuration, just igore them.
Now, one config could only be added one time.

[YOCTO #4558]

(From meta-yocto rev: 655ccc5ed77b52fb62dab5f6cfdf3de39b1bf055)

Signed-off-by: Ning Zhang <ning.zhang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 20:59:14 +01:00