set use_qemu [have_include "power_on/qemu"] # # Build # set build_components { core init timer drivers/usb_host drivers/usb_block server/report_rom app/block_tester } source ${genode_dir}/repos/base/run/platform_drv.inc append_platform_drv_build_components build $build_components create_boot_directory # # Generate config # set config { } append_platform_drv_config append config { } append config "" append config { } append_if [expr !$use_qemu] config { } append_if $use_qemu config { } append config { } install_config $config # # Boot modules # # generic modules set boot_modules { core init timer report_rom usb_block_drv block_tester ld.lib.so } append boot_modules [usb_host_drv_binary] append_platform_drv_boot_modules build_boot_image $boot_modules # # Execute test case # set disk_image "bin/test.img" set cmd "dd if=/dev/zero of=$disk_image bs=1M count=16" if {$use_qemu} { puts "creating disk image:\n$cmd" catch { exec sh -c $cmd } } # # Qemu opts for EHCI # append qemu_args " -nographic -M pc -boot order=d " append qemu_args " -drive if=none,id=disk,file=$disk_image,format=raw " append qemu_args " -device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=disk " run_genode_until {.*child "block_tester" exited with exit value 0.*} 100