wic/utils/partitionedfs.py: assemble .wic images as sparse files

The individual partitions created by wic are sparse but without
this change the assembled image is written as one (potentially
very) large file.

Preserve sparseness in the assembled image by passing the sparse
conversion symbol.

[YOCTO #9099]

(From OE-Core rev: 5fd592fbae2e046bcb8c3a6c3ef4993fe0400676)

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock
2016-04-08 10:14:18 +01:00
committed by Richard Purdie
parent 7fdb0618cf
commit 29bc2f7423

View File

@@ -340,7 +340,7 @@ class Image(object):
source = part['source_file']
if source:
# install source_file contents into a partition
cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \
cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc,sparse" % \
(source, image_file, self.sector_size,
part['start'], part['size'])
exec_cmd(cmd)