<?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>10447</bug_id>
          
          <creation_ts>2016-10-17 22:59:51 +0000</creation_ts>
          <short_desc>eSDK: runqemu fails unless unless DEPLOY_DIR_IMAGE is set</short_desc>
          <delta_ts>2017-04-19 10:08:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>eSDK</product>
          <component>eSDK</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>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>joe.konno</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>yi.zhao</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67315</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-10-17 22:59:51 +0000</bug_when>
    <thetext>Expected Behavior
-----------------
Install qemux86 eSDK
Build and run qemu image

Observed Behavior
-----------------
Install qemux86 eSDK
Build qemu image
qemu session fails to start

$ runqemu
runqemu - INFO - Assuming MACHINE = qemux86
runqemu - INFO - Can&apos;t find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!
runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
runqemu - INFO - Overriding conf file setting of STAGING_DIR_NATIVE to /home/hbruce/Tools/yocto/qemux86-ext-2.2/tmp/sysroots/x86_64-linux from Bitbake environment
runqemu - INFO - Overriding conf file setting of STAGING_BINDIR_NATIVE to /home/hbruce/Tools/yocto/qemux86-ext-2.2/tmp/sysroots/x86_64-linux/usr/bin from Bitbake environment
Traceback (most recent call last):
  File &quot;/home/hbruce/Tools/yocto/qemux86-ext-2.2/layers/poky/scripts/runqemu&quot;, line 1019, in &lt;module&gt;
    ret = main()
  File &quot;/home/hbruce/Tools/yocto/qemux86-ext-2.2/layers/poky/scripts/runqemu&quot;, line 1007, in main
    config.check_and_set()
  File &quot;/home/hbruce/Tools/yocto/qemux86-ext-2.2/layers/poky/scripts/runqemu&quot;, line 559, in check_and_set
    self.check_fstype()
  File &quot;/home/hbruce/Tools/yocto/qemux86-ext-2.2/layers/poky/scripts/runqemu&quot;, line 451, in check_fstype
    raise Exception(&quot;FSTYPE is NULL!&quot;)
Exception: FSTYPE is NULL!
[hbruce@hbruce-desk3 qemux86-ext-2.2]$ . environment-setup-i586-poky-linux 

Workaround
----------
Manually set DEPLOY_DIR_IMAGE
DEPLOY_DIR_IMAGE=/path/to/esdk/tmp/deploy/images/qemux86 runqemu qemux86

Steps to reproduce
------------------
1. Build core-image-minimal image with MACHINE=qemux86
2. Build minimal extensible SDK installer
3. Install eSDK
4. Start eSDK session by running &apos;source environment-setup-i586-poky-linux&apos;
4. Build image with &apos;devtool build-image&apos;
5. Start qemu session with &apos;runqemu qemux86&apos;

An example eSDK installer can be found at http://downloads.yoctoproject.org/tools/support/workflow/poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-2.2.sh</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67318</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-18 02:54:38 +0000</bug_when>
    <thetext>Fix sent. The new runqemu script is making an assumption it should not - and not handling the error particularly well - but I think at this stage that&apos;s something we will have to fix later. For now the patch I&apos;ve sent resolves the issue within the eSDK (although if you were to run runqemu directly, as you now can in master/morty by virtue of the fix to allow the Eclipse plugin to work, then it&apos;ll still be a problem).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67400</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-20 01:55:43 +0000</bug_when>
    <thetext>*** Bug 10465 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67608</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-26 19:45:39 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=a8169807e85457d90016522a6eb7113c9159ec18

And morty:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=morty&amp;id=2c0efd2f33fc152546128f9361e71d0dc93a90d5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67685</commentid>
    <comment_count>4</comment_count>
    <who name="Francisco Pedraza">francisco.j.pedraza.gonzalez</who>
    <bug_when>2016-10-27 21:45:08 +0000</bug_when>
    <thetext>Tested on morty and Failed
I followed this Steps to reproduce
------------------
1. Build core-image-minimal image with MACHINE=qemux86
2. Build minimal extensible SDK installer
3. Install eSDK
4. Start eSDK session by running &apos;source environment-setup-i586-poky-linux&apos;
4. Build image with &apos;devtool build-image&apos;
5. Start qemu session with &apos;runqemu qemux86&apos;

and I got the same error message:
raise Exception(&quot;FSTYPE is NULL!&quot;)
Exception: FSTYPE is NULL!
Regards,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67687</commentid>
    <comment_count>5</comment_count>
    <who name="Francisco Pedraza">francisco.j.pedraza.gonzalez</who>
    <bug_when>2016-10-27 21:55:27 +0000</bug_when>
    <thetext>Failed on morty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67696</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-27 22:19:00 +0000</bug_when>
    <thetext>Which morty revision did you test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67720</commentid>
    <comment_count>7</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2016-10-28 12:20:24 +0000</bug_when>
    <thetext>I&apos;m seeing same failure on master commit: e5815d0b607ff262663864d51fe51fbb37172329</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67845</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-01 22:50:24 +0000</bug_when>
    <thetext>Sigh. So it turns out I didn&apos;t quite read the bug properly - this is talking about running runqemu directly, which until recently wasn&apos;t even possible (we had to allow it in order for the Eclipse plugin to work - but I believe it runs it with arguments such that this problem doesn&apos;t occur). However if you read my comment above I did say that running runqemu directly would still cause this issue to happen. If you want to run qemu in the eSDK from the command line, the recommended way to do it is &quot;devtool runqemu&quot; which is what I fixed. So there is a way to do it that works. Alternatively you should be able to run it directly if you give it the full path to the image.

Where does this leave us with this bug though? Running runqemu this way *should* work. The problem is the newly rewritten script is assuming it cannot run bitbake to get DEPLOY_DIR_IMAGE when that&apos;s not actually true in the eSDK. To compound things, it quite clearly does run bitbake later on so there is a disconnect in the logic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67847</commentid>
    <comment_count>9</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-01 22:55:25 +0000</bug_when>
    <thetext>BTW, I also entered bug 10471. Depending on how that is resolved it may end up fixing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67852</commentid>
    <comment_count>10</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-11-02 03:10:40 +0000</bug_when>
    <thetext>When I first reported the bug, I saw the same behavior in &apos;runqemu&apos; and &apos;devtool runquemu&apos;. I reported the &apos;runqemu&apos; variation as I assumed that was closer to the root cause.

I&apos;m OK with only having &apos;devtool runquemu&apos; work, but if we take that option &apos;runqemu&apos; should fail with a &quot;don&apos;t run me directly&quot; error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67853</commentid>
    <comment_count>11</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-02 03:20:17 +0000</bug_when>
    <thetext>I do agree, running runqemu directly should be made to work especially as it&apos;s now easily accessible. I just wanted to make sure people have a full understanding of what&apos;s going on and that there&apos;s a workaround.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72641</commentid>
    <comment_count>12</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-04-19 08:58:12 +0000</bug_when>
    <thetext>I&apos;ve send a patch working around this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72646</commentid>
    <comment_count>13</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-04-19 10:08:02 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=9e267ad1739d460127e4c7ab71e886e0b1f153a1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>