Changeset 39a650e in rtems-libbsd for libbsd.txt


Ignore:
Timestamp:
06/27/16 06:45:18 (8 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
9835790
Parents:
459d67d
Message:

Add VDE and QEMU doco.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libbsd.txt

    r459d67d r39a650e  
    409409dhclient qbri
    410410-------------------------------------------------------------------------------
     411
     412=== VDE and QEMU
     413
     414On FreeBSD you can create VDE or the Virtual Distributed Ethernet to create a
     415network environment that does not need to run qemu as root or needing to drop
     416the tap's privileges to run qemu.
     417
     418VDE creates a software switch with a default of 32 ports which means a single
     419kernel tap can support 32 qemu networking sessions.
     420
     421To use VDE you need to build qemu with VDE support. The RSB can detect a VDE
     422plug and enable VDE support in qemu when building. On FreeBSD install the VDE
     423support with:
     424
     425 # pkg install -u vde2
     426
     427Build qemu with the RSB.
     428
     429To network create a bridge and a tap. The network is 10.10.1.0/24. On FreeBSD
     430add to your /etc/rc.conf:
     431
     432 cloned_interfaces="bridge0 tap0"
     433 autobridge_interfaces="bridge0"
     434 autobridge_bridge0="re0 tap0"
     435 ifconfig_re0="up"
     436 ifconfig_tap0="up"
     437 ifconfig_bridge0="inet 10.1.1.2 netmask 255.255.255.0"
     438 defaultrouter="10.10.1.1"
     439
     440Start the VDE switch as root:
     441
     442 # sysctl net.link.tap.user_open=1
     443 # sysctl net.link.tap.up_on_open=1
     444 # vde_switch -d -s /tmp/vde1 -M /tmp/mgmt1 -tap tap0 -m 660 --mgmtmode 660
     445 # chmod 660 /dev/tap0
     446
     447You can connect to the VDE switch's management channel using:
     448
     449 $ vdeterm /tmp/mgmt1
     450
     451To run qemu:
     452
     453 $ qemu-system-arm \
     454        -serial null \
     455        -serial mon:stdio \
     456        -nographic \
     457        -M xilinx-zynq-a9 \
     458        -net nic,model=cadence_gem,macaddr=0e:b0:ba:5e:ba:11 \
     459        -net vde,id=vde0,sock=/tmp/vde1
     460        -m 256M \
     461        -kernel build/arm-rtems4.12-xilinx_zynq_a9_qemu/rcconf02.exe
    411462
    412463== Issues and TODO
Note: See TracChangeset for help on using the changeset viewer.