Commit Graph

1204 Commits

Author SHA1 Message Date
Tom Zanussi fcf56083b9 wic: Update bootimg-partition to use bootimg_dir
Update bootimg-partition to use bootimg_dir instead of img_deploy_dir,
to match similar usage in other plugins.

As mentioned elsewhere, plugins should use the passed-in value for
bootimg_dir directly if non-null, which corresponds to a user-assigned
value specified via a -b command-line param, and only fetch the value
from bitbake if that value is null.

(From OE-Core rev: 3822f8a7b33da56ecd9144b4bcae50734fb1af81)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:41 +00:00
Tom Zanussi 42d0334aa8 wic: Remove special-case bootimg_dir
The first iterations of wic very shortsightedly catered to two
specific use-cases and added special-purpose params for those cases so
that they could be directly given their corresponding boot artifacts.
(hdddir and staging_data_dir).

As more use-cases are added, it becomes rather obvious that such a
scheme doens't scale, and additionally causes confusion for plugin
writers.

This removes those special cases and states explicitly in the help
text that plugins are responsible for locating their own boot
artifacts.

(From OE-Core rev: 6ba3eb5ff7c47aee6b3419fb3a348a634fe74ac9)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:41 +00:00
Tom Zanussi 38400617fe Revert "wic: set bootimg_dir when using image-name artifacts"
This reverts commit 7ce1dc13f9.

This patch broke the assumption that a non-null boot_dir means a
user-assigned (-b command-line param) value.

Reverting doesn't break anything, since the case it was added for
doesn't use the boot_dir for anything except debugging anyhow.

Fixes [YOCTO #6290]

(From OE-Core rev: db90f10bf31dec8d7d7bb2d3680d50e133662850)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:41 +00:00
Tom Zanussi d1f8b8f5d0 wic: Update the help text to include -D (--debug)
The --debug option is missing from the wic help text; this adds it and
at the same time rearranges the usage into a more logical arrangement.

(From OE-Core rev: cf5144ef241d8f4ccaa3461ae5c9f89c2cf2f8d1)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:40 +00:00
Tom Zanussi 005d81da2b wic: Use overhead factor when creating partitions from rootfs directories
When creating partitions sized to given rootfs directories, filesystem
creation could fail in cases where the calculated target partition
size was too small to contain the filesystem created using mkfs.  This
occurred in particular when creating partitions to contain very large
filesystems such as those containing sdk image artifacts.

This same limition is present in the oe-core image creation classes,
which can be readily see by changing IMAGE_OVERHEAD_FACTOR from the
default 1.3 to 1.0 and building a sato-sdk image.

It should be possible to calculate required sizes exactly given the
source rootfs and target filesystem types, but for now, to address the
specific problem users are hitting in such situations, we'll just do
exactly what oe-core does and define and use an IMAGE_OVERHEAD_FACTOR
or 1.3 in those cases.

Fixes [YOCTO #6863].

(From OE-Core rev: bbaef3ff5833fc1d97b7b028d7770834f62789da)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:40 +00:00
Tom Zanussi 334f83a146 wic: Don't allow mkfs to fail silently in partition command
The return code from the mkfs command used by the partition creation
command was being ignored, allowing it to silently fail and leaving
users mystified as to why the resulting filesystem was corrupted.

This became obvious when failures occurred when creating large
e.g. sdk filesystems [YOCTO #6863].

(From OE-Core rev: 8cef3b06f7e9f9d922673f430ddb3170d2fac000)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:03:40 +00:00
Hongxu Jia 9c218a319e wic/bootimg-pcbios.py: checking the existance of syslinux
While syslinux not existed in $bootimg_dir, there was a error:

$ wic create directdisk -e core-image-minimal
...
|Creating image(s)...
|Error: exec_cmd: install -m 444 /home/jiahongxu/yocto/
build-20141010-yocto/tmp/deploy/images/qemux86-64/syslinux/
ldlinux.sys /var/tmp/wic/build/hdd/boot/ldlinux.sys
returned '1' instead of 0
...

Add checking for the existance of syslinux to fix this issue.
If syslinux didn't exist in anywhere, prompt user to build it.

[YOCTO #6826]

(From OE-Core rev: c2d4364d9fbbda64598f0a3eb0b0890932bb7742)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-18 16:14:03 +02:00
Ross Burton 1d00f3e0d9 oe-git-proxy: use SOCKS4a instead of SOCKS4
In some situations where a proxy is required the client can't even do DNS
lookups, so instead of using SOCKS4 use SOCKS4a which moves the name resolution
from the client to the proxy.

(From OE-Core rev: 984455a95b4302d527ff54e019d8ed00611f3664)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10 16:44:31 +01:00
Maciej Borzecki 7291691d3f wic: add sdimage-bootpart kickstart file
Add kickstart for generating a SD card image that should cover most use
case scenarios. The layout is as follows:
- 16MB vfat partition that IMAGE_BOOT_FILES will be copied to, 4k
  alignment
- ext4 rootfs, 4k alignment

(From OE-Core rev: bb01a6be7b32aa675f5003a6012a60a081212e8c)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 6b03fc214f wic: add new bootimg-partition plugin
This patch implements 'bootimg-partition source plugin class for 'wic'. The
plugin creates an image of boot partition, copying over files listed in
IMAGE_BOOT_FILES bitbake variable.

(From OE-Core rev: 4a3200d710d953956064c28188577fbd461d093d)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 7ce1dc13f9 wic: set bootimg_dir when using image-name artifacts
Running wic with -e to use artifacts from a named image, bootimg_dir was
always passed as empty string to partition source plugins. The patch
sets bootimg_dir to current value of DEPLOY_DIR_IMAGE, as bootloader
artifacts end up in that location as well.

(From OE-Core rev: d7f69e6f0932a927b6ce289fb47ba575d7aaa1c8)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 48ff3fa3a5 wic: fix vfat partition sector count only if needed
VFAT rootfs partitions sector count would get updated always even if
there is no need. Since parition size in wic is expressed in MB, any
sub MB change will cause the generated partition image to be larger
than allocated space within the disk image. Fortunately, partitions
sized in MB will most of the time have a proper sector count.

(From OE-Core rev: 99bee4cb489800d74dea4d2158ff834413685f04)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:56 +01:00
Maciej Borzecki 0b3f477616 wic: use IMAGE_EXTRA_SPACE for vfat rootfs
Functions for generating rootfs use IMAGE_EXTRA_SPACE rather than
BOOTDD_EXTRA_SPACE. The latter is used in boot image source plugins.

(From OE-Core rev: 44abf447f8e4ed11cbbe53a4fb0ecf10a20f0f9e)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:55 +01:00
Maciej Borzecki c94d8e93db wic: minor comment update
Update comment about types of generated partition images.

(From OE-Core rev: ba1503f77e0c03fe6c715b61983008b7a534ae20)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:35:55 +01:00
Richard Purdie c5cc4993f0 sstatesig/sstate: Add support for locked down sstate cache usage
I've been giving things some thought, specifically why sstate doesn't
get used more and why we have people requesting external toolchains. I'm
guessing the issue is that people don't like how often sstate can change
and the lack of an easy way to lock it down.

Locking it down is actually quite easy so patch implements some basics
of how you can do this (for example to a specific toolchain). With an
addition like this to local.conf (or wherever):

SIGGEN_LOCKEDSIGS = "\
gcc-cross:do_populate_sysroot:a8d91b35b98e1494957a2ddaf4598956 \
eglibc:do_populate_sysroot:13e8c68553dc61f9d67564f13b9b2d67 \
eglibc:do_packagedata:bfca0db1782c719d373f8636282596ee \
gcc-cross:do_packagedata:4b601ff4f67601395ee49c46701122f6 \
"

the code at the end of the email will force the hashes to those values
for the recipes mentioned. The system would then find and use those
specific objects from the sstate cache instead of trying to build
anything.

Obviously this is a little simplistic, you might need to put an override
against this to only apply those revisions for a specific architecture
for example. You'd also probably want to put code in the sstate hash
validation code to ensure it really did install these from sstate since
if it didn't you'd want to abort the build.

This patch also implements support to add to bitbake -S which dumps the
locked sstate checksums for each task into a ready prepared include file
locked-sigs.inc (currently placed into cwd). There is a function,
bb.parse.siggen.dump_lockedsigs() which can be called to trigger the
same functionality from task space.

A warning is added to sstate.bbclass through a call back into the siggen
class to warn if objects are not used from the locked cache. The
SIGGEN_ENFORCE_LOCKEDSIGS variable controls whether this is just a warning
or a fatal error.

A script is provided to generate sstate directory from a locked-sigs file.

(From OE-Core rev: 7e14784f2493a19c6bfe3ec3f05a5cf9797a2f22)

(From OE-Core rev: 884d4fa3e77cf32836f14a113c11489076f4a84d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-17 22:00:25 +01:00
Tom Zanussi 5bef32283f wic: Completely remove all urlgrabber references
The previous commit, 'wic: Remove 3rdparty/urlgrabber' didn't actually
remove all references to urlgrabber - this does however.

(From OE-Core rev: b4367af770611174d9de82c63c697d4347e30dcf)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10 11:33:25 +01:00
Richard Purdie 957753b628 scripts/contrib/build-perf-test: Update eglibc -> glibc
(From OE-Core rev: 928fc6c3652ba5db87e1f1c7923972d85c31bc08)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:04 +01:00
Yi Zhao 60b8a574dc scripts/create-recipe: minor fixes
Fixed:
- Remove PR. We don't need the "PR = r0" in the bb file.
- Function length can't get the array's size correctly.
  Should use function scalar.

(From OE-Core rev: efb9f9f1d9a85a22991f99277f77b87784762cbb)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:03 +01:00
Maciej Borzecki 50fbf19a93 wic: do not realign aligned partitions
The change prevents additional realignment of already aligned
partition. Previously, even already aligned partitions would be pushed
forward by the amount of --align.

(From OE-Core rev: 92a1b83d928173a58280ca019ca81fdeb5ba72b5)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:09 +01:00
Maciej Borzecki 5686b2d5a7 wic: do not steal sectors from the first partition
In order to make up for space loss due to overhead located before the
first partition, same amount of bytes was extracted from the first
partition's size. This leads to unexpected change of first partition's
size, and is not matched by similar adjustment at the time the partition
image is generated. Thus it is possible that the first partition may
partially overwrite contents of the following partition, as the
partition image is larger than the allocated space.

This is also problematic on certain platforms such as OMAP, where the
first partition is required for have an even number of
sectors (typically already expressed by --size in kickstart
file). Subtracting an odd number of sectors lost for overhead, leads to
an odd number of sectors assigned for partition, preventing the board,
such as beaglebone, from booting correctly.

(From OE-Core rev: c3251d4191fb0b7c3477a3579e542729598f6aad)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:26:09 +01:00
Maciej Borzecki f12ac6101c wic: include partition label in fs image file name
Not including the label image but having multiple partitions of the same
type, the image file of one partition would overwrite the other.

(From OE-Core rev: acf2fb7c6dfa3217ffcbf9483c190057d9f41bbf)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:53 +01:00
Tom Zanussi 072657ce98 wic: Add mkgummidisk kickstart file
This is the same as mkefidisk but uses gummiboot instead of grub-efi.

(From OE-Core rev: 5979409ebfab0bb07b3c2b2fcf14a722c441f07b)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 32a5799b78 wic: Add sourceparams to mkefidisk.wks
The bootimg-efi plugin now requires a loader param, so supply it to
retain existing behavior.

(From OE-Core rev: ccef1385cb51ce2b9b75493b314e38599a8ae10e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 6e328c94ae wic: Add gummiboot support to bootimg-efi
Add gummiboot support to bootimg-efi, which retains the existing
grub-efi support (though requires an update to the .wks file).

(From OE-Core rev: f1a81fcefa493540a9faac549fdd513b86f8f497)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 8d0185f4f8 wic: Parse and pass sourceparams to partition plugin methods
Add code to parse the sourceparams and pass them to the partition
plugin methods.

(From OE-Core rev: 769a6f920fb672c50d76bd4bdea4a65fdc18a7b3)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi e00e902fc7 wic: Add sourceparam param to partition plugin methods
The sourceparam param allows source plugins to be parameterized
generically (via --sourceparams="key=val[,key=val], implemented
previously).

(From OE-Core rev: 2abbcc843ba888782f6d68748d930c81e6ae7040)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi ef700ea11f wic: Add utility function for parsing sourceparams
Parses strings of the form key1=val1[,key2=val2,...] and returns a
dict.  Also accepts valueless keys i.e. without =.

(From OE-Core rev: 36f258ee6e60c26fd44b9bc71c318363cec71f42)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Tom Zanussi 3c90ee9bc2 wic: Add '--sourceparams' partition option
To go along with '--source' as a way to parameterize source plugins.

(From OE-Core rev: f5b9ef65453b3f66282c49f5e2584ad33ac6d2d7)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:52 +01:00
Martin Jansa d43b4392bb sstate-sysroot-cruft.sh: Improve to use it from CI
* strip tmpdir prefix, so that we have shorter paths which aren't
  builder specific
* use '#' for regexp delimiter so that we don't need to prefix
  forward slashes in paths
* extend default whitelist to cover typical cases
* add parameter for external whitelist file
* use number of found paths as return code, so that CI can easily
  report error when new untracked files are found
* use .txt suffix for all output files, so that they can be easily
  viewed in browser
* add populate_sysroot task, because somewhere between dora and daisy
  the populate-sysroot files in sstate-control were renamed to have
  underscore instead of dash
* only few entries not covered by this default whitelist were found
  in world build (but I'll leave these for people to whitelist, because
  they are not generated in most builds)
  * [^/]*/home/builder
    home directory from meta/recipes-graphics/builder/builder_0.1.bb
  * [^/]*/usr/src/kernel/patches
  * [^/]*/usr/lib/gdk-pixbuf-2.0/.*/loaders.cache
    3 places are using this, not sure which one creates it
    meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb:
      GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
    meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb:
      GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
    scripts/postinst-intercepts/update_pixbuf_cache:
      >$GDK_PIXBUF_MODULEDIR/../loaders.cache && \
      sed -i -e "s:$D::g" $GDK_PIXBUF_MODULEDIR/../loaders.cache

(From OE-Core rev: b1bfec63949e16abe8c11c34530dfbfb176c04cd)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 12:30:51 +01:00
Martin Jansa a1fa222d48 test-dependencies, insane.bbclass: improve the message
(From OE-Core rev: b73e6159aed1a9768d02d12e7894ca0f1e72be69)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 11:27:32 +01:00
Tom Zanussi d942d2220c wic: Bump the version to 2.0
This represents a complete rework, and if we assume the previous
version should have been 1.0 (instead of a silly .1x version), then
this should be 2.0.

(From OE-Core rev: d263cb055333e6432454a13403eda471c514a3e6)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi d8f9d05bae wic: Rename /mic to /wic
As well as any other stray instances of mic in the codebase that can
be removed.

We don't really need to carry around legacy naming, and the history is
in git.

(From OE-Core rev: 598b120406dc1d2b7e377bd1ab6f0acbef034b22)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi a43c1f9420 wic: Update Disk description
Remove obsolete comment.

(From OE-Core rev: d39c76f24a50c9359840c0959fb50fc6da0960cd)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi ff1aa2358e wic: Rename MountError
wic doesn't mount anything, so can't have a mount error; rename it to
something more appropriate.

(From OE-Core rev: e1edee656fc9c0a791c0eb62796d1afa483be34e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi 312479cf07 wic: Rename PartitionedMount
It's actually a container for disks and partitions, and wic doesn't
mount anything, so rename it to match what it really is.

(From OE-Core rev: 28c5249b4df46ba3ac227d0c4dc6e545b40dbaf3)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi 28453ae63c wic: Update/rename configure-related code
The wic code inherited a basic image-creation flow based on
image-configuration, but wic doesn't actually configure anything, so
rename parts of the code dealing with configuration to something more
appropriate.

(From OE-Core rev: 58dc8879bba31542e2386aaaa70034621b2b1e4e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi d02c91fe4d wic: Update/rename install-related code
The wic code inherited a basic image-creation flow based on installing
packages, but wic doesn't actually install anything, so rename parts
of the code dealing with installing to something more appropriate.

(From OE-Core rev: b4232041534a79236eb8d8ab5c0024a0ef4da649)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:12 +01:00
Tom Zanussi 467bf7e68f wic: Update cleanup/unmount-related code
The wic code inherited a basic image-creation flow based on mounting
loop devices, but wic doesn't actually mount or unmount anything, so
get rid of unmount() and consolidate whatever it did do with
cleanup().

(From OE-Core rev: 1b103bf4a7c7527d4fc57bad1bbd1d5a5bbddb4a)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi 4d1f5ee6d1 wic: Update/rename/delete mount-related code
The wic code inherited a basic image-creation flow based on mounting
loop devices, but wic doesn't actually mount anything, so rename parts
of the code dealing with mounting to something more appropriate, and
remove related unused code.

(From OE-Core rev: 94e15c18c011b0d7d71276cd4566be2417c2c6be)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi bd0dd4489e wic: Remove Mount object
It doesn't do anything we need, so remove it and fix up callers/base
classes.

(From OE-Core rev: fb2a162d8756ab69c9c29a0715b033f18620341d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi d74e7d3fa6 wic: Remove unused conf support
Also fix up users such as imager functions.

(From OE-Core rev: eb77b9c11bd9b8dc90aacfbd5b5bc5568a233525)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi 554feeebe0 wic: Update 'Background and Motivation' help section
Remove help text regarding the source and future intentions of the wic
codebase, since the code prompting those comments has now been mostly
removed.

(From OE-Core rev: dfa8626700269141f8d2f5be12c8758db7ca6473)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi 02ebd15c62 wic: Remove unused command versioning support
The default is F16 and there's no reason to change that, so remove
everything else.

(From OE-Core rev: e0ec12d012e568c9943614fc1190c143912180b3)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi 8678a6eb02 wic: Clean up Creator
wic doesn't use a lot of Creator, so remove it.

(From OE-Core rev: ef6bc7a3b58ba8b9c94f4c1e41c0f6d7d51c0bf5)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi f12336aa4a wic: Clean up PartitionedMount
wic doesn't use a lot of ParitionedMount, so remove it.

(From OE-Core rev: 0f793ff0767b0cce032c20b677974806c65610d6)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:11 +01:00
Tom Zanussi 1601821636 wic: Clean up DirectImageCreator
Remove what wic doesn't use from DirectImageCreator.

(From OE-Core rev: dbbe6d04f6c606c94ff17151aee1214e4e24ce7d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi 6c6c96afb6 wic: Clean up BaseImageCreator
wic doesn't use a lot of BaseImageCreator, so remove it.

(From OE-Core rev: 6bd95c24b44fa80ac9d5950bf2d925f18f671290)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi df42125f2c wic: Remove unused plugin and error code
wic doesn't use it, so remove it.

(From OE-Core rev: b818e5a1ed047940fda533da73fc50a099e1aa3f)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi 946dbec4eb wic: Remove gpt_parser
wic doesn't currently use it, so remove.

(From OE-Core rev: d3a490d5421405bf9e002c6c65ffb831ea6b767e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi 5a8bcfb562 wic: Remove unused 3rdparty/commands
wic doesn't use anything but partition and bootloader, so remove the
rest.

(From OE-Core rev: b6ae106b5d28180a5890e837c87f3e91e5917638)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi c9b5ea0873 wic: Remove 3rdparty/urlgrabber
wic doesn't use it, so remove it.

(From OE-Core rev: 00dcdb29c89634ab267d328eb00f8eb70c696655)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi ba19b60fd2 wic: Remove unused misc code
wic doesn't use it, so remove it.

(From OE-Core rev: 84e1e13ce3af216e304f61c7ea6e5e9338f94bc6)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:10 +01:00
Tom Zanussi f0499a07b5 wic: Remove unused fs_related code
wic doesn't use it, so remove it.

(From OE-Core rev: e18d5393a556e1ff4826c1e5b1a75f4ac998b10e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi 93a60f7e99 wic: Remove rpmmisc
wic doesn't use it, so remove it.

(From OE-Core rev: a49b39ddf18b1b058c0a892e1a7450239eea66ce)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi ac2d312f81 wic: Remove proxy support
wic doesn't use proxy support, so remove it.

Also remove anything related to proxies in misc and conf, and while
we're at it, remove all the obviously unneeded code from those files -
it's easier to just remove it than to figure out the callchain to the
proxy code usages.

Basically the extra stuff relates to packaging, images, and config
files we don't use.

(From OE-Core rev: 041f9e2ca52681cd6f5c2fb804dd45f05358c9f9)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi 29fb556a88 wic: Remove grabber implementation
wic doesn't need to grab any urls, so remove it.

(From OE-Core rev: 55f8df07d82724b6d7ed694158ca6e9a5266cbc4)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi d9096a659e wic: Remove fiemap support
wic doesn't use it, so remove it.

(From OE-Core rev: b732ad616ca20dfc4adb845b68ae3378624a0a4d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi aac322317a wic: Remove bmap support
wic doesn't use it, so remove it.

(From OE-Core rev: 69f16c7582660a3bcf4106668e548b4c789ae251)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi a9351096db wic: Remove mic package managers
wic doesn't use the yum or zypp package managers, remove them.

(From OE-Core rev: ef70b961b6b8f3a004036f84b608665db2085215)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi f1dbd46e7e wic: Remove rt_util
More package-related stuff we don't need.

(From OE-Core rev: 167cb99af427510bb6d72e89478c62a804db125c)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:09 +01:00
Tom Zanussi c0aa6cb8fe wic: Remove mic chroot
mic chroot allows users to chroot into an existing mic image and isn't
used by wic, so remove it.

Removing chroot.py leads in turn to various plugin-loading failures
for a number of plugins that wic doesn't use either, so remove those
as well.

The existing source plugins refer to chroot but don't use it, so fix
those up.

(From OE-Core rev: d73230306b827972cdc99f21d247c54d5d7c0b6d)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:08 +01:00
Tom Zanussi d2120000df wic: Remove mic bootstrap
packaging bootstrap, not needed

(From OE-Core rev: 980c8faf01fa59ce3922cbad3363a6c2f759d30e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:08 +01:00
Tom Zanussi bd9b9345dd wic: Remove packaging, config commands
Remove commands related to repos, packaging, configuration

(From OE-Core rev: 2b002ab75473578f06f161be0b48670fba26994e)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:08 +01:00
Tom Zanussi 36f4edec65 wic: Remove unused custom commands
installer, repo, desktop-related stuff

(From OE-Core rev: 26e909682fffb8ae6062d1e8295b6421f1f716ad)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:08 +01:00
Tom Zanussi 68e6adf2df wic: Make exec_cmd() error out instead of warn
The reason exec_cmd() warns but doesn't error out (broken parted)
doesn't really make sense, since the parted invocations don't even use
exec_cmd().  It really should just fail since by not doing so it's
actually enabling invalid images in some cases.

Also, since the return code is now always zero, there's no point in
having a return code, so remove it.  This represents a change in the
API, so we also need to update all callers.

(From OE-Core rev: a10bbd39eee29cc49d258bf08aaec279c3115c66)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11 10:53:08 +01:00
Roxana Ciobanu 6a77a1dd22 scripts/send-error-report: fetch /Errors/ instead of /.
If HTTP_PROXY or http_proxy is set when the send-error-report script
is run, it will check to see if fetching / on the specified server
returns 200 without the proxy set. If it does it will assume that the
proxy is not needed. However this check can never work because
fetching / always redirects to /Errors/ in the current code and
thus returns code 301. This is fixed by fetching /Errors/ instead of /.

[YOCTO #YB6576]

(From OE-Core rev: af93c89febcd186d7e31f1d15affc15f38e3379d)

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06 10:23:39 +01:00
Martin Jansa bd7b15bb49 test-dependencies: don't override failed-recipes.log
* when dependency changes are reported in OUTPUTC/failed-recipes.log
  it can be the same as final output file which is later overwritten
  because OUTPUTC == OUTPUT_BASE by default
* use similar format for messages as insane_qa check

(From OE-Core rev: f8c1c20cc4926072ad4578ca609ed40e3b94ef85)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-06 10:03:21 +01:00
Tom Zanussi 463c9f4d3a wic: Various typo/grammar fixes to wic help text
This is a set of miscellaneous help text updates noticed while
transcribing wic help for the dev manual.

(From OE-Core rev: d4b350fcdedf29692673e09a0c1850cdbbe29739)

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-08-02 09:26:13 +01:00
Tom Zanussi b7528a4bc1 wic: Add squashfs to --fstypes documentation
squashfs support was recently added to wic, so document it.

(From OE-Core rev: c04043e143932fe2ea38f87d2faa8beed007671b)

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-08-02 09:26:13 +01:00
Tom Zanussi dcf7d981a2 wic: Add documentation for --fsoptions
--fsoptions support was recently added to wic, so document it.

(From OE-Core rev: e2d87ad57f8aa74e748ba95f6a801a2ca665ecc4)

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-08-02 09:26:13 +01:00
Tom Zanussi 3e237b177b wic: Fix plugin help text
Fix various typoes and grammar problems noticed while transcribing for
the dev manual.

(From OE-Core rev: 79fb7d9b5a28810e3adfaf5cba0c2298810253e9)

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-08-02 09:26:13 +01:00
Maciej Borzecki 09def7a78c wic: do not overwrite autogenerated /etc/fstab with original too early
DirectImageCreator.__write_fstab() generates new /etc/fstab in sysroot
with rootfs contents. The fstab entries are generated base on the
initialn contents of /etc/fstab, plus any extra (other than / or
/boot) partitions listed in *.wks. A backup of original /etc/fstab is
done in a temp location. Subsequent call to __restore_fstab() restores
the backup copy, replacing the autogenerated one.

Calling __restore_fstab() before Wic_PartData.prepare() brings back the
original fstab before the partition image file actually is created. As
such, the autogenerated /etc/fstab will not make it to the partition.

(From OE-Core rev: a9e59d7b1fa1ed33ce9678fb77a367800d7a8f87)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-26 09:01:05 +01:00
Maciej Borzecki 73ce04eb6d wic: squashfs partition support
It is possible to instruct wic to create a squashfs partition by setting
--fstype=squashfs in *.wks. For now this is only useable for rootfs
partitions (note that you must have squashfs support in the kernel). An
attempt to create an empty partition will produce a warning.

(From OE-Core rev: 30266a0be946bd0ce76d6920e7afe840c6c3bf80)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25 16:54:43 +01:00
Maciej Borzecki 5e7de54d3d wic: --fsoptions handling
Add handling of --fsoptions in parition definition. If no options are
specified, 'defaults' is used.

(From OE-Core rev: e91c0db15db74237606fae96c9b7d21936519a86)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25 16:54:43 +01:00
Tom Zanussi 063ee04d47 wic: Remove fstype from mkefidisk canned wks
The bootimg-efi plugin specifies the fstype internally, so remove it
from the partition definition.

(From OE-Core rev: e9365e9d9e8a8696849fda182ec260398059089a)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:16 +01:00
Tom Zanussi aec05b6bf8 wic: Add help entry for wic kickstart
Previous patches added help for 'wic kickstart' but forgot to add an
entry in the main help page showing its availability.  Add an entry
for it.

(From OE-Core rev: 5aa212f990c3d9b90a4f06cea346b82fc5d376ba)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:16 +01:00
Tom Zanussi a0e7d58bc1 wic: Fix bad directory name in bootimg-efi
The original move of the mkefidisk code to the bootimg-efi plugin
resulted in a bad hdddir - fix it.

(From OE-Core rev: ab337705521d8734f12be612709e70a163111fe3)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:16 +01:00
Darren Hart cfa23a21d4 mkefidisk.sh: Add signal handling
Add basic signal handling to unmount and remove any temporary files.
Correct a quoting issue with the die() function caught testing signal
handling.
Fix a minor typo in "formatting" output.

(From OE-Core rev: a085cdf0e2dcf6543f61a8bdf68f83bcf8006373)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:14 +01:00
Darren Hart ce3857994a mkefidisk.sh: Fix redirection to 1
The current script intends to redirect stderr to stdout, but instead
redirects to a file named 1. No doubt a regex replace error.

Replace all instances of 2>1 with 2>&1.

(From OE-Core rev: 1864ca9751c28cca248cfba77a3d23fc58ff43bb)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:14 +01:00
Darren Hart c294bbe520 mkefidisk.sh: Remove initrd entry for gummiboot
My previous patch adding gummiboot support was missing the line to
remove the initrd line from the boot config. This was an oversight in
copying over the grub setup to gummiboot. Add the necessary logic to
remove it.

(From OE-Core rev: c7355550dc21a1ef3c2e828ed5f51e94e12fac5f)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:13 +01:00
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