diff options
-rw-r--r-- | scripts/lib/wic/plugins/source/rawcopy.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index 0472f536ba..ba014b0714 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py | |||
@@ -20,6 +20,7 @@ import os | |||
20 | from wic import msger | 20 | from wic import msger |
21 | from wic.pluginbase import SourcePlugin | 21 | from wic.pluginbase import SourcePlugin |
22 | from wic.utils.oe.misc import exec_cmd, get_bitbake_var | 22 | from wic.utils.oe.misc import exec_cmd, get_bitbake_var |
23 | from wic.filemap import sparse_copy | ||
23 | 24 | ||
24 | class RawCopyPlugin(SourcePlugin): | 25 | class RawCopyPlugin(SourcePlugin): |
25 | """ | 26 | """ |
@@ -70,11 +71,9 @@ class RawCopyPlugin(SourcePlugin): | |||
70 | dst = os.path.join(cr_workdir, source_params['file']) | 71 | dst = os.path.join(cr_workdir, source_params['file']) |
71 | 72 | ||
72 | if 'skip' in source_params: | 73 | if 'skip' in source_params: |
73 | dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \ | 74 | sparse_copy(src, dst, skip=source_params['skip']) |
74 | (src, dst, source_params['skip']) | ||
75 | else: | 75 | else: |
76 | dd_cmd = "cp %s %s" % (src, dst) | 76 | sparse_copy(src, dst) |
77 | exec_cmd(dd_cmd) | ||
78 | 77 | ||
79 | # get the size in the right units for kickstart (kB) | 78 | # get the size in the right units for kickstart (kB) |
80 | du_cmd = "du -Lbks %s" % dst | 79 | du_cmd = "du -Lbks %s" % dst |