diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-10-01 08:03:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-10-01 08:03:19 +0200 |
commit | 613c34100e5f4ef8c3d4c63bc8749faae39a4df8 (patch) | |
tree | b6e349d9cbf1df0e3cd8637362be04fceaeeb67f | |
parent | DELAY(): Use rtems_counter_delay_nanoseconds() (diff) | |
download | rtems-libbsd-613c34100e5f4ef8c3d4c63bc8749faae39a4df8.tar.bz2 |
doc: Add Qemu network setup
-rw-r--r-- | libbsd.txt | 49 |
1 files changed, 49 insertions, 0 deletions
@@ -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(). |