[oe-commits] [openembedded-core] 17/59: wic: implement ext fs support for 'wic cp'
git at git.openembedded.org
git at git.openembedded.org
Mon Sep 11 16:31:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 1a2bc70e6f85f414e7af48489e24c09ff335486d
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Tue Sep 5 14:54:37 2017 +0300
wic: implement ext fs support for 'wic cp'
Implemented copying files to the ext partition
using debugfs tool.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/lib/wic/engine.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index c6a63f2..9ebd93a 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -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):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list