[oe-commits] [openembedded-core] 19/31: wic: use sparse_copy to copy partitions
git at git.openembedded.org
git at git.openembedded.org
Fri Apr 29 08:24:26 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit b4c1b0fe0db231d4e5fc226b3b6c55f73cbc8bd7
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Thu Apr 28 13:58:10 2016 +0300
wic: use sparse_copy to copy partitions
Copied partition images into final partitioned image using
sparse_copy API. This method preserves sparseness of the
final image. It also makes wic much faster, as unmapped
blocks of the partition images are not copied.
[YOCTO #9099]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/wic/utils/partitionedfs.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 4170ec1..534635b 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -22,6 +22,7 @@ import os
from wic import msger
from wic.utils.errors import ImageError
from wic.utils.oe.misc import exec_cmd, exec_native_cmd
+from wic.filemap import sparse_copy
# Overhead of the MBR partitioning scheme (just one sector)
MBR_OVERHEAD = 1
@@ -343,10 +344,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" % \
- (source, image_file, self.sector_size,
- part['start'], part['size'])
- exec_cmd(cmd)
+ sparse_copy(source, image_file, part['start'] * self.sector_size)
msger.debug("Installed %s in partition %d, sectors %d-%d, "
"size %d sectors" % \
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list