if { [file exists ata.raw] == 0 } then { # create empty block device file catch { exec dd if=/dev/zero of=ata.raw bs=512 count=20480 } # create to tro primary partitions (one is extented) and two logical paritions puts "using sfdisk to partition disk image, requires root privileges" catch { exec echo "2048,4096,c\n4096,16386,5\n0,0\n0,0\n6144,4096,c\n12288,8192,c\n" | sudo sfdisk -uS -f ata.raw } } set use_sd_card_drv [expr [have_spec omap4] || [have_spec exynos5] || [have_spec pl180]] set use_atapi_drv [have_spec x86] # # Build # set build_components { core init drivers/timer server/part_blk test/part_blk } lappend_if [have_spec pci] build_components drivers/pci lappend_if [have_spec acpi] build_components drivers/acpi lappend_if $use_atapi_drv build_components drivers/atapi lappend_if $use_sd_card_drv build_components drivers/sd_card build $build_components create_boot_directory # # Generate config # append config { } append_if [have_spec acpi] config { } append_if [expr ![have_spec acpi] && [have_spec pci]] config { } append_if $use_atapi_drv config { } append_if $use_sd_card_drv config { } append config { } install_config $config # # Boot modules # set boot_modules { core init timer part_blk test-part } lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec acpi] boot_modules acpi_drv lappend_if $use_atapi_drv boot_modules atapi_drv lappend_if $use_sd_card_drv boot_modules sd_card_drv build_boot_image $boot_modules # # Qemu # append qemu_args " -nographic -m 64 " append_if $use_atapi_drv qemu_args " -boot d -hda ata.raw " append_if $use_sd_card_drv qemu_args " -drive file=ata.raw,if=sd " run_genode_until "Success.*\n.*Success.*\n" 10 grep_output {^\[init -> test-part} unify_output {[0-9]} "x" compare_output_to { [init -> test-partx] Success [init -> test-partx] Success }