Changeset 39a650e in rtems-libbsd for libbsd.txt


Ignore:
Timestamp:
Jun 27, 2016, 6:45:18 AM (3 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
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.