aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-07-26 08:30:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-27 11:54:53 +0100
commitb3ff63796cd6629975ff0a726ba18cc168e0a2b2 (patch)
tree7efc20a3ed129bc51de47502369863a5acbd7865 /meta/classes/image_types.bbclass
parent190b4f17f5fc9879e680278dd0e31e26e5f5bca0 (diff)
downloadopenembedded-core-contrib-b3ff63796cd6629975ff0a726ba18cc168e0a2b2.tar.gz
classes/image*: Revamp creation of live images
This creates a live image as an IMAGE_FSTYPES, thus removing the need to have additional -live.bb recipes. To create a live image one just needs to add live to the IMAGE_FSTYPES list Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/image_types.bbclass')
-rw-r--r--meta/classes/image_types.bbclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index f1aef86fad..cd901c105f 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -1,7 +1,18 @@
+
def get_imagecmds(d):
cmds = "\n"
old_overrides = bb.data.getVar('OVERRIDES', d, 0)
- for type in bb.data.getVar('IMAGE_FSTYPES', d, True).split():
+
+ types = bb.data.getVar('IMAGE_FSTYPES', d, True).split()
+ # Live images will be processed via inheriting bbclass and
+ # does not get processed here.
+ # live images also depend on ext3 so ensure its present
+ if "live" in types:
+ if "ext3" not in types:
+ types.append("ext3")
+ types.remove("live")
+
+ for type in types:
localdata = bb.data.createCopy(d)
localdata.setVar('OVERRIDES', '%s:%s' % (type, old_overrides))
bb.data.update_data(localdata)
@@ -103,4 +114,4 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
# This variable is available to request which values are suitable for IMAGE_FSTYPES
-IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext3 ext3.gz squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"
+IMAGE_TYPES = "jffs2 cramfs ext2 ext2.gz ext3 ext3.gz live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma"