aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib
AgeCommit message (Collapse)Author
2013-12-12wic: Remove selinux_check()Tom Zanussi
This seems to be an obsolete check - we don't have any problems with image creation under selinux, so remove it. (From OE-Core master rev: 12e81eceab9e0a483765566ad3791b14718195b5) 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> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Update and generalize pseudo setup for rootfs generationTom Zanussi
Remove unnecessary pseudo exports i.e. PSEUDO_DISABLED and move the setup to the top-level prepare_rootfs(). (From OE-Core master rev: 4bf11cd7d7301da664c098c8a0ae9c0294a6f423) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Make find_binary_path() more user-friendlyTom Zanussi
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 master rev: 0d9eef0eaa267500e8eedab8b72ddf24eb0516db) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Remove binary dependenciesTom Zanussi
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 master rev: 76293d2d6bbdeacd7b34f39f26fb97c3d7f9496f) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Remove rpmmisc call from livecdTom Zanussi
We don't currently use LiveCDImageCreator, but it makes calls when initialized via the plugin interface to rpmmisc module functions, which we don't want the dependency on. To make it (and LiveUSBImageCreator) happy, we give it the dummy "i386" value for now. (From OE-Core master rev: e10ae516cfc10900ed12e84c743e3a7127372135) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Remove rpm and grabber dependencies from BaseImageCreatorTom Zanussi
BaseImageCreator is a base class for DirectImageCreator and others, and imports rpm and grabber (which imports rpm). The various plugins e.g. DirectPlugin import the creators and therefore these dependencies, which manifest at run-time as e.g.: Warning: Failed to load plugin imager/direct_plugin: No module named rpm (From OE-Core master rev: a1e24c4a5f5771b7ad35e53ce96c6d82212e4d7e) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: remove rpm warning code from BackendPluginTom Zanussi
We don't currently use rpm functionality, so we don't need to silence rpm warnings. (From OE-Core master rev: dd3cc03d4fa3347f8ef2db23d8ff98bdbdb73baa) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Remove dependency on myurlgrab moduleTom Zanussi
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 master rev: 429ecc2afa499df35a1ae9da6f92b88c6f2d8d11) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Remove dependency on rpmmiscTom Zanussi
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 master rev: 2d59b6eeb418cf23eef3e32b43354b4ab16a40b9) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Remove dependency on rt_util moduleTom Zanussi
rt_util contains bootstrap_mic(), which imports rpm and other things we don't need because we don't do bootstrap i.e. runtime (set in wic.conf) is always set to 'native', which means use what's on the local host. bootstrap mode is for downloading and installing rpms that wic needs, which we may want to implement later; for now, we just want to use what's local. (From OE-Core master rev: 3103f0cb908eced7b751128c2bba898d12017c80) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: add pseudo to the populate-extfs stepTom Zanussi
Without this, files in the generated filesystem pick up the wrong ownership. (From OE-Core master rev: 24a6b1324965080fef6c363edcb37768090eebea) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Initialize return values in find_artifacts()Tom Zanussi
If one of these isn't found, it won't be initialized and will throw an UnboundLocalError. (From OE-Core master rev: ce6c3ec0e5f4822e85b8f957e9e31fa9de438c55) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-12-10wic: Force lba off for FAT16 partitionsDarren Hart
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 master 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> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2013-10-01wic: Add OpenEmbedded-specific implementationTom Zanussi
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. 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>
2013-10-01wic: Add mic w/pykickstartTom Zanussi
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. 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>
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>