# # \brief Test of fetchurl # \author Emery Hemingway # \date 2016-06-05 # if {[have_board rpi3] || [have_board imx53_qsb_tz]} { puts "Run script does not support this platform." exit 0 } if {[get_cmd_switch --autopilot] && [have_board linux]} { puts "Autopilot mode is not supported on this platform." exit 0 } # # This run script works on Linux with NAT setup from tap0 to uplink # device uplink0 like follows. # # iptables -t nat -A POSTROUTING -o uplink0 -j MASQUERADE # iptables -A FORWARD -i tap0 -o uplink0 -j ACCEPT # iptables -A FORWARD -i uplink0 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT # echo 1 > /proc/sys/net/ipv4/ip_forward # proc socket_fs_plugin { } { set result "<[ip_stack]" if {[have_board linux]} { append result { ip_addr="10.0.2.55" netmask="255.255.255.0"} append result { gateway="10.0.2.1" nameserver="1.1.1.1"} } else { append result { dhcp="yes"} } append result {/>} return $result } create_boot_directory import_from_depot [depot_user]/src/[base_src] \ [depot_user]/pkg/[drivers_nic_pkg] \ [depot_user]/src/curl \ [depot_user]/src/fetchurl \ [depot_user]/src/init \ [depot_user]/src/libc \ [depot_user]/src/nic_router \ [depot_user]/src/libcrypto \ [depot_user]/src/libssh \ [depot_user]/src/libssl \ [depot_user]/src/report_rom \ [depot_user]/src/vfs \ [depot_user]/src/vfs_[ip_stack] \ [depot_user]/src/zlib install_config { 2000-01-01 00:00 01234567890123456789 } [socket_fs_plugin] { } #build { } build_boot_image { } append qemu_args " -nographic " append_qemu_nic_args ## Uncomment to dump network traffic to file # append qemu_args " -object filter-dump,id=net0,netdev=net0,file=[run_dir].pcap" run_genode_until {child "fetchurl" exited with exit value 0} 120