Commit Graph

65 Commits

Author SHA1 Message Date
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
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 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
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
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
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 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 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 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
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 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