<?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>427</bug_id>
          
          <creation_ts>2010-10-11 13:16:07 +0000</creation_ts>
          <short_desc>poky-qemu fails when full path to rootfs image is given with -image- in its name</short_desc>
          <delta_ts>2010-12-21 06:07:17 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>0.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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>0.9 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott Garman">scott.a.garman</reporter>
          <assigned_to name="Scott Garman">scott.a.garman</assigned_to>
          <cc>dexuan.cui</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10327</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-10-11 13:16:07 +0000</bug_when>
    <thetext>This is one of the most common use scenarios, and needs an immediate fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10328</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-10-11 13:22:36 +0000</bug_when>
    <thetext>Fixed in http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/poky-qemu-fix-imgname</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10331</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-10-11 15:42:13 +0000</bug_when>
    <thetext>Fixed with commit 364aaa6dfa706a6fe4afc85b5688a02daab75b26</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10486</commentid>
    <comment_count>3</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2010-10-14 02:06:04 +0000</bug_when>
    <thetext>I can still see the issue based on today&apos;s poky.git&apos;s master (commit a2337a34358b017a3e4311a2647165da2d8b54d3) and poky-contrib.git&apos;s builds/milestone (commit 5783e717ee9f503d8e03992306a6b9ddfda6f73e).

How to reproduce it:
1) git clone git://git.pokylinux.org/poky.git poky.git
2) cd poky.gi, bitbake qemu-native, bitbake qemu qemu-helper-native;
3) try to boot the images downloaded from nightly build like this:

$ poky-qemu qemux86 /distro/dcui/rc1/images/qemux86/bzImage-2.6.34+git0+bfef596973ae436db9132065eaab2228c98f938b_0+0431115c9d720fee5bb105f6a7411efb4f851d26-r7-qemux86-20101011175855.bin /distro/dcui/rc1/images/qemux86//poky-image-sdk-qemux86-20101011192127.rootfs.ext3

Continuing with the following parameters:
KERNEL: [/distro/dcui/rc1/images/qemux86/bzImage-2.6.34+git0+bfef596973ae436db9132065eaab2228c98f938b_0+0431115c9d720fee5bb105f6a7411efb4f851d26-r7-qemux86-20101011175855.bin]
ROOTFS: [/distro/dcui/rc1/images/qemux86//poky-image-sdk-qemux86-20101011192127.rootfs.ext3]
FSTYPE: [ext3]
Acquiring lockfile for tap0...
Setting up tap interface under sudo
[sudo] password for dcui:
sudo /distro/dcui/rc1/p/scripts/..//scripts/poky-qemu-ifup &lt;gid&gt; &lt;native-sysroot-basedir&gt;

The issue is caued by: POKY_NATIVE_SYSROOT is not set at all in scripts/poky-qemu-internal. 364aaa6dfa706a6fe4afc85b5688a02daab75b26(poky-qemu: fix for handling full path to rootfs) added:

+if [[ -e &quot;$ROOTFS&quot; &amp;&amp; -z &quot;$FSTYPE&quot; ]]; then
+    # Extract the filename extension
+    EXT=`echo $ROOTFS | awk -F . &apos;{ print \$NF }&apos;`
+    if [[ &quot;x$EXT&quot; == &quot;xext2&quot; || &quot;x$EXT&quot; == &quot;xext3&quot; ||
+          &quot;x$EXT&quot; == &quot;xjffs2&quot; ]]; then
+        FSTYPE=$EXT
+    else
+        echo &quot;Note: Unable to determine filesystem extension for $ROOTFS&quot;
+        echo &quot;We will use the default FSTYPE for $MACHINE&quot;
+        # ...which is done further below...
+    fi
+fi

In my case, FSTYPE is set by this. As a result, setup_tmpdir() is not invoked at all and hence POKY_NATIVE_SYSROOT is not set. 
Currently I just commented the paragraph to work around the issue. I haven&apos;t had time to further debug and give a fix yet as I&apos;m busy with rc1 testing.

Hi Scott, could you please have a look?

BTW: looks only I met with the issue? Not sure why the others in the team didn&apos;t complain. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10502</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-10-14 12:18:51 +0000</bug_when>
    <thetext>Thanks for the good analysis, Dexuan. I have now fixed this in commit 	7d7d35f369c271a7b7cf517601d472ab2104297b.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10555</commentid>
    <comment_count>5</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-10-14 16:48:06 +0000</bug_when>
    <thetext>Tested with complete *-image-* on command line and it booted the correct image</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>