<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/runqemu-gen-tapdevs, branch pyro-nfvaccess</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=pyro-nfvaccess</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=pyro-nfvaccess'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2017-04-29T10:17:22+00:00</updated>
<entry>
<title>runqemu-gen-tapdevs: fix runqemu-ifup script call</title>
<updated>2017-04-29T10:17:22+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2017-04-27T20:53:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9784ad79a4d0b75507f1bdff8454e86aabb8f759'/>
<id>urn:sha1:9784ad79a4d0b75507f1bdff8454e86aabb8f759</id>
<content type='text'>
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 &lt;ed.bartosh@linux.intel.com&gt;
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 &lt;ed.bartosh@linux.intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

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've tested that with this change it can call 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
Note: Destroying pre-existing tap interface tap0...
TUNSETIFF: Device or resource busy
Creating 4 tap devices for UID: 1026 GID: 1026...
Creating tap0
Creating tap1
Creating tap2
Creating tap3
Note: For systems running NetworkManager, it's recommended
Note: that the tap devices be set as unmanaged in the
Note: NetworkManager.conf file. Add the following lines to
Note: /etc/NetworkManager/NetworkManager.conf
[keyfile]
unmanaged-devices=interface-name:tap*

but runqemu itself still doesn't work for me:
OE qemux86@ ~/build/oe-core $ runqemu
runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
runqemu - INFO - Running ls -t /OE/build/oe-core/tmp-glibc/deploy/images/qemux86/*.qemuboot.conf...
runqemu - INFO - CONFFILE: /OE/build/oe-core/tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427174052.qemuboot.conf
runqemu - INFO - Overriding conf file setting of STAGING_DIR_NATIVE to /OE/build/oe-core/tmp-glibc/work/i586-oe-linux/defaultpkgname/1.0-r0/recipe-sysroot-native from Bitbake environment
runqemu - INFO - Continuing with the following parameters:

KERNEL: [tmp-glibc/deploy/images/qemux86/bzImage--4.10.9+git0+ad2e885015_fe0fb8da3d-r0.2-qemux86-20170427085800.bin]
MACHINE: [qemux86]
FSTYPE: [ext4]
ROOTFS: [tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427174052.rootfs.ext4]
CONFFILE: [/OE/build/oe-core/tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427174052.qemuboot.conf]

runqemu - INFO - Running /bin/ip link...
runqemu - INFO - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock...
runqemu - INFO - Using preconfigured tap device tap0
runqemu - INFO - If this is not intended, touch /tmp/qemu-tap-locks/tap0.skip to make runqemu skip tap0.
runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255.255.255.0
runqemu - INFO - Running ldd tmp-glibc/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-i386...
runqemu - INFO - Running tmp-glibc/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-i386 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427174052.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci   -cpu qemu32 -m 256 -serial mon:vc -serial null -kernel tmp-glibc/deploy/images/qemux86/bzImage--4.10.9+git0+ad2e885015_fe0fb8da3d-r0.2-qemux86-20170427085800.bin -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 '
qemu-system-i386: -netdev tap,id=net0,ifname=tap0,script=no,downscript=no: could not configure /dev/net/tun (tap0): Device or resource busy
runqemu - INFO - Releasing lockfile for tap device 'tap0'
Traceback (most recent call last):
  File "/OE/build/oe-core/openembedded-core/scripts/runqemu", line 1235, in &lt;module&gt;
    ret = main()
  File "/OE/build/oe-core/openembedded-core/scripts/runqemu", line 1228, in main
    config.start_qemu()
  File "/OE/build/oe-core/openembedded-core/scripts/runqemu", line 1139, in start_qemu
    raise Exception('Failed to run %s' % cmd)
Exception: Failed to run tmp-glibc/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-i386 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=tmp-glibc/deploy/images/qemux86/core-image-sato-qemux86-20170427174052.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci   -cpu qemu32 -m 256 -serial mon:vc -serial null -kernel tmp-glibc/deploy/images/qemux86/bzImage--4.10.9+git0+ad2e885015_fe0fb8da3d-r0.2-qemux86-20170427085800.bin -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 '

(From OE-Core rev: a31b1434c5f1edbd4e8faca813b4f084297c061d)

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu-gen-tapdevs: fix file path in example</title>
<updated>2017-03-24T23:43:32+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2017-03-23T03:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=11b81e3fbaf2c1114fa9472279575b4af1d45879'/>
<id>urn:sha1:11b81e3fbaf2c1114fa9472279575b4af1d45879</id>
<content type='text'>
Fix the path in example so that '/usr/bin/tunctl' could be found under
this path.

(From OE-Core rev: d1b8e1460b25018ac8f65d3647bc736f3393ed3e)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu-gen-tapdevs: Improve help text with an example</title>
<updated>2017-03-10T14:50:11+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-03-10T12:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0efe58df2e5389f86dfbd53f90afc8f2970def7d'/>
<id>urn:sha1:0efe58df2e5389f86dfbd53f90afc8f2970def7d</id>
<content type='text'>
Figuring how the correct commandline isn't trivial, improve the help
text with RSS in mind.

(From OE-Core rev: 056a9da9f3ac2bc175f19243b11864ca90eee28b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu-gen-tapdevs: remove /etc/runqemu-nosudo when remove taps</title>
<updated>2016-09-20T14:11:08+00:00</updated>
<author>
<name>Robert Yang</name>
<email>liezhi.yang@windriver.com</email>
</author>
<published>2016-09-19T09:18:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fbb99b22f91462b14ee8a6d1a4de76875828a721'/>
<id>urn:sha1:fbb99b22f91462b14ee8a6d1a4de76875828a721</id>
<content type='text'>
It creats /etc/runqemu-nosudo when creats taps, so should remove it when
remove taps.

(From OE-Core rev: 3d4bf5b0ea581e3e9b388328b086d03f9174fd61)

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu-gen-tapdevs: Add note about NetworkManager &amp; tap devices</title>
<updated>2016-04-06T21:57:26+00:00</updated>
<author>
<name>Saul Wold</name>
<email>sgw@linux.intel.com</email>
</author>
<published>2016-04-05T00:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=60786b8d90062beaa55c941075496b723eb2b4d7'/>
<id>urn:sha1:60786b8d90062beaa55c941075496b723eb2b4d7</id>
<content type='text'>
NetworkManager can clobber tap devices if left alone, this gives a
note about how to set tap* as unmanaged

[YOCTO #8587]

(From OE-Core rev: 503a80de1cc9097fdc8f6b5b7d0e3a3991b0ecd2)

Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: Replace use of ifconfig with ip</title>
<updated>2013-05-15T21:09:47+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2013-05-13T05:42:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4520feca657ac543267b4c8840e57bb32baf18c3'/>
<id>urn:sha1:4520feca657ac543267b4c8840e57bb32baf18c3</id>
<content type='text'>
ifconfig and its ilk (net-tools package) is deprecated in favour of iproute2 package
and is now removed by many distro's e.g. Archlinux. So we replace ifconfig with ip utility

(From OE-Core rev: c19e5d19ae8e6e6eb9b37549d80765b8315f79a4)

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: work with tap device names that end with a colon</title>
<updated>2012-09-24T10:30:36+00:00</updated>
<author>
<name>Scott Garman</name>
<email>scott.a.garman@intel.com</email>
</author>
<published>2012-09-21T22:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e46be72a8e5d064b4b46d5b0c37d67bbb2ccae55'/>
<id>urn:sha1:e46be72a8e5d064b4b46d5b0c37d67bbb2ccae55</id>
<content type='text'>
On Fedora systems (and likely others), ifconfig returns interface
names that end with a colon. Make sure we strip the colon off the
tap device name before using it.

This fixes [YOCTO #3028]

(From OE-Core rev: 85ed217b603a86113dda11d952850e8ceed30795)

Signed-off-by: Scott Garman &lt;scott.a.garman@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu-gen-tapdevs: add UID to CL options</title>
<updated>2012-08-02T22:01:34+00:00</updated>
<author>
<name>Elizabeth Flanagan</name>
<email>elizabeth.flanagan@intel.com</email>
</author>
<published>2012-07-31T18:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dee07308c170afca44748aebab768f461e6208ac'/>
<id>urn:sha1:dee07308c170afca44748aebab768f461e6208ac</id>
<content type='text'>
runqemu-if* now requires UID as a command line option which means
runqemu-gen-tapdevs needs to take it as an option.

(From OE-Core rev: a624ec02c4acec83efbe66406f22abafbdce5d63)

Signed-off-by: Elizabeth Flanagan &lt;elizabeth.flanagan@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts: Show sensible warning messages if expected binaries don't exist</title>
<updated>2011-09-02T13:21:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2011-09-01T21:04:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d1a84c9f3d387bfeaeaa0007dda8d90164633255'/>
<id>urn:sha1:d1a84c9f3d387bfeaeaa0007dda8d90164633255</id>
<content type='text'>
[YOCTO #1438]

(From OE-Core rev: 6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts: Don't show errors from which ifconfig failing</title>
<updated>2011-09-02T13:21:29+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2011-09-01T19:49:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c0df2ab7ebac5650e52089ada97e8657f8af3979'/>
<id>urn:sha1:c0df2ab7ebac5650e52089ada97e8657f8af3979</id>
<content type='text'>
(From OE-Core rev: 06625096f897235ed85f0d9a1355497f92938454)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
