<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11283</bug_id>
          
          <creation_ts>2017-03-31 18:47:42 +0000</creation_ts>
          <short_desc>wic: allow wic to update a kernel or bootloader in a disk image</short_desc>
          <delta_ts>2017-06-14 09:51:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stephano Cetola">stephano</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>brian.avery</cc>
    
    <cc>california.l.sullivan</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>stephano</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71977</commentid>
    <comment_count>0</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-03-31 18:47:42 +0000</bug_when>
    <thetext>Often, especially when doing board bring-up, modifications to the kernel must happen at a fast pace. This often requires burning the disk image to some medium (uSD card) and booting the board numerous times.

Wic should be able to update an existing image with a new bootloader and/or kernel without having to rebuild the entire rootfs.

We can assume that the user has sudo, however if you can find a way to do this without sudo, Brian will buy you a round confectionery present.

e.g.
wic --update-kernel &lt;kernel_path&gt;  image.wic
wic --update-bootloader &lt;bootloader_path&gt; image.wic</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73160</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-05-10 11:26:40 +0000</bug_when>
    <thetext>As boot partition is usually msdos/vfat type it should be possible to use mtools https://www.gnu.org/software/mtools/manual/mtools.html for this task.
This would allow users to update files on boot vfat partition without mounting the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73203</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-05-11 15:43:17 +0000</bug_when>
    <thetext>here is a list of new wic commands I ended up with:

1. copy files or directories to/from vfat partition of the image:

wic copy &lt;src&gt; &lt;dst&gt;

   - copy file or directory to the image:
     wic cp [-r] &lt;local path&gt; &lt;image path&gt;:&lt;partition number&gt;/&lt;path&gt;

   - copy file or directory from the image:
     wic cp [-r] &lt;image path&gt;:&lt;partition number&gt;/&lt;path&gt; &lt;local path&gt;

2. list partitions:
wic ls &lt;image path&gt;

3. list files on vfat partition:
wic ls &lt;image path&gt;:&lt;partition number&gt;/&lt;path&gt;

4. remove files/directories from vfat partition:

wic rm [-r] &lt;image path&gt;:&lt;partition number&gt;/&lt;path&gt;

Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73260</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-05-15 14:22:02 +0000</bug_when>
    <thetext>Implemented &apos;wic ls&apos;: http://lists.openembedded.org/pipermail/openembedded-core/2017-May/136678.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73527</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-05-26 09:22:59 +0000</bug_when>
    <thetext>implemented &apos;wic cp&apos;: http://lists.openembedded.org/pipermail/openembedded-core/2017-May/137118.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73650</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-02 17:22:40 +0000</bug_when>
    <thetext>implemented &apos;wic rm&apos;: http://lists.openembedded.org/pipermail/openembedded-core/2017-June/137500.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74138</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-14 09:51:02 +0000</bug_when>
    <thetext>merged to poky master. commit id: 1de1a34a64d2e34d438f6d24adbd70a62366dab7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>