Commit Graph

14 Commits

Author SHA1 Message Date
Ed Bartosh 4393cc550b 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]

(From OE-Core rev: cc5513bf7a6114e14bb307acb88a44e9cf0aed8a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Mariano Lopez 835525c8bb runqemu-ifup: Check if the tap interface is set up correctly
The process to set up a tap interface is as follows:
    - tap interface is created
    - An IP address is assigned to the tap interface
    - The interface is bring up
    - A route is added to the target using the tap
      interface

Of all the previous steps, only the first one is
check if it was sucessful. The status of the others
are ignored and all of them are required to have
basic connectivity in the target.

This patch adds the checks for the rest of the stpes
needed to set up the tap interface.

[YOCTO #8550]

(From OE-Core rev: 52f6bacffc517198f0d1f24e5418ee4c9cb5442a)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-27 07:24:28 +00:00
Ross Burton 26ce13ba62 runqemu-ifup: when tunctl can't be found, say what package builds it
If runqemu is used without actually building any qemu images (i.e. you
downloaded the images) it's likely that qemu-helper-native hasn't been built.
Instead of just saying what command can't be found, tell the user how to solve
their problem.

(From OE-Core rev: 45f80a0c46035dc73818ce4bd818a4f6197d954f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 11:47:17 +01:00
Laurentiu Palcu 4462df6a51 runqemu: fix networking issues
After switching from ifconfig to ip, networking stopped working. This
commit contains the following fixes:

 * set a decent broadcast address for the tap device;
 * bring up the device;
 * add the route using ip tool instead of the old route tool;

(From OE-Core rev: a286514e2311f52b54d3571dbac6d34aff39e591)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:43 +01:00
Khem Raj 4520feca65 runqemu: Replace use of ifconfig with ip
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 <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:47 +03:00
Scott Garman 64791642d4 runqemu-ifup: enable arp proxying
This allows core-image-sato to access the WAN.

Thanks to Dexuan Cui for proposing this fix.

Fixes [YOCTO #2329]

(From OE-Core rev: d294b1bddece429f2639676ddc97d2896fc58916)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:20 +01:00
Jason Wessel 76551e02ed runqemu: Fix TAP='TUNSETGROUP: Invalid argument' by falling back to tunctl -u
By default the runqemu script tries to set the group permissions on any
tap device it creates.  The TUNSETGROUP ioctl is not implemented on some
popular host enterprise linux distributions.

Internally the script will exit as follows:

++ /opt/qemux86/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/tunctl -b -g 100
+ TAP='TUNSETGROUP: Invalid argument'
+ STATUS=1
+ '[' 1 -ne 0 ']'
+ echo 'tunctl failed:'
tunctl failed:
+ echo TUNSETGROUP: Invalid argument

This patch implements a fallback to using the userid as the owner of
the tap device which is supported by all 2.6 kernels, the default remains
to try and use the groupid first.

(From OE-Core rev: 3af2bc59776fb738bd795160512a2f3f49ce6d32)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-03 15:48:09 +01:00
Scott Garman 0f95925b4c runqemu-ifup: enable ip masquerading for QEMU NAT addresses
Fix the IP masquerading settings so that networked QEMU sessions can
reach external networks.

This is a partial fix for [YOCTO #2329].

(From OE-Core rev: 14c4ce77b5c3738a8a9ea7d724de7ce9efff18c4)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-26 10:05:17 +01:00
Richard Purdie faac9eda28 scripts/runqemu-ifup: Ensure netmask is set correctly
Without this the command will add a route for the subnet 192.168.7.0 which
means multiple qemu instances can't operate correctly since all but the last
one will be masked out.

(From OE-Core rev: 9e00d6b343120496ec0dd72240c7b04e0a8b7eaa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-12 13:37:28 +00:00
Richard Purdie d1a84c9f3d scripts: Show sensible warning messages if expected binaries don't exist
[YOCTO #1438]

(From OE-Core rev: 6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-02 14:21:30 +01:00
Richard Purdie c0df2ab7eb scripts: Don't show errors from which ifconfig failing
(From OE-Core rev: 06625096f897235ed85f0d9a1355497f92938454)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-02 14:21:29 +01:00
Richard Purdie 65f4b65410 Further cleanup of various poky references
(From OE-Core rev: fe73ea8c510877fe4e3c117985e8f3d0b79ddf1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 12:56:16 +01:00
Richard Purdie 2c2e61743c Rename the remaining poky-* scripts to oe-* or runqemu-*
(From OE-Core rev: 877b3d84597fcfc3abf5aa332019d412f2717896)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:31 +01:00
Richard Purdie 08127d444e Rename poky-qemu to runqemu
(From OE-Core rev: 7687d91f73f4a116593315b3b1488ac3f0904905)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:29 +01:00