]> code.ossystems Code Review - openembedded-core.git/commit
image.bbclass: support chaining compression (aka conversion) commands
authorPatrick Ohly <patrick.ohly@intel.com>
Mon, 7 Mar 2016 14:51:14 +0000 (15:51 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Mar 2016 16:36:31 +0000 (16:36 +0000)
commit588f14370372a66329b54606071175519ce88f1e
tree5301fde1dacad6e1c099fbd0c6d1ae59e762a203
parent0d02159c8d66bb136f7da2c10fda7d1a57f40cec
image.bbclass: support chaining compression (aka conversion) commands

It makes sense to use the compression mechanism also for conversion,
for example of a whole-disk image into .vdi (VirtualBox). That part
already works, like this:

   COMPRESSIONTYPES_append = " vdi"
   COMPRESS_CMD_vdi = "qemu-img convert -O vdi ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi"
   IMAGE_DEPENDS_vdi = "qemu-native"

But then it also makes sense to allow compressing the resulting image,
which only works after enhancing the image.bbclass.

For example, suppose a custom image command produces "dsk" images. Then
it becomes possible to set
   IMAGE_FSTYPES = " dsk.xz dsk.vdi.xz"
and do_image_dsk will automatically produce the intermediate images,
convert to dsk.xz resp. dsk.vdi -> dsk.vdi.xz and delete all
intermediate images. Symlinks are also set correctly.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass