# Network echo test # # uses the following config hooks. # # proc ipstack { } name of IP stack (lwip or lxip) # proc protocol { } test protocol (tcp or udp) # proc use_dynamic_rom { } dynamically change IP-stack config at runtime set build_components { } if {[protocol] == "tcp"} { append build_components { test/netty/tcp } } else { append build_components { test/netty/udp } } build $build_components create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/pkg/[drivers_nic_pkg] \ [depot_user]/src/dynamic_rom \ [depot_user]/src/init \ [depot_user]/src/libc \ [depot_user]/src/nic_router \ [depot_user]/src/vfs_audit \ [depot_user]/src/vfs_[ipstack] \ [depot_user]/src/vfs append config { } append_if [use_dynamic_rom] config { <} [ipstack] { ip_addr="10.0.3.55" netmask="255.255.255.0" gateway="10.0.3.1" nameserver="8.8.8.8"/> <} [ipstack] { mtu="400" ip_addr="10.0.3.55" netmask="255.255.255.0" gateway="10.0.3.1" nameserver="8.8.8.8"/> } append config { } if {[use_dynamic_rom]} { append config { } } else { append config { <} [ipstack] { dhcp="yes"/> } } append config { } if {[protocol] == "tcp"} { append config { } } else { append config { } } append config { } install_config $config build_boot_image [build_artifacts] append qemu_args " -nographic " append_qemu_nic_args "host=10.0.2.1,dhcpstart=10.0.2.55,hostfwd=tcp::10080-:80,hostfwd=tcp::18080-:8080,hostfwd=udp::10007-:7,hostfwd=udp::17070-:7070" # this works only if board/*/qemu_args does not declare "-netdev user,..." #append qemu_args " -netdev tap,id=net0,ifname=tap0,script=no " run_genode_until forever # vi: set ft=tcl :