aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/wic
AgeCommit message (Collapse)Author
2015-04-13wic: Add argv argument to mainEd Bartosh
Make it possible to call wic as an API from tests passing command line parameters as arguments to main. This is yet another enabler for wic unit testing. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13wic: Use __file__ instead of sys.argv[0]Ed Bartosh
Using __file__ makes the code work independently of the way it's loaded. In some cases wic can be imported by another program without executing it. sys.argv[0] would not contain path to the wic in such a cases. This is an enabler for unit testing with nose framework. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13wic:code cleanup: No space allowedEd Bartosh
Fixed pylint warning 'No space allowed around keyword argument assignment' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-08wic: Implement --build-rootfs command line optionEd Bartosh
-f/--build-rootfs option makes wic to run bitbake <image> to produce rootfs. This option requires image name to be specified with -e/--image-name. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-08wic: code cleanup: bad indentationEd Bartosh
Fixed pylint warning 'Bad indentation' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30wic: Remove special-case bootimg_dirTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30Revert "wic: set bootimg_dir when using image-name artifacts"Tom Zanussi
This reverts commit 7ce1dc13f91df70e8a2f420e7c3eba51cbc4bd48. 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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23wic: set bootimg_dir when using image-name artifactsMaciej Borzecki
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. 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-16wic: Add kickstart reference to help systemTom Zanussi
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. 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-16wic: Add wic overview to help systemTom Zanussi
Add a general overview of wic to the help system as 'wic overview', along with some introductory examples. 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-10wic: Add general 'plugins' help topicTom Zanussi
Add a category for help topics with an initial help topic discussing source plugins. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-10wic: Add dummy subcommand and usage stringsTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-21wic: add support to look in all layers and get .wks fileJoão Henrique Ferreira de Freitas
.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. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-30wic: Extend --rootfs-dir to connect rootfs-dirsJoão Henrique Ferreira de Freitas
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 Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04wic: Hook up --debug optionTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-04wic: Create and use new functions for getting bitbake variablesTom Zanussi
Add get_bitbake_var() and bitbake_env_lines() functions for use by plugins, which will need access to them for customization. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-23wic: eliminate module checksTom Zanussi
We're removing all external dependencies including rpm and urlgrabber, so we don't need this check. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18wic: Check for the existence/correctness of build artifactsTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16wic: Check for external modulesDarren Hart
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. 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-16wic: check passed-in build artifact directoriesTom Zanussi
Make sure they exist - complain if they don't. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16wic: check for build artifactsTom Zanussi
wic needs to be given one form of build artifacts or another - complain if the user doesn't do that. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-01wic: Initial code for wic (OpenEmbedded Image Creator)Tom Zanussi
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. 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>