mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
wic: implement ext fs support for 'wic cp'
Implemented copying files to the ext partition using debugfs tool. (From OE-Core rev: 1a2bc70e6f85f414e7af48489e24c09ff335486d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
798f696623
commit
9f90956967
@@ -325,10 +325,15 @@ class Disk:
|
||||
|
||||
def copy(self, src, pnum, path):
|
||||
"""Copy partition image into wic image."""
|
||||
cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
|
||||
self._get_part_image(pnum),
|
||||
src, path)
|
||||
exec_cmd(cmd)
|
||||
if self.partitions[pnum].fstype.startswith('ext'):
|
||||
cmd = "echo -e 'cd {}\nwrite {} {}' | {} -w {}".\
|
||||
format(path, src, os.path.basename(src),
|
||||
self.debugfs, self._get_part_image(pnum))
|
||||
else: # fat
|
||||
cmd = "{} -i {} -snop {} ::{}".format(self.mcopy,
|
||||
self._get_part_image(pnum),
|
||||
src, path)
|
||||
exec_cmd(cmd, as_shell=True)
|
||||
self._put_part_image(pnum)
|
||||
|
||||
def remove(self, pnum, path):
|
||||
|
||||
Reference in New Issue
Block a user