[OE-core] [PATCH 0/3] runqemu: support different net modes

Adrian Freihofer adrian.freihofer at gmail.com
Mon Jun 22 11:56:06 UTC 2015


runqemu runs qemu with one emulated NIC. The host is configured to work
as a NAT router for this emulated NIC. The virtual device is connected
to the Internet by default. This network mode is fine if a standalone
device needs to be developed and tested.
Today's M2M/IoT applications demand for devices with extended network
capabilities. To develop connectivity related features a bridged network
setup is much better suited than the supported NAT setup. A bridged setup
allows to virtualize the device under test/development as well as a reference
implementation of a cloud server. If the cloud server is part of the virtual
test setup ptests and image tests for connectivity verification are possible.

Tutorial to run a M2M test and development setup:
1. Prepare the host for the 192.168.7.x connection. The "tap0" device is for
   debugging purpose only. It is created by: "runquem-gen-tapdevs ... noinet"
2. Prepare the host for a second interface emulated by qemu. Setup a bridge
   and a tap device e.g. tap-inet0 which is connected to the bridge.
3. Run the virtual device with two emulated NICs:
   runqemu noinet ... qemuparams="-device virtio-net-pci,netdev=tap-inet0 ..."
4. Run another qemu instance and tap device for the reference cloud server.
5. Run a ptest to verify the connection between device and cloud server

This patch-set provides minimal changes to poky which are required to run a
setup as described above. These patches do not provide extended implementations
of runquem-gen-tapdevs, runqemu or a script to run a virtual reference server.
This still needs to be implemented by the user. However, with the patch-set the
user is enabled to do so without hacking in the poky folder.

Adrian Freihofer (3):
  connman: fix qemu config
  runqemu: add support for multiple NICs
  runqemu: support different net modes

 meta/recipes-connectivity/connman/connman-conf.bb  |  2 +-
 .../connman/connman-conf/qemuall/wired-setup       |  6 ++--
 scripts/runqemu                                    |  5 +++
 scripts/runqemu-gen-tapdevs                        | 11 ++++---
 scripts/runqemu-ifdown                             | 33 +++++++++++--------
 scripts/runqemu-ifup                               | 38 +++++++++++++---------
 scripts/runqemu-internal                           | 13 +++++---
 7 files changed, 68 insertions(+), 40 deletions(-)

-- 
2.4.3




More information about the Openembedded-core mailing list