diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-27 12:43:49 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-28 12:27:53 +0000 |
commit | 126f634207cd11f8e4b0324b90613b76193ca8d2 (patch) | |
tree | 60a78a422051164059f0f3b6cce40e59de7f4090 /meta/classes | |
parent | 93d157b7245182d88395b2e361db28528dd3af19 (diff) | |
download | poky-126f634207cd11f8e4b0324b90613b76193ca8d2.tar.gz |
image_types: Refactor compression code into a generic compression solution
The current approach of adding each different compressed image type doesn't
scale. This patch changes the code so compressed images for each form are
automatically available using the form <type>.<compression type> in
IMAGE_FSTYPES. This doesn't change any existing externally visible behaviour
and the image generation process becomes more efficient as a result too.
(From OE-Core rev: b7e4ed41ee480f00b7265341e9e2d2c2b9135143)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/image_types.bbclass | 131 |
2 files changed, 68 insertions, 67 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 54ab157a44..4db55ff779 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -75,9 +75,7 @@ inherit image-${IMAGE_TYPE} | |||
75 | 75 | ||
76 | python () { | 76 | python () { |
77 | deps = d.getVarFlag('do_rootfs', 'depends') or "" | 77 | deps = d.getVarFlag('do_rootfs', 'depends') or "" |
78 | for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): | 78 | deps += imagetypes_getdepends(d) |
79 | for dep in ((d.getVar('IMAGE_DEPENDS_%s' % type) or "").split() or []): | ||
80 | deps += " %s:do_populate_sysroot" % dep | ||
81 | for dep in (d.getVar('EXTRA_IMAGEDEPENDS', True) or "").split(): | 79 | for dep in (d.getVar('EXTRA_IMAGEDEPENDS', True) or "").split(): |
82 | deps += " %s:do_populate_sysroot" % dep | 80 | deps += " %s:do_populate_sysroot" % dep |
83 | d.setVarFlag('do_rootfs', 'depends', deps) | 81 | d.setVarFlag('do_rootfs', 'depends', deps) |
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 3b261623d6..74071c1288 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -2,7 +2,21 @@ def get_imagecmds(d): | |||
2 | cmds = "\n" | 2 | cmds = "\n" |
3 | old_overrides = d.getVar('OVERRIDES', 0) | 3 | old_overrides = d.getVar('OVERRIDES', 0) |
4 | 4 | ||
5 | alltypes = d.getVar('IMAGE_FSTYPES', True).split() | ||
5 | types = d.getVar('IMAGE_FSTYPES', True).split() | 6 | types = d.getVar('IMAGE_FSTYPES', True).split() |
7 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() | ||
8 | cimages = {} | ||
9 | |||
10 | # Filter out all the compressed images from types | ||
11 | for type in types: | ||
12 | for ctype in ctypes: | ||
13 | if type.endswith("." + ctype): | ||
14 | basetype = type.rsplit(".", 1)[0] | ||
15 | types[types.index(type)] = basetype | ||
16 | if type not in cimages: | ||
17 | cimages[basetype] = [] | ||
18 | cimages[basetype].append(ctype) | ||
19 | |||
6 | # Live images will be processed via inheriting bbclass and | 20 | # Live images will be processed via inheriting bbclass and |
7 | # does not get processed here. | 21 | # does not get processed here. |
8 | # live images also depend on ext3 so ensure its present | 22 | # live images also depend on ext3 so ensure its present |
@@ -11,11 +25,24 @@ def get_imagecmds(d): | |||
11 | types.append("ext3") | 25 | types.append("ext3") |
12 | types.remove("live") | 26 | types.remove("live") |
13 | 27 | ||
28 | cmds += " rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" | ||
14 | for type in types: | 29 | for type in types: |
30 | ccmd = [] | ||
31 | subimages = [] | ||
15 | localdata = bb.data.createCopy(d) | 32 | localdata = bb.data.createCopy(d) |
16 | localdata.setVar('OVERRIDES', '%s:%s' % (type, old_overrides)) | 33 | localdata.setVar('OVERRIDES', '%s:%s' % (type, old_overrides)) |
17 | bb.data.update_data(localdata) | 34 | bb.data.update_data(localdata) |
18 | localdata.setVar('type', type) | 35 | localdata.setVar('type', type) |
36 | if type in cimages: | ||
37 | for ctype in cimages[type]: | ||
38 | ccmd.append("\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True)) | ||
39 | subimages.append(type + "." + ctype) | ||
40 | if type not in alltypes: | ||
41 | ccmd.append(localdata.expand("\trm ${IMAGE_NAME}.rootfs.${type}")) | ||
42 | else: | ||
43 | subimages.append(type) | ||
44 | localdata.setVar('ccmd', "\n".join(ccmd)) | ||
45 | localdata.setVar('subimages', " ".join(subimages)) | ||
19 | cmd = localdata.getVar("IMAGE_CMD", True) | 46 | cmd = localdata.getVar("IMAGE_CMD", True) |
20 | localdata.setVar('cmd', cmd) | 47 | localdata.setVar('cmd', cmd) |
21 | cmds += localdata.getVar("runimagecmd", True) | 48 | cmds += localdata.getVar("runimagecmd", True) |
@@ -25,10 +52,36 @@ runimagecmd () { | |||
25 | # Image generation code for image type ${type} | 52 | # Image generation code for image type ${type} |
26 | ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{base_size = ($1 * ${IMAGE_OVERHEAD_FACTOR}); OFMT = "%.0f" ; print ((base_size > ${IMAGE_ROOTFS_SIZE} ? base_size : ${IMAGE_ROOTFS_SIZE}) + ${IMAGE_ROOTFS_EXTRA_SPACE}) }'` | 53 | ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{base_size = ($1 * ${IMAGE_OVERHEAD_FACTOR}); OFMT = "%.0f" ; print ((base_size > ${IMAGE_ROOTFS_SIZE} ? base_size : ${IMAGE_ROOTFS_SIZE}) + ${IMAGE_ROOTFS_EXTRA_SPACE}) }'` |
27 | ${cmd} | 54 | ${cmd} |
55 | # Now create the needed compressed versions | ||
28 | cd ${DEPLOY_DIR_IMAGE}/ | 56 | cd ${DEPLOY_DIR_IMAGE}/ |
29 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} | 57 | ${ccmd} |
30 | ln -s ${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} | 58 | # And create the symlinks |
31 | } | 59 | for type in ${subimages}; do |
60 | ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type | ||
61 | done | ||
62 | } | ||
63 | |||
64 | def imagetypes_getdepends(d): | ||
65 | def adddep(depstr, deps): | ||
66 | for i in (depstr or "").split(): | ||
67 | if i not in deps: | ||
68 | deps.append(i) | ||
69 | |||
70 | deps = [] | ||
71 | ctypes = d.getVar('COMPRESSIONTYPES', True).split() | ||
72 | for type in (d.getVar('IMAGE_FSTYPES', True) or "").split(): | ||
73 | basetype = type | ||
74 | for ctype in ctypes: | ||
75 | if type.endswith("." + ctype): | ||
76 | basetype = type.rsplit(".", 1)[0] | ||
77 | adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps) | ||
78 | break | ||
79 | adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps) | ||
80 | |||
81 | depstr = "" | ||
82 | for dep in deps: | ||
83 | depstr += " " + dep + ":do_populate_sysroot" | ||
84 | return depstr | ||
32 | 85 | ||
33 | 86 | ||
34 | XZ_COMPRESSION_LEVEL ?= "-e -9" | 87 | XZ_COMPRESSION_LEVEL ?= "-e -9" |
@@ -46,40 +99,11 @@ IMAGE_CMD_ext2 () { | |||
46 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 | 99 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 |
47 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | 100 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
48 | } | 101 | } |
49 | IMAGE_CMD_ext2.gz () { | ||
50 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | ||
51 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 | ||
52 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 | ||
53 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz | ||
54 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | ||
55 | } | ||
56 | IMAGE_CMD_ext2.bz2 () { | ||
57 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz | ||
58 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 | ||
59 | bzip2 -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 | ||
60 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.bz2 | ||
61 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | ||
62 | } | ||
63 | IMAGE_CMD_ext2.lzma () { | ||
64 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz | ||
65 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 | ||
66 | lzma -f -7 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 | ||
67 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.lzma ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.lzma | ||
68 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | ||
69 | } | ||
70 | 102 | ||
71 | IMAGE_CMD_ext3 () { | 103 | IMAGE_CMD_ext3 () { |
72 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 | 104 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 |
73 | tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 | 105 | tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 |
74 | } | 106 | } |
75 | IMAGE_CMD_ext3.gz () { | ||
76 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | ||
77 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3 | ||
78 | tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3 | ||
79 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3 | ||
80 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz | ||
81 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | ||
82 | } | ||
83 | 107 | ||
84 | oe_mkext4fs () { | 108 | oe_mkext4fs () { |
85 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} $1 | 109 | genext2fs -b $ROOTFS_SIZE -i 4096 -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} $1 |
@@ -97,13 +121,6 @@ oe_mkext4fs () { | |||
97 | IMAGE_CMD_ext4 () { | 121 | IMAGE_CMD_ext4 () { |
98 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4 | 122 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4 |
99 | } | 123 | } |
100 | IMAGE_CMD_ext4.gz () { | ||
101 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | ||
102 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext4 | ||
103 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext4 | ||
104 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext4.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.gz | ||
105 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} | ||
106 | } | ||
107 | 124 | ||
108 | IMAGE_CMD_btrfs () { | 125 | IMAGE_CMD_btrfs () { |
109 | mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs | 126 | mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs |
@@ -112,9 +129,6 @@ IMAGE_CMD_btrfs () { | |||
112 | IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" | 129 | IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend" |
113 | IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend" | 130 | IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend" |
114 | IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." | 131 | IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ." |
115 | IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ." | ||
116 | IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ." | ||
117 | IMAGE_CMD_tar.xz = "cd ${IMAGE_ROOTFS} && tar --xz -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.xz ." | ||
118 | 132 | ||
119 | CPIO_TOUCH_INIT () { | 133 | CPIO_TOUCH_INIT () { |
120 | if [ ! -L ${IMAGE_ROOTFS}/init ] | 134 | if [ ! -L ${IMAGE_ROOTFS}/init ] |
@@ -126,18 +140,6 @@ IMAGE_CMD_cpio () { | |||
126 | ${CPIO_TOUCH_INIT} | 140 | ${CPIO_TOUCH_INIT} |
127 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) | 141 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) |
128 | } | 142 | } |
129 | IMAGE_CMD_cpio.gz () { | ||
130 | ${CPIO_TOUCH_INIT} | ||
131 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) | ||
132 | } | ||
133 | IMAGE_CMD_cpio.xz () { | ||
134 | ${CPIO_TOUCH_INIT} | ||
135 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | xz -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.xz) ${EXTRA_IMAGECMD} | ||
136 | } | ||
137 | IMAGE_CMD_cpio.lzma () { | ||
138 | ${CPIO_TOUCH_INIT} | ||
139 | cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | xz --format=lzma -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD} | ||
140 | } | ||
141 | 143 | ||
142 | UBI_VOLNAME ?= "${MACHINE}-rootfs" | 144 | UBI_VOLNAME ?= "${MACHINE}-rootfs" |
143 | 145 | ||
@@ -159,9 +161,7 @@ EXTRA_IMAGECMD = "" | |||
159 | EXTRA_IMAGECMD_jffs2 ?= "--pad --little-endian --eraseblock=0x40000" | 161 | EXTRA_IMAGECMD_jffs2 ?= "--pad --little-endian --eraseblock=0x40000" |
160 | # Change these if you want default genext2fs behavior (i.e. create minimal inode number) | 162 | # Change these if you want default genext2fs behavior (i.e. create minimal inode number) |
161 | EXTRA_IMAGECMD_ext2 ?= "-i 8192" | 163 | EXTRA_IMAGECMD_ext2 ?= "-i 8192" |
162 | EXTRA_IMAGECMD_ext2.gz ?= "-i 8192" | ||
163 | EXTRA_IMAGECMD_ext3 ?= "-i 8192" | 164 | EXTRA_IMAGECMD_ext3 ?= "-i 8192" |
164 | EXTRA_IMAGECMD_ext3.gz ?= "-i 8192" | ||
165 | EXTRA_IMAGECMD_btrfs ?= "" | 165 | EXTRA_IMAGECMD_btrfs ?= "" |
166 | 166 | ||
167 | IMAGE_DEPENDS = "" | 167 | IMAGE_DEPENDS = "" |
@@ -169,22 +169,25 @@ IMAGE_DEPENDS_jffs2 = "mtd-utils-native" | |||
169 | IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native" | 169 | IMAGE_DEPENDS_sum.jffs2 = "mtd-utils-native" |
170 | IMAGE_DEPENDS_cramfs = "cramfs-native" | 170 | IMAGE_DEPENDS_cramfs = "cramfs-native" |
171 | IMAGE_DEPENDS_ext2 = "genext2fs-native" | 171 | IMAGE_DEPENDS_ext2 = "genext2fs-native" |
172 | IMAGE_DEPENDS_ext2.gz = "genext2fs-native" | ||
173 | IMAGE_DEPENDS_ext2.bz2 = "genext2fs-native" | ||
174 | IMAGE_DEPENDS_ext2.lzma = "genext2fs-native xz-native" | ||
175 | IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" | 172 | IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native" |
176 | IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native" | ||
177 | IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" | 173 | IMAGE_DEPENDS_ext4 = "genext2fs-native e2fsprogs-native" |
178 | IMAGE_DEPENDS_ext4.gz = "genext2fs-native e2fsprogs-native" | ||
179 | IMAGE_DEPENDS_btrfs = "btrfs-tools-native" | 174 | IMAGE_DEPENDS_btrfs = "btrfs-tools-native" |
180 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" | 175 | IMAGE_DEPENDS_squashfs = "squashfs-tools-native" |
181 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" | 176 | IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" |
182 | IMAGE_DEPENDS_tar.xz = "tar-native xz-native" | ||
183 | IMAGE_DEPENDS_cpio.lzma = "xz-native" | ||
184 | IMAGE_DEPENDS_cpio.xz = "xz-native" | ||
185 | IMAGE_DEPENDS_ubi = "mtd-utils-native" | 177 | IMAGE_DEPENDS_ubi = "mtd-utils-native" |
186 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" | 178 | IMAGE_DEPENDS_ubifs = "mtd-utils-native" |
187 | IMAGE_DEPENDS_vmdk = "qemu-native" | 179 | IMAGE_DEPENDS_vmdk = "qemu-native" |
188 | 180 | ||
189 | # This variable is available to request which values are suitable for IMAGE_FSTYPES | 181 | # This variable is available to request which values are suitable for IMAGE_FSTYPES |
190 | IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" | 182 | IMAGE_TYPES = "jffs2 sum.jffs2 cramfs ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext2.lzma btrfs live squashfs squashfs-lzma ubi tar tar.gz tar.bz2 tar.xz cpio cpio.gz cpio.xz cpio.lzma vmdk" |
183 | |||
184 | COMPRESSIONTYPES = "gz bz2 lzma xz" | ||
185 | COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}" | ||
186 | COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.gz" | ||
187 | COMPRESS_CMD_bz2 = "bzip2 -k ${IMAGE_NAME}.rootfs.${type}" | ||
188 | COMPRESS_CMD_xz = "xz -k -c ${XZ_COMPRESSION_LEVEL} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type}" | ||
189 | COMPRESS_DEPENDS_lzma = "xz-native" | ||
190 | COMPRESS_DEPENDS_gz = "" | ||
191 | COMPRESS_DEPENDS_bz2 = "" | ||
192 | COMPRESS_DEPENDS_xz = "xz-native" | ||
193 | |||