summaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic/utils
Commit message (Collapse)AuthorAgeFilesLines
* wic: Remove Mount objectTom Zanussi2014-08-112-19/+1
| | | | | | | | | | It doesn't do anything we need, so remove it and fix up callers/base classes. (From OE-Core rev: fb2a162d8756ab69c9c29a0715b033f18620341d) 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-47/+1
| | | | | | | | | 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: Clean up PartitionedMountTom Zanussi2014-08-111-353/+2
| | | | | | | | | wic doesn't use a lot of ParitionedMount, so remove it. (From OE-Core rev: 0f793ff0767b0cce032c20b677974806c65610d6) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove unused plugin and error codeTom Zanussi2014-08-111-21/+0
| | | | | | | | | wic doesn't use it, so remove it. (From OE-Core rev: b818e5a1ed047940fda533da73fc50a099e1aa3f) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove gpt_parserTom Zanussi2014-08-112-381/+8
| | | | | | | | | wic doesn't currently use it, so remove. (From OE-Core rev: d3a490d5421405bf9e002c6c65ffb831ea6b767e) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove unused misc codeTom Zanussi2014-08-111-179/+1
| | | | | | | | | wic doesn't use it, so remove it. (From OE-Core rev: 84e1e13ce3af216e304f61c7ea6e5e9338f94bc6) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove unused fs_related codeTom Zanussi2014-08-111-930/+0
| | | | | | | | | wic doesn't use it, so remove it. (From OE-Core rev: e18d5393a556e1ff4826c1e5b1a75f4ac998b10e) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove rpmmiscTom Zanussi2014-08-111-600/+0
| | | | | | | | | wic doesn't use it, so remove it. (From OE-Core rev: a49b39ddf18b1b058c0a892e1a7450239eea66ce) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove proxy supportTom Zanussi2014-08-112-965/+0
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 041f9e2ca52681cd6f5c2fb804dd45f05358c9f9) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove grabber implementationTom Zanussi2014-08-111-97/+0
| | | | | | | | | wic doesn't need to grab any urls, so remove it. (From OE-Core rev: 55f8df07d82724b6d7ed694158ca6e9a5266cbc4) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove fiemap supportTom Zanussi2014-08-111-252/+0
| | | | | | | | | wic doesn't use it, so remove it. (From OE-Core rev: b732ad616ca20dfc4adb845b68ae3378624a0a4d) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove bmap supportTom Zanussi2014-08-111-298/+0
| | | | | | | | | wic doesn't use it, so remove it. (From OE-Core rev: 69f16c7582660a3bcf4106668e548b4c789ae251) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Make exec_cmd() error out instead of warnTom Zanussi2014-08-113-15/+22
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: a10bbd39eee29cc49d258bf08aaec279c3115c66) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Error on parted non-zero error codeTom Zanussi2014-07-161-1/+1
| | | | | | | | | | | | | | | 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. (From OE-Core rev: b1c68e5446080f0743f7f8a530f3b00f90c8717d) 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 find_artifact() to get a specific bitbake variableJoão Henrique Ferreira de Freitas2014-05-131-0/+14
| | | | | | | | | | This helper is used by source plugins to get specific bitbake variable. (From OE-Core rev: b8e51f73bc8e67ca60b7dd8d67091257aad62efd) Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.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-0/+16
| | | | | | | | | | 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: Make exec_native_command() fail if a command isn't foundTom Zanussi2014-02-201-2/+9
| | | | | | | | | | | | | | | | | | Because exec_cmd() return values can in certain cases be non-zero yet non-fatal, we don't want to automatically make them fatal (though there should at least be a warning in such cases, which this patch also does); non-zero return values are definitely fatal however if they mean that a native command wasn't found, so have exec_native_cmd() check the return value of exec_cmd() for that case, and bail out if so. [YOCTO #5835] (From OE-Core rev: 43ac6e3216c5d985d6f90a28e727e397df616267) 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 exec_native_cmd() pathTom Zanussi2014-02-201-1/+1
| | | | | | | | | | | The path exported in exec_native_cmd() includes bogus 'PATH=' which means the native paths for all but the first will be ignored. (From OE-Core rev: e10c1102d958ffc6b521fb36c6bc51d896503218) 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: Honor --size for --source partititionsTom Zanussi2014-02-091-0/+1
| | | | | | | | | | | | | | 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: Create and use new functions for getting bitbake variablesTom Zanussi2014-02-041-0/+16
| | | | | | | | | | 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-0/+12
| | | | | | | | | | 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: Make find_binary_path() more user-friendlyTom Zanussi2013-10-231-1/+4
| | | | | | | | | | | | find_binary_path() is useful, but if the binary isn't found, it prints a stacktrace and a less-than-useful message. Users complain when they get stacktraces for things they can act on, so remove the stacktrace and tell the user what the problem is. (From OE-Core rev: 0d9eef0eaa267500e8eedab8b72ddf24eb0516db) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove binary dependenciesTom Zanussi2013-10-231-4/+0
| | | | | | | | | | Current functionality doesn't make use of kpartx, mount, or unmount, and we use native mkswap, so remove the binary checks for those. (From OE-Core rev: 76293d2d6bbdeacd7b34f39f26fb97c3d7f9496f) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove dependency on myurlgrab moduleTom Zanussi2013-10-231-1/+0
| | | | | | | | | | | mylrlgrab is in grabber, which imports rpm. For current functionality, we don't need to grab urls or import rpm, so remove the dependency. (From OE-Core rev: 429ecc2afa499df35a1ae9da6f92b88c6f2d8d11) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove dependency on rpmmiscTom Zanussi2013-10-231-1/+0
| | | | | | | | | | | | rpmmisc imports rpm and contains misc rpm utilities related to packaging and determining arches based on the packaging. We should never run across this in the initial version of wic, so remove the dependency. (From OE-Core rev: 2d59b6eeb418cf23eef3e32b43354b4ab16a40b9) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Force lba off for FAT16 partitionsDarren Hart2013-10-161-0/+10
| | | | | | | | | | | | | If fat16 is specified to the mkpart parted command, parted will default to setting the lba flag which causes certain EFI firmware to fail to detect the filesystem. lba shouldn't be necessary for FAT16 filesystems anyway, explicitly disable it. (From OE-Core rev: 30442d432e203e655b7d40b93f7307f475de1614) 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>
* wic: Add OpenEmbedded-specific implementationTom Zanussi2013-10-015-57/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0113-0/+6413
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>