<?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>13336</bug_id>
          
          <creation_ts>2019-05-07 10:41:39 +0000</creation_ts>
          <short_desc>runqemu: support non bootable wic images</short_desc>
          <delta_ts>2019-06-16 14:24:40 +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>unspecified</version>
          <rep_platform>All</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.8 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Freihofer">adrian.freihofer</reporter>
          <assigned_to name="Adrian Freihofer">adrian.freihofer</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>83729</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Freihofer">adrian.freihofer</who>
    <bug_when>2019-05-07 10:41:39 +0000</bug_when>
    <thetext>runqemu supports two types of images:
- fsimages: rootfs only
- vmimages: bootloader, kernel, rootfs

wic images are handled as vmtype images. Hence, wic images without bootloader and kernel are not supported. However, it is totally fine to create a wic image which is of type fstype.

This patch http://lists.openembedded.org/pipermail/openembedded-core/2019-April/281223.html allows to add QB_DEFAULT_FSTYPE = &quot;wic-nb&quot; to the machine configuration and to boot a wic image without bootloader and kernel.

Are there any concerns or suggestions about the implementation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84053</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Freihofer">adrian.freihofer</who>
    <bug_when>2019-06-04 09:00:41 +0000</bug_when>
    <thetext>One more note: I also thought about extending wic to automatically detect if there is a bootloader in the image and automatically treat the image as fsimage or vmimage. But there are two arguments against it:
- It is possible that somebody wants to compile a vmimage for the real hardware, but still wants to boot this image in Qemu as an fsimage.
- There are many special cases, such as different bootloaders and partitioning schemas which are hard to detect reliably.

If I received a hint about what would be wrong with my implementation, I would try to provide an alternative implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84115</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Freihofer">adrian.freihofer</who>
    <bug_when>2019-06-08 08:25:03 +0000</bug_when>
    <thetext>A new implementation is available on the mailing list:
http://lists.openembedded.org/pipermail/openembedded-core/2019-June/283392.html

If QB_MACHINE contains &quot;-machine virt&quot;, runqemu treats the wic image as a fstype image. Otherwise, wic images are still treated as Vmtype images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84220</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Freihofer">adrian.freihofer</who>
    <bug_when>2019-06-16 14:24:40 +0000</bug_when>
    <thetext>It was solved by adding a new parameter QB_FSINFO. The parameter allows to pass e.g. &quot;wic:no-kernel-in-fs&quot; to runqemu. Further details can be found in the commit message.
https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0e4c79a7c4dae93fb1b12e8c0a59e8252e3f4b71</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>