Bug 12191 - need to document new wic features wic cp, wic rm, and wic ls.
Summary: need to document new wic features wic cp, wic rm, and wic ls.
Status: RESOLVED FIXED
Alias: None
Product: Development Manual
Classification: Documentation
Component: development (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M1
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 13 Oct 2017: RESOLVED
Depends on:
Blocks:
 
Reported: 2017-10-05 01:54 UTC by brian avery
Modified: 2017-10-14 16:57 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian avery 2017-10-05 01:54:39 UTC
There is alot of information in the help for the command. Also, I briefly show how these can be used in 
https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk
Comment 1 Scott Rifenbark 2017-10-11 22:46:56 UTC
Currently working this stuff.  Had to do a lot of other stuff to the Wic-related documentation.
Comment 2 Scott Rifenbark 2017-10-13 15:54:50 UTC
Setting this to NEEDINFO since the example I put in to document Wic ls, rm, and cp does not work.  Need Brian or someone to figure out what is wrong and then I can update the doc.

See http://www.yoctoproject.org/docs/2.4/dev-manual/dev-manual.html#using-wic-to-manipulate-an-image for the example in the dev-manual.

Scott
Comment 3 brian avery 2017-10-13 19:40:14 UTC
So, this worked fine for me:
off of 
BB_VERSION        = "1.35.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "2.4"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    = "master:96967261993f8b583b51cdeccbb1fd06042d2192"
+++++
Command sequence:
bitbake core-image-base
$ wic ls tmp/deploy/images/qemux86-64/core-image-base-qemux86-64.wic:1
$ wic rm tmp/deploy/images/qemux86-64/core-image-base-qemux86-64.wic:1/vmlinuz
$ wic ls tmp/deploy/images/qemux86-64/core-image-base-qemux86-64.wic:1/vmlinuz
ERROR: _exec_cmd: /usr/bin/mdir -i /tmp/wic-partorr5t734 ::vmlinuz returned '1' instead of 0
output: /usr/bin/mdir: File "::vmlinuz" not found
$ devtool modify linux-yocto
$emacs -nw workspace/sources/linux-yocto/init/calibrate.c
 -- added printk to calibrate_delay
$ devtool build linux-yocto
$ wic cp tmp/work/qemux86_64-poky-linux/linux-yocto/4.12.12+git999-r0/linux-yocto-4.12.12+git999/arch/x86/boot/bzImage tmp/deploy/images/qemux86-64/core-image-base-qemux86-64.wic:1/vmlinuz
$ wic ls tmp/deploy/images/qemux86-64/core-image-base-qemux86-64.wic:1/vmlinuz     
Volume in drive : is boot       
 Volume Serial Number is 7539-E70E
Directory for ::/

vmlinuz        7397936 2017-10-13  12:35 
        1 file            7 397 936 bytes
                         16 582 656 bytes free
$  runqemu wic kvm nographic
dmesg | grep BAV
[    0.002003] BAVERY INIT FU
So, my new kernel + changes did get included in the wic image.

Assiging it back to scott. ping me if more info needed.
Comment 4 brian avery 2017-10-13 19:46:25 UTC
also, additional comment:
CURRENT:
If you see the following error, you need to update or create a ~/.mtoolsrc with the suggested statement and then run the Wic command again:
SUGGEST:
If you see the following error, you need to update or create a ~/.mtoolsrc containing the line “mtools_skip_check=1“  and then run the Wic command again:
+++++++
Comment 5 Scott Rifenbark 2017-10-13 19:52:12 UTC
I am setting this bug to RESOLVED as Brian proved the critical wic commands worked.  We therefore have documented their use.  Putting the doc flag to "done" as well. 

thanks 
Scott
Comment 6 Scott Rifenbark 2017-10-13 19:57:03 UTC
Brian, 

See step 2 of http://www.yoctoproject.org/docs/2.4/dev-manual/dev-manual.html#using-wic-to-manipulate-an-image for that last minute change in the note.  

Scott
Comment 7 brian avery 2017-10-14 16:57:40 UTC
looks good to me