set mke2fs [check_installed mke2fs] set dd [check_installed dd] # # Build # set build_components { core init drivers/timer drivers/ahci drivers/platform test/blk/bench } lappend_if [have_spec acpi] build_components drivers/acpi lappend_if [have_spec pci] build_components drivers/pci build $build_components # # Build EXT2-file-system image # catch { exec $dd if=/dev/zero of=bin/ext2.raw bs=1M count=16 } catch { exec $mke2fs -F bin/ext2.raw } create_boot_directory # # Generate config # set config { } append_if [expr ![have_spec acpi] && ![have_spec pci]] config { } append_if [have_spec acpi] config { } append_if [expr ![have_spec acpi] && [have_spec pci]] config { } append config { } install_config $config # # Boot modules # set boot_modules { core init timer ahci_drv test-blk-bench libc.lib.so ld.lib.so } lappend_if [expr ![have_spec acpi] && ![have_spec pci]] boot_modules platform_drv lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec nova] boot_modules pci_device_pd lappend_if [have_spec acpi] boot_modules acpi_drv build_boot_image $boot_modules append qemu_args " -nographic -m 256 " append qemu_args " -drive id=disk,file=bin/ext2.raw,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -boot d" append qemu_args " -drive id=cd,file=[run_dir]/../ahci_bench.iso,if=none,media=cdrom -device ide-cd,drive=cd,bus=ahci.1" run_genode_until "Done\n" 100