# # \brief Automated testing of http_blk # \author Stefan Kalkowski # \date 2013-11-29 # if {[have_spec odroid_xu]} { puts "Run script does not support this platform." exit 0 } set use_usb_driver [expr [have_spec omap4] || [have_spec arndale] || [have_spec rpi]] set use_nic_driver [expr !$use_usb_driver && ![have_spec imx53]] if {[expr !$use_usb_driver && !$use_nic_driver]} { puts "\n Run script is not supported on this platform. \n"; exit 0 } if {$use_usb_driver} { set network_driver "usb_drv" } if {$use_nic_driver} { set network_driver "nic_drv" } set build_components { core init drivers/timer server/nic_bridge server/http_blk app/lighttpd test/rom_blk } # platform-specific modules lappend_if $use_usb_driver build_components drivers/usb lappend_if $use_nic_driver build_components drivers/nic lappend_if [have_spec gpio] build_components drivers/gpio source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components build $build_components create_boot_directory proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return hw_gpio_drv } if {[have_spec rpi] && [have_spec foc]} { return foc_gpio_drv } return gpio_drv } append config { } append_if [have_spec gpio] config " " append_if $use_usb_driver config { } append_if $use_nic_driver config { } append_platform_drv_config append config { } append config " " append config { # lighttpd configuration server.port = 80 server.document-root = "/website" server.event-handler = "select" server.network-backend = "write" index-file.names = ( "index.xhtml", "index.html", "index.htm" ) mimetype.assign = ( ".html" => "text/html", ".htm" => "text/html" ) } install_config $config catch { exec dd if=/dev/zero of=bin/index.bin bs=512 count=400 } # # Boot modules # # generic modules set boot_modules { core ld.lib.so init timer libc.lib.so vfs.lib.so libm.lib.so posix.lib.so lwip_legacy.lib.so zlib.lib.so lighttpd nic_bridge http_blk index.bin test-rom_blk } # platform-specific modules lappend_if [have_spec gpio] boot_modules [gpio_drv] lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_nic_driver boot_modules [nic_drv_binary] append_platform_drv_boot_modules build_boot_image $boot_modules append_if [have_spec x86] qemu_args " -net nic,model=e1000 " append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 " append qemu_args " -net user -redir tcp:5555::80 " append qemu_args " -nographic -serial mon:stdio " run_genode_until {.*all done, finished!.*} 120 exec rm -f bin/index.bin