diff options
-rw-r--r-- | meta/classes/image.bbclass | 12 | ||||
-rw-r--r-- | meta/classes/image_types.bbclass | 13 |
2 files changed, 20 insertions, 5 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 7650594f8c..422a8261bd 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -90,7 +90,17 @@ do_rootfs[depends] += "makedevs-native:do_populate_sysroot virtual/fakeroot-nati | |||
90 | do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot" | 90 | do_rootfs[depends] += "virtual/update-alternatives-native:do_populate_sysroot update-rc.d-native:do_populate_sysroot" |
91 | do_rootfs[recrdeptask] += "do_packagedata" | 91 | do_rootfs[recrdeptask] += "do_packagedata" |
92 | 92 | ||
93 | IMAGE_TYPE_live = '${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}' | 93 | def build_live(d): |
94 | if base_contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg | ||
95 | d.setVar('NOISO', base_contains('IMAGE_FSTYPES', "iso", "0", "1", d)) | ||
96 | d.setVar('NOHDD', base_contains('IMAGE_FSTYPES', "hddimg", "0", "1", d)) | ||
97 | if d.getVar('NOISO', True) == "0" or d.getVar('NOHDD', True) == "0": | ||
98 | return "live" | ||
99 | return "empty" | ||
100 | return "live" | ||
101 | |||
102 | IMAGE_TYPE_live = "${@build_live(d)}" | ||
103 | |||
94 | inherit image-${IMAGE_TYPE_live} | 104 | inherit image-${IMAGE_TYPE_live} |
95 | IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "vmdk", "empty", d)}' | 105 | IMAGE_TYPE_vmdk = '${@base_contains("IMAGE_FSTYPES", "vmdk", "vmdk", "empty", d)}' |
96 | inherit image-${IMAGE_TYPE_vmdk} | 106 | inherit image-${IMAGE_TYPE_vmdk} |
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 8c49169533..9ead059883 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -43,12 +43,17 @@ def get_imagecmds(d): | |||
43 | if "ext3" not in alltypes: | 43 | if "ext3" not in alltypes: |
44 | alltypes.append("ext3") | 44 | alltypes.append("ext3") |
45 | types.remove("vmdk") | 45 | types.remove("vmdk") |
46 | if "live" in types: | 46 | if "live" in types or "iso" in types or "hddimg" in types: |
47 | if "ext3" not in types: | 47 | if "ext3" not in types: |
48 | types.append("ext3") | 48 | types.append("ext3") |
49 | if "ext3" not in alltypes: | 49 | if "ext3" not in alltypes: |
50 | alltypes.append("ext3") | 50 | alltypes.append("ext3") |
51 | types.remove("live") | 51 | if "live" in types: |
52 | types.remove("live") | ||
53 | if "iso" in types: | ||
54 | types.remove("iso") | ||
55 | if "hddimg" in types: | ||
56 | types.remove("hddimg") | ||
52 | 57 | ||
53 | if d.getVar('IMAGE_LINK_NAME', True): | 58 | if d.getVar('IMAGE_LINK_NAME', True): |
54 | if d.getVar('RM_OLD_IMAGE', True) == "1": | 59 | if d.getVar('RM_OLD_IMAGE', True) == "1": |
@@ -115,7 +120,7 @@ def imagetypes_getdepends(d): | |||
115 | deps = [] | 120 | deps = [] |
116 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() | 121 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() |
117 | for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): | 122 | for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): |
118 | if type == "vmdk" or type == "live": | 123 | if type == "vmdk" or type == "live" or type == "iso" or type == "hddimg": |
119 | type = "ext3" | 124 | type = "ext3" |
120 | basetype = type | 125 | basetype = type |
121 | for ctype in ctypes: | 126 | for ctype in ctypes: |
@@ -230,7 +235,7 @@ IMAGE_DEPENDS_ubi = "mtd-utils-native" | |||
230 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" | 235 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" |
231 | 236 | ||
232 | # This variable is available to request which values are suitable for IMAGE_FSTYPES | 237 | # This variable is available to request which values are suitable for IMAGE_FSTYPES |
233 | IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" | 238 | IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs iso hddimg squashfs squashfs-xz ubi ubifs tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk elf" |
234 | 239 | ||
235 | COMPRESSIONTYPES = "gz bz2 lzma xz" | 240 | COMPRESSIONTYPES = "gz bz2 lzma xz" |
236 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" | 241 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" |