[OE-core] [PATCH] wic/utils/partitionedfs.py: assemble .wic images as sparse files

Ed Bartosh ed.bartosh at linux.intel.com
Thu Dec 17 12:21:21 UTC 2015


Hi Joshua,

Thank you for the patch! I like the change. It's a first step towards
supporting bmaptool, which is in my TODO list.

Would you be willing to write or modify wic test case to test this?

On Wed, Dec 16, 2015 at 04:33:13PM +0000, Joshua Lock wrote:
> 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.
> 
> 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" % \
>                        (source, image_file, self.sector_size,
>                         part['start'], part['size'])
>                  exec_cmd(cmd)
> -- 
> 2.5.0
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
--
Regards,
Ed



More information about the Openembedded-core mailing list