Changeset 39a650e in rtems-libbsd for libbsd.txt
- Timestamp:
- 06/27/16 06:45:18 (8 years ago)
- Branches:
- 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
- Children:
- 9835790
- Parents:
- 459d67d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libbsd.txt
r459d67d r39a650e 409 409 dhclient qbri 410 410 ------------------------------------------------------------------------------- 411 412 === VDE and QEMU 413 414 On FreeBSD you can create VDE or the Virtual Distributed Ethernet to create a 415 network environment that does not need to run qemu as root or needing to drop 416 the tap's privileges to run qemu. 417 418 VDE creates a software switch with a default of 32 ports which means a single 419 kernel tap can support 32 qemu networking sessions. 420 421 To use VDE you need to build qemu with VDE support. The RSB can detect a VDE 422 plug and enable VDE support in qemu when building. On FreeBSD install the VDE 423 support with: 424 425 # pkg install -u vde2 426 427 Build qemu with the RSB. 428 429 To network create a bridge and a tap. The network is 10.10.1.0/24. On FreeBSD 430 add 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 440 Start 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 447 You can connect to the VDE switch's management channel using: 448 449 $ vdeterm /tmp/mgmt1 450 451 To 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 411 462 412 463 == Issues and TODO
Note: See TracChangeset
for help on using the changeset viewer.