aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic
AgeCommit message (Collapse)Author
2014-08-11wic: Rename /mic to /wicTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Update Disk descriptionTom Zanussi
Remove obsolete comment. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Rename MountErrorTom Zanussi
wic doesn't mount anything, so can't have a mount error; rename it to something more appropriate. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Rename PartitionedMountTom Zanussi
It's actually a container for disks and partitions, and wic doesn't mount anything, so rename it to match what it really is. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Update/rename configure-related codeTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Update/rename install-related codeTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Update cleanup/unmount-related codeTom Zanussi
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(). Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Update/rename/delete mount-related codeTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove Mount objectTom Zanussi
It doesn't do anything we need, so remove it and fix up callers/base classes. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused conf supportTom Zanussi
Also fix up users such as imager functions. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused command versioning supportTom Zanussi
The default is F16 and there's no reason to change that, so remove everything else. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Clean up CreatorTom Zanussi
wic doesn't use a lot of Creator, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Clean up PartitionedMountTom Zanussi
wic doesn't use a lot of ParitionedMount, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Clean up DirectImageCreatorTom Zanussi
Remove what wic doesn't use from DirectImageCreator. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Clean up BaseImageCreatorTom Zanussi
wic doesn't use a lot of BaseImageCreator, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused plugin and error codeTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove gpt_parserTom Zanussi
wic doesn't currently use it, so remove. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused 3rdparty/commandsTom Zanussi
wic doesn't use anything but partition and bootloader, so remove the rest. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove 3rdparty/urlgrabberTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused misc codeTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused fs_related codeTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove rpmmiscTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove proxy supportTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove grabber implementationTom Zanussi
wic doesn't need to grab any urls, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove fiemap supportTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove bmap supportTom Zanussi
wic doesn't use it, so remove it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove mic package managersTom Zanussi
wic doesn't use the yum or zypp package managers, remove them. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove rt_utilTom Zanussi
More package-related stuff we don't need. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove mic chrootTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove mic bootstrapTom Zanussi
packaging bootstrap, not needed Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove packaging, config commandsTom Zanussi
Remove commands related to repos, packaging, configuration Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Remove unused custom commandsTom Zanussi
installer, repo, desktop-related stuff Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-08-11wic: Make exec_cmd() error out instead of warnTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
2014-07-26wic: do not overwrite autogenerated /etc/fstab with original too earlyMaciej Borzecki
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. 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-25wic: squashfs partition supportMaciej Borzecki
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. Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25wic: --fsoptions handlingMaciej Borzecki
Add handling of --fsoptions in parition definition. If no options are specified, 'defaults' is used. 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-23wic: Fix bad directory name in bootimg-efiTom Zanussi
The original move of the mkefidisk code to the bootimg-efi plugin resulted in a bad hdddir - fix it. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-16wic: Error on zero-sized partitionsTom Zanussi
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. 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 vfat supportTom Zanussi
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. 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: Error on parted non-zero error codeTom Zanussi
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. 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: Print error if a partition specifies an invalid --sourceTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-10wic: Add command to list available source pluginsTom Zanussi
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. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-06-06wic: check if BBLAYERS is valid before useJoão Henrique Ferreira de Freitas
If wic is running as raw mode, it's better to check if BBLAYERS is valid before inspect it. No functional changes. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06wic: default plugin type directory should be added only onceJoão Henrique Ferreira de Freitas
Fix 'for' statement identention so plugin type directory will be added only once in layers_dirs list. No functional changes. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-21wic: add support to look in all layers and get pluginsJoão Henrique Ferreira de Freitas
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'. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-13wic: Extend indirect string connection to support image names and rootfsJoão Henrique Ferreira de Freitas
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 Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-13wic: add find_artifact() to get a specific bitbake variableJoão Henrique Ferreira de Freitas
This helper is used by source plugins to get specific bitbake variable. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-13wic: Move find_bitbake_env_line() to oe.miscJoão Henrique Ferreira de Freitas
Move find_bitbake_env_line() since they're going to need to be accessible from source plugins. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-03-30wic: Report all ROOTFS_DIR artifactsJoão Henrique Ferreira de Freitas
When a .wks has more than one ROOTFS_DIR it's better to report all ROOTFS_DIR that was used to create the image. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>