[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core] [PATCH 3/3] runqemu-gen-tapdevs: Improve help text with an example
From: Martin Jansa <martin.jansa () gmail ! com>
Date: 2017-04-27 20:47:02
Message-ID: CA+chaQck0sU7Bcz5Hnr_34=PGsx4ngyQO+5w3dEu+xMm=G48BQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
FWIW: I've tried to use runqemu for first time (using my own scripts until
now).
And this example doesn't work for me, the tunctl binary is here:
OE @ /OE/openembedded-core # find
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/sysroot-providers
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/sysroot-providers/qemu-helper-native
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin/tunctl
But the script still complains that it cannot find tunctl:
OE @ /OE/openembedded-core # ./scripts/runqemu-gen-tapdevs 1026 1026 4
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/
Note: Destroying pre-existing tap interface tap0...
TUNSETIFF: Device or resource busy
Creating 4 tap devices for UID: 1026 GID: 1026...
Creating tap0
Error running tunctl: Error: Unable to find tunctl binary in
'/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/',
please bitbake qemu-helper-native
The message is actually from runqemu-ifup, which is called from
runqemu-gen-tapdevs as:
++ ./scripts/runqemu-ifup 1026 1026
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/
But runqemu-ifup expects 3rd parameter to be STAGING_BINDIR_NATIVE directly
not just SYSROOT dir
STAGING_BINDIR_NATIVE=$3
because tunctl is then used as:
TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
It looks like it got broken by:
commit cc5513bf7a6114e14bb307acb88a44e9cf0aed8a
Author: Ed Bartosh <ed.bartosh@linux.intel.com>
Date: Wed Apr 12 23:40:59 2017 +0300
runqemu: use bindir_native property to run ifup/down scripts
Used self.bindir_native to point out to the native sysroot
when running runqemu-ifup and runqemu-ifdown scripts.
[YOCTO #11266]
[YOCTO #11193]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Seemingly obvious fix would be to call runqemu-gen-tapdevs with path to
STAGING_BINDIR_NATIVE in 4th parameter as well, but that won't work,
because runqemu-gen-tapdevs checks for TUNCTL=$SYSROOT/usr/bin/tunctl
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/
Error:
/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/usr/bin//usr/bin/tunctl
is not an executable
I'm sending a fix for this, but as I said it's first time I've tried to use
this, so maybe this all was supposed to work somehow differently - or it
isn't tested at all as it is now.
Regards,
On Fri, Mar 10, 2017 at 1:58 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> Figuring how the correct commandline isn't trivial, improve the help
> text with RSS in mind.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> scripts/runqemu-gen-tapdevs | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
> index bfb60f4..9e5e5b9 100755
> --- a/scripts/runqemu-gen-tapdevs
> +++ b/scripts/runqemu-gen-tapdevs
> @@ -28,6 +28,8 @@ usage() {
> echo "Where <gid> is the numeric group id the tap devices will be
> owned by"
> echo "<num> is the number of tap devices to create (0 to remove
> all)"
> echo "<native-sysroot-basedir> is the path to the build system's
> native sysroot"
> + echo "e.g. $ bitbake qemu-helper-native -c addto_recipe_sysroot"
> + echo "$ sudo $0 1000 1000 4 tmp/work/x86_64-linux/qemu-
> helper-native/*/recipe-sysroot-native/"
> exit 1
> }
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[Attachment #5 (text/html)]
<div dir="ltr">FWIW: I've tried to use runqemu for first time (using my own \
scripts until now).<div><br></div><div>And this example doesn'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>/O \
E/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/sysroot-provid \
ers</div><div>/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-nativ \
e/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/sysroot \
s-components/x86_64/qemu-helper-native/usr/bin</div><div>/OE/build/oe-core/tmp-glibc/s \
ysroots-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 \
'/OE/build/oe-core/tmp-glibc/sysroots-components/x86_64/qemu-helper-native/', \
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 <<a \
href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>></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 <<a \
href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>></div><div> \
Signed-off-by: Richard Purdie <<a \
href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>></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'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'm sending a fix for this, \
but as I said it's first time I've tried to use this, so maybe this all was \
supposed to work somehow differently - or it isn'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"><<a href="mailto:richard.purdie@linuxfoundation.org" \
target="_blank">richard.purdie@linuxfoundation.org</a>></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't trivial, \
improve the help<br> text with RSS in mind.<br>
<br>
Signed-off-by: Richard Purdie <<a \
href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@<wbr>linuxfoundation.org</a>><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 "Where <gid> is the numeric group id the tap devices will \
be owned by"<br>
echo "<num> is the number of tap devices to create (0 to \
remove all)"<br>
echo "<native-sysroot-basedir> is the path to the build \
system's native sysroot"<br> + echo "e.g. $ bitbake \
qemu-helper-native -c addto_recipe_sysroot"<br> + echo "$ sudo $0 \
1000 1000 4 tmp/work/x86_64-linux/qemu-<wbr>helper-native/*/recipe-<wbr>sysroot-native/"<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>
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic