[OE-core] [PATCH 1/2] wic/utils/partitionedfs.py: assemble .wic images as sparse files
Robert Yang
liezhi.yang at windriver.com
Sun Apr 10 14:34:27 UTC 2016
On 04/08/2016 05:14 PM, Joshua Lock wrote:
> From: Joshua Lock <joshua.lock at collabora.co.uk>
>
> 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 <joshua.lock at collabora.co.uk>
> ---
> scripts/lib/wic/utils/partitionedfs.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
> index 5a103bb..3e2b420 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" % \
Hi Joshua,
I got errors with this patch since my dd doesn't support conversion sparse:
dd: invalid conversion: `sparse'
Try `dd --help' for more information.
So that it would fail.
$ dd --version
dd (coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
The host is Ubuntu 12.04, it works well except this error.
// Robert
> (source, image_file, self.sector_size,
> part['start'], part['size'])
> exec_cmd(cmd)
>
More information about the Openembedded-core
mailing list