From bd669c1809a378f93580eb9e0679a26ec6746cb8 Mon Sep 17 00:00:00 2001 From: Chee Yang Lee Date: Thu, 21 Nov 2019 14:28:52 +0800 Subject: wic: 'wic cp' to copy from image currently 'wic cp' only works for copy file from local storage to wic image. enhance 'wic cp' to copy file/directory from wic image to local storage. include selftest and 'wic help' updates. [YOCTO#12169] Signed-off-by: Chee Yang Lee Signed-off-by: Richard Purdie --- scripts/lib/wic/help.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'scripts/lib/wic/help.py') diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index 812ebe3ec8..29c4e436d8 100644 --- a/scripts/lib/wic/help.py +++ b/scripts/lib/wic/help.py @@ -341,12 +341,15 @@ DESCRIPTION wic_cp_usage = """ - Copy files and directories to the vfat or ext* partition + Copy files and directories to/from the vfat or ext* partition - usage: wic cp :[] [--native-sysroot ] + usage: wic cp [--native-sysroot ] - This command copies local files or directories to the vfat or ext* partitions -of partitioned image. + source/destination image in format :[] + + This command copies files or directories either + - from local to vfat or ext* partitions of partitioned image + - from vfat or ext* partitions of partitioned image to local See 'wic help cp' for more detailed instructions. @@ -355,16 +358,18 @@ of partitioned image. wic_cp_help = """ NAME - wic cp - copy files and directories to the vfat or ext* partitions + wic cp - copy files and directories to/from the vfat or ext* partitions SYNOPSIS - wic cp : - wic cp : - wic cp : --native-sysroot + wic cp : + wic cp : + wic cp : + wic cp : --native-sysroot DESCRIPTION - This command copies files and directories to the vfat or ext* partition of - the partitioned image. + This command copies files or directories either + - from local to vfat or ext* partitions of partitioned image + - from vfat or ext* partitions of partitioned image to local The first form of it copies file or directory to the root directory of the partition: @@ -397,6 +402,10 @@ DESCRIPTION 4 files 0 bytes 15 675 392 bytes free + The third form of the command copies file or directory from the specified directory + on the partition to local: + $ wic cp tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.wic:1/vmlinuz test + The -n option is used to specify the path to the native sysroot containing the tools(parted and mtools) to use. """ -- cgit 1.2.3-korg