summaryrefslogtreecommitdiffstats
path: root/scripts/lib/image
Commit message (Collapse)AuthorAgeFilesLines
* wic: Fix kernel dir locationTom Zanussi2015-02-211-3/+3
| | | | | | | | | | | | | | | With the recent kernel staging changes, STAGING_KERNEL_DIR no longer points to the kernel image, which can be found however in DEPLOY_DIR_IMAGE. This updates find_artifacts() to look there instead. Fixes [YOCTO #7307]. (From OE-Core rev: 453d0a9823665870e273a37657d6e27fb788d72e) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: allow to configure overhead factor per partitionAlexandre Belloni2015-02-141-0/+6
| | | | | | | | | | | Introduce a new option --overhead-factor to replace IMAGE_OVERHEAD_FACTOR. (From OE-Core rev: 20fe0c7202724187dbe80eb2101d8ef69e86b94e) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: allow to configure extra space per partitionAlexandre Belloni2015-02-141-0/+6
| | | | | | | | | | | | Introduce a new option --extra-space instead of using IMAGE_EXTRA_SPACE. This is useful for boot partitions where the extra space is often useless or for huge partition where 10MiB may not be enough. (From OE-Core rev: 9f7fe71a10bcdd1864d2f838f3510e96810ef42e) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: allow creation of partitions not in tableAlexandre Belloni2015-02-141-0/+6
| | | | | | | | | | | | | | | | For some architectures it is necessary to reserve space on disk without it being present in the partition table. For example, u-boot on i.mx is placed at an offset of 1kB on the sdcard. While it would be possible to create a partition at that offset and place u-boot there, it would then be necessary to update the default u-boot environment to use partition 2 on the mmc instead of partition 1. (From OE-Core rev: 233b631ece5ee14d057932c146327065064b5196) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use kB for the partitions sizeAlexandre Belloni2015-02-081-4/+4
| | | | | | | | | | | | | | | | | | Use kB instead of MB for the partition size to get a better granularity. This is needed on some SoC (i.mx, omap) where it is necessary to create partitions as small as 64kB. Keep the backward compatibility by assuming MB when no unit is provided. (From OE-Core rev: 3d4da9186016d54b76ad2fa710646de253f0f063) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com> Tested-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove special-case bootimg_dirTom Zanussi2014-10-302-29/+10
| | | | | | | | | | | | | | | | | | | | 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>
* Revert "wic: set bootimg_dir when using image-name artifacts"Tom Zanussi2014-10-301-7/+2
| | | | | | | | | | | | | | | | 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] (From OE-Core rev: db90f10bf31dec8d7d7bb2d3680d50e133662850) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Update the help text to include -D (--debug)Tom Zanussi2014-10-301-6/+15
| | | | | | | | | | 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>
* wic: add sdimage-bootpart kickstart fileMaciej Borzecki2014-09-231-0/+6
| | | | | | | | | | | | | | 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>
* wic: set bootimg_dir when using image-name artifactsMaciej Borzecki2014-09-231-2/+7
| | | | | | | | | | | | | 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>
* wic: Add mkgummidisk kickstart fileTom Zanussi2014-08-151-0/+11
| | | | | | | | | 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>
* wic: Add sourceparams to mkefidisk.wksTom Zanussi2014-08-151-1/+1
| | | | | | | | | | 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>
* wic: Rename /mic to /wicTom Zanussi2014-08-112-10/+10
| | | | | | | | | | | | | 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>
* wic: Remove unused conf supportTom Zanussi2014-08-111-1/+0
| | | | | | | | | 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>
* wic: Update 'Background and Motivation' help sectionTom Zanussi2014-08-111-13/+1
| | | | | | | | | | | 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>
* wic: Various typo/grammar fixes to wic help textTom Zanussi2014-08-021-3/+3
| | | | | | | | | | | 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>
* wic: Add squashfs to --fstypes documentationTom Zanussi2014-08-021-0/+1
| | | | | | | | | | 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>
* wic: Add documentation for --fsoptionsTom Zanussi2014-08-021-0/+7
| | | | | | | | | | --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>
* wic: Fix plugin help textTom Zanussi2014-08-021-13/+16
| | | | | | | | | | | 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>
* wic: Remove fstype from mkefidisk canned wksTom Zanussi2014-07-231-1/+1
| | | | | | | | | | 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>
* wic: Add help entry for wic kickstartTom Zanussi2014-07-231-0/+1
| | | | | | | | | | | 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>
* wic: Add kickstart reference to help systemTom Zanussi2014-07-162-1/+115
| | | | | | | | | | | 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>
* wic: Add wic overview to help systemTom Zanussi2014-07-161-0/+209
| | | | | | | | | | | 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>
* wic: Add general 'plugins' help topicTom Zanussi2014-07-101-1/+100
| | | | | | | | | | | 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>
* wic: Add help text for 'wic list source-plugins'Tom Zanussi2014-07-101-3/+17
| | | | | | | | | | | 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>
* wic: Add command to list available source pluginsTom Zanussi2014-07-101-0/+13
| | | | | | | | | | | | | 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>
* wic: check if BBLAYERS is valid before useJoão Henrique Ferreira de Freitas2014-06-061-3/+4
| | | | | | | | | | | | 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>
* wic: add support to look in all layers and get .wks fileJoão Henrique Ferreira de Freitas2014-05-211-29/+43
| | | | | | | | | | | | | | | .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>
* wic: Move find_bitbake_env_line() to oe.miscJoão Henrique Ferreira de Freitas2014-05-131-17/+0
| | | | | | | | | | 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>
* wic: Fix bitbake_env_command for 'None' caseTom Zanussi2014-03-301-1/+4
| | | | | | | | | | bitbake_env_command will choke if it isn't given an image, make sure it does the right thing in that case. (From OE-Core rev: a17f879cd5bc7401597ccee908801f8e3efa34c0) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Hook up --debug optionTom Zanussi2014-02-041-1/+4
| | | | | | | | | | | 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>
* wic: Hook up BootimgEFIPlugin and BootimgPcbiosPlugin pluginsTom Zanussi2014-02-042-2/+2
| | | | | | | | | | | | | | | | | | | Remove all the Wic_PartData and DirectImageCreator code now implemented by the BootimgEFIPlugin and BootimgPcbiosPlugin plugins, as well as all the special-cased boot_type code, significantly cleaning up the code. Replace the calling code with general-purpose plugin invocations, in essence calling the appropriate implementations at run-time based on the --source value in effect. Change the directdisk.wks and mkefidisk.wks scripts to make use of the new plugins. (From OE-Core rev: 43558610a5793888ff2b18bd3a27c7ab558e5ad0) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Create and use new functions for getting bitbake variablesTom Zanussi2014-02-041-5/+15
| | | | | | | | | | 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>
* wic: Move some common items to oe.miscTom Zanussi2014-02-041-11/+0
| | | | | | | | | | Move a couple items into a more common location since they're going to need to be accessible from source plugins. (From OE-Core rev: 95ca523949e838850b5afa090ba16f91b8557c12) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Initialize return values in find_artifacts()Tom Zanussi2013-10-181-0/+2
| | | | | | | | | | If one of these isn't found, it won't be initialized and will throw an UnboundLocalError. (From OE-Core rev: ce6c3ec0e5f4822e85b8f957e9e31fa9de438c55) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add OpenEmbedded-specific implementationTom Zanussi2013-10-014-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reuses the mic/livecd infrastructure but heavily subclasses and modifies it to adapt to the special needs of building images from existing OpenEmbedded build artifacts. In addition to the OE-specific mic objects and modifications to the underlying infrastructure, this adds a mechanism to allow OE kickstart files to be 'canned' and made available to users via the 'wic list images' command. Two initial OE kickstart files have been added as canned .wks files: directdisk, which implements the same thing as the images created by directdisk.bbclass, and mkefidisk, which can essentially be used as a replacement for mkefidisk.sh. Of course, since creation of these images are now driven by .wks files rather than being hard-coded into class files or scripts, they can be easily modified to generate different variations on those images. They also don't require root priveleges, since they don't use mount to create the images. They don't however write to media like mkefidisk.sh does, but rather create images that can be written onto media. (From OE-Core rev: f87acc5e59d3c2c39ff171b5557977dab4c8f4a6) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Initial code for wic (OpenEmbedded Image Creator)Tom Zanussi2013-10-013-0/+589
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>
OpenPOWER on IntegriCloud