if { ![have_spec hw] && ![have_spec nova] && ![have_spec sel4] } { puts "Platform is unsupported." exit 0 } set build_components { core init timer drivers/ps2 server/dynamic_rom server/event_filter server/report_rom server/event_dump app/acpica app/acpi_event } set use_acpica_as_acpi_drv 0 source ${genode_dir}/repos/base/run/platform_drv.inc if {!$use_acpica_as_acpi_drv} { # override default platform driver policy proc platform_drv_policy {} { return { } } # add routing information proc platform_drv_add_routing {} { return { } } # override default config to react on 'acpi_ready' ROM change proc platform_drv_config_config {} { return { } } } append_platform_drv_build_components build $build_components create_boot_directory set config { } append_if [expr !$use_acpica_as_acpi_drv] config { } append config { } append config { } append config { } append config { } append config { } append_platform_drv_config append config { } install_config $config set boot_modules { core init ld.lib.so timer ps2_drv event_filter report_rom dynamic_rom acpica acpi_event event_dump } append_platform_drv_boot_modules build_boot_image $boot_modules append qemu_args "-nographic " if {![have_include "power_on/qemu"]} { run_genode_until {\[init -\> acpi.*SCI IRQ:.*\n} 30 exit 0 } run_genode_until {.*PS2 uses IRQ, vector 0xc.*} 30 set spawn_id $qemu_spawn_id sleep 1 # send Ctrl-a+c to enter Qemu's monitor mode send "\x01\x63" # wait for monitor to become ready run_genode_until {(qemu)} 20 $spawn_id for {set i 0} {$i < 3} {incr i} { sleep 1 send "system_powerdown\n" run_genode_until {.*key count: 0.*} 3 $spawn_id } puts "\nTest succeeded\n" exit 0