aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNoor Ahsan <noor_ahsan@mentor.com>2015-12-23 15:50:35 +0200
committerJoshua Lock <joshua.g.lock@intel.com>2016-03-03 11:01:12 +0000
commitd3dee0f4107156442238c9ea82f742afeeb0665a (patch)
tree57f4700c0a89ff19fbc7dfe6296ca8f07393e1ad /scripts
parentc99ed6b73f397906475c09323b03b53deb83de55 (diff)
downloadopenembedded-core-contrib-d3dee0f4107156442238c9ea82f742afeeb0665a.tar.gz
wic: rawcopy: Copy source file to build folder
When a file is given using --sourceparams then wic directly use that file instead of copying them to build folder. At time of assembling it os.rename is called which renames all the files to name. In that process the original file is renamed. When image recipe is rebuilt then wic complains about missing file which was renamed in previous build. [YOCTO #8854] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (From OE-Core master rev: 33c52b1f2d39feb641465bf42e8b16d0ab22a316) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/source/rawcopy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py
index f0691baa91..0472f536ba 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -67,13 +67,14 @@ class RawCopyPlugin(SourcePlugin):
return
src = os.path.join(bootimg_dir, source_params['file'])
- dst = src
+ dst = os.path.join(cr_workdir, source_params['file'])
if 'skip' in source_params:
- dst = os.path.join(cr_workdir, source_params['file'])
dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
(src, dst, source_params['skip'])
- exec_cmd(dd_cmd)
+ else:
+ dd_cmd = "cp %s %s" % (src, dst)
+ exec_cmd(dd_cmd)
# get the size in the right units for kickstart (kB)
du_cmd = "du -Lbks %s" % dst