summaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic/kickstart
Commit message (Collapse)AuthorAgeFilesLines
* wic: Report all ROOTFS_DIR artifactsJoão Henrique Ferreira de Freitas2014-03-301-0/+13
| | | | | | | | | | 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>
* wic: Add option --rootfs-dir to --sourceJoão Henrique Ferreira de Freitas2014-03-301-0/+6
| | | | | | | | | | | | | | | 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>
* wic: Use partition label to be part of rootfs filenameJoão Henrique Ferreira de Freitas2014-03-301-2/+2
| | | | | | | | | | | | | | | | | | When a partition from .wks file is set up like this: part /standby --source rootfs --rootfs-dir=<special rootfs> ... --label \ --label secondary This means that 'rootfs' must use '<special rootfs>' as rootfs and the default partition filename in /var/tmp/wic/build/ will be create using the '--label' as part of the name. E.g: /var/tmp/wic/build/rootfs_secondary.ext3 (From OE-Core rev: c7efb3a21618ce3069811042279a0d898237ac0f) Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Hook up RootfsPlugin pluginJoão Henrique Ferreira de Freitas2014-03-301-16/+12
| | | | | | | | | | | | | Remove the 'rootfs' case when internal call code is used and replace to call the general-purpose plugin. For now RootfsPluing class continues to invoke prepare_rootfs() method from Wic_PartData. However RootfsPlugin could implement them. (From OE-Core rev: 26cd93b79318cbfaebb971d1e728041904e015f1) Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Use pseudo for ext mkfs commandTom Zanussi2014-03-121-1/+1
| | | | | | | | | | The switchover from populate-exfs.sh to mke2fs forgot to preserve pseudo, add it back. (From OE-Core rev: 032309928f931b32cf63a0ebf174de029ba17401) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Use mke2fs to create the ext2/3/4 imageJoão Henrique Ferreira de Freitas2014-03-121-4/+2
| | | | | | | | | | | OE-core commit f3a95ca6886b55e5819b068bdbd2cceb882d91a6 removed the populate-extfs.sh. So mke2fs should be used to create ext2/3/4 image. (From OE-Core rev: 4dea928eef325364922b1e0cbabc2a581356e804) Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Honor --size for --source partititionsTom Zanussi2014-02-091-8/+49
| | | | | | | | | | | | | | Instead of simply creating partitions large enough to contain the contents of a --source partition (and adding a pre-specified amount of padding), use the --size used in the partition .wks statement. If --size isn't used, or is smaller than the actual --source size, retain the current behavior. (From OE-Core rev: 23b6c5ea4d48cdf731e5202991961a0e4b10ff29) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Hook up BootimgEFIPlugin and BootimgPcbiosPlugin pluginsTom Zanussi2014-02-041-116/+39
| | | | | | | | | | | | | | | | | | | 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: Add wic-specific bootloader subclassTom Zanussi2014-02-042-2/+59
| | | | | | | | | | | | | Add a new wic-specific bootloader subclass so we can add a --source param to hang non-partition plugin off of. By default, the bootloader gets the /boot partition source plugin, but this can be overridden by the --source bootloader param if needed. (From OE-Core rev: f90e4097c4e69d4f61c69923cb5d1ebb6b74d2ff) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Move some common items to oe.miscTom Zanussi2014-02-041-2/+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: Update and generalize pseudo setup for rootfs generationTom Zanussi2013-10-231-13/+15
| | | | | | | | | | Remove unnecessary pseudo exports i.e. PSEUDO_DISABLED and move the setup to the top-level prepare_rootfs(). (From OE-Core rev: 4bf11cd7d7301da664c098c8a0ae9c0294a6f423) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add pseudo to the populate-extfs stepTom Zanussi2013-10-181-1/+8
| | | | | | | | | | Without this, files in the generated filesystem pick up the wrong ownership. (From OE-Core rev: 24a6b1324965080fef6c363edcb37768090eebea) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add OpenEmbedded-specific implementationTom Zanussi2013-10-014-42/+417
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add mic w/pykickstartTom Zanussi2013-10-017-0/+1295
This is the starting point for the implemention described in [YOCTO 3847] which came to the conclusion that it would make sense to use kickstart syntax to implement image creation in OpenEmbedded. I subsequently realized that there was an existing tool that already implemented image creation using kickstart syntax, the Tizen/Meego mic tool. As such, it made sense to use that as a starting point - this commit essentially just copies the relevant Python code from the MIC tool to the scripts/lib dir, where it can be accessed by the previously created wic tool. Most of this will be removed or renamed by later commits, since we're initially focusing on partitioning only. Care should be taken so that we can easily add back any additional functionality should we decide later to expand the tool, though (we may also want to contribute our local changes to the mic tool to the Tizen project if it makes sense, and therefore should avoid gratuitous changes to the original code if possible). Added the /mic subdir from Tizen mic repo as a starting point: git clone git://review.tizen.org/tools/mic.git For reference, the top commit: commit 20164175ddc234a17b8a12c33d04b012347b1530 Author: Gui Chen <gui.chen@intel.com> Date: Sun Jun 30 22:32:16 2013 -0400 bump up to 0.19.2 Also added the /plugins subdir, moved to under the /mic subdir (to match the default plugin_dir location in mic.conf.in, which was renamed to yocto-image.conf (moved and renamed by later patches) and put into /scripts. (From OE-Core rev: 31f0360f1fd4ebc9dfcaed42d1c50d2448b4632e) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>