summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-10-01 08:03:19 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-10-01 08:03:19 +0200
commit613c34100e5f4ef8c3d4c63bc8749faae39a4df8 (patch)
treeb6e349d9cbf1df0e3cd8637362be04fceaeeb67f
parentDELAY(): Use rtems_counter_delay_nanoseconds() (diff)
downloadrtems-libbsd-613c34100e5f4ef8c3d4c63bc8749faae39a4df8.tar.bz2
doc: Add Qemu network setup
-rw-r--r--libbsd.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/libbsd.txt b/libbsd.txt
index a4368069..ebb766c9 100644
--- a/libbsd.txt
+++ b/libbsd.txt
@@ -324,6 +324,55 @@ command supports the -m flag to set/get the multicast hostname of the
mDNS resolver instance. See also rtems_mdns_sethostname() and
rtems_mdns_gethostname().
+== Qemu
+
+Use the following script to set up a virtual network with three tap devices
+connected via one bridge device.
+
+-------------------------------------------------------------------------------
+#!/bin/sh -x
+
+user=`whoami`
+interfaces=(1 2 3)
+
+tap=qtap
+bri=qbri
+
+case $1 in
+ up)
+ sudo -i brctl addbr $bri
+ for i in ${interfaces[@]} ; do
+ sudo -i tunctl -t $tap$i -u $user ;
+ sudo -i ifconfig $tap$i up ;
+ sudo -i brctl addif $bri $tap$i ;
+ done
+ sudo -i ifconfig $bri up
+ ;;
+ down)
+ for i in ${interfaces[@]} ; do
+ sudo -i ifconfig $tap$i down ;
+ sudo -i tunctl -d $tap$i ;
+ done
+ sudo -i ifconfig $bri down
+ sudo -i brctl delbr $bri
+ ;;
+esac
+-------------------------------------------------------------------------------
+
+Connect your Qemu instance to one of the tap devices, e.g.
+
+-------------------------------------------------------------------------------
+qemu-system-i386 -m 512 -boot a -cpu pentium3 \
+ -drive file=$HOME/qemu/pc386_fda,index=0,if=floppy,format=raw \
+ -drive file=fat:$HOME/qemu/hd,format=raw \
+ -net nic,model=e1000,macaddr=0e:b0:ba:5e:ba:11 \
+ -net tap,ifname=qtap1,script=no,downscript=no \
+ -nodefaults -nographic -serial stdio
+-------------------------------------------------------------------------------
+
+Make sure that each Qemu instance uses its own MAC address to avoid an address
+conflict (or otherwise use it as a test).
+
== Issues and TODO
* PCI support on x86 uses a quick and dirty hack, see pci_reserve_map().