From: Joshua Lock Date: Fri, 8 Apr 2016 09:14:18 +0000 (+0100) Subject: wic/utils/partitionedfs.py: assemble .wic images as sparse files X-Git-Tag: 2016-4~91 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=5fd592fbae2e046bcb8c3a6c3ef4993fe0400676;p=openembedded-core.git 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] Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 5a103bbc7e..3e2b420875 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py @@ -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)