<div dir="ltr">FWIW: I&#39;ve tried to use runqemu for first time (using my own scripts until now).<div><br></div><div>And this example doesn&#39;t work for me, the tunctl binary is here:</div><div><br><div><div>OE @ /OE/openembedded-core # find /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/sysroot-providers</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/sysroot-providers/qemu-helper-native</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin/tunctl</div></div><div><br></div><div>But the script still complains that it cannot find tunctl:</div><div><br></div><div><div>OE @ /OE/openembedded-core # ./scripts/runqemu-gen-tapdevs 1026 1026 4 /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/</div><div>Note: Destroying pre-existing tap interface tap0...</div><div>TUNSETIFF: Device or resource busy</div><div>Creating 4 tap devices for UID: 1026 GID: 1026...</div><div>Creating tap0</div><div>Error running tunctl: Error: Unable to find tunctl binary in &#39;/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/&#39;, please bitbake qemu-helper-native</div></div></div><div><br></div><div>The message is actually from runqemu-ifup, which is called from runqemu-gen-tapdevs as:</div><div>++ ./scripts/runqemu-ifup 1026 1026 /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/<br></div><div><br></div><div>But runqemu-ifup expects 3rd parameter to be STAGING_BINDIR_NATIVE directly not just SYSROOT dir</div><div>STAGING_BINDIR_NATIVE=$3<br></div><div>because tunctl is then used as:</div><div>TUNCTL=$STAGING_BINDIR_NATIVE/tunctl<br></div><div><br></div><div>It looks like it got broken by:</div><div><div>commit cc5513bf7a6114e14bb307acb88a44e9cf0aed8a</div><div>Author: Ed Bartosh &lt;<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>&gt;</div><div>Date:   Wed Apr 12 23:40:59 2017 +0300</div><div><br></div><div>    runqemu: use bindir_native property to run ifup/down scripts</div><div>    </div><div>    Used self.bindir_native to point out to the native sysroot</div><div>    when running runqemu-ifup and runqemu-ifdown scripts.</div><div>    </div><div>    [YOCTO #11266]</div><div>    [YOCTO #11193]</div><div>    </div><div>    Signed-off-by: Ed Bartosh &lt;<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>&gt;</div><div>    Signed-off-by: Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt;</div></div><div><br></div><div>Seemingly obvious fix would be to call runqemu-gen-tapdevs with path to STAGING_BINDIR_NATIVE in 4th parameter as well, but that won&#39;t work, because runqemu-gen-tapdevs checks for TUNCTL=$SYSROOT/usr/bin/tunctl</div><div><br></div><div><div>OE @ /OE/openembedded-core # ./scripts/runqemu-gen-tapdevs 1026 1026 4 /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin/</div><div>Error: /OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin//usr/bin/tunctl is not an executable</div></div><div><br></div><div>I&#39;m sending a fix for this, but as I said it&#39;s first time I&#39;ve tried to use this, so maybe this all was supposed to work somehow differently - or it isn&#39;t tested at all as it is now.</div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 10, 2017 at 1:58 PM, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Figuring how the correct commandline isn&#39;t trivial, improve the help<br>
text with RSS in mind.<br>
<br>
Signed-off-by: Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@<wbr>linuxfoundation.org</a>&gt;<br>
---<br>
 scripts/runqemu-gen-tapdevs | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs<br>
index bfb60f4..9e5e5b9 100755<br>
--- a/scripts/runqemu-gen-tapdevs<br>
+++ b/scripts/runqemu-gen-tapdevs<br>
@@ -28,6 +28,8 @@ usage() {<br>
        echo &quot;Where &lt;gid&gt; is the numeric group id the tap devices will be owned by&quot;<br>
        echo &quot;&lt;num&gt; is the number of tap devices to create (0 to remove all)&quot;<br>
        echo &quot;&lt;native-sysroot-basedir&gt; is the path to the build system&#39;s native sysroot&quot;<br>
+       echo &quot;e.g. $ bitbake qemu-helper-native -c addto_recipe_sysroot&quot;<br>
+       echo &quot;$ sudo $0 1000 1000 4 tmp/work/x86_64-linux/qemu-<wbr>helper-native/*/recipe-<wbr>sysroot-native/&quot;<br>
        exit 1<br>
 }<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.7.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br></div>