if {![have_spec x86] || [have_spec linux]} {
puts "Platform is unsupported."
exit 0
}
build { app/driver_manager test/driver_manager lib/ld }
create_boot_directory
import_from_depot genodelabs/src/[base_src] \
genodelabs/pkg/drivers_managed-pc \
genodelabs/src/report_rom \
genodelabs/src/dynamic_rom \
genodelabs/src/init
install_config {
}
set fd [open [run_dir]/genode/fb_drv.config "w"]
puts $fd {
}
close $fd
#
# Override 'drivers.config' as supplied with the 'drivers_managed-pc' pkg
# with the (possibly modified) version found in the source tree. This avoids
# the need to re-create the pkg while testing modifications of this file.
#
file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/drivers.config \
[run_dir]/genode/drivers.config
build_boot_image { driver_manager test-driver_manager ld.lib.so }
#
# Build ext2 file-system images to be supplied to Qemu
#
if {[have_include "power_on/qemu"]} {
set mke2fs [installed_command mke2fs]
set dd [installed_command dd]
catch { exec $dd if=/dev/zero of=bin/hdd_disk.raw bs=1M count=32 }
catch { exec $mke2fs -F bin/hdd_disk.raw }
}
#
# Qemu opts for supplying hdd_disk.raw as AHCI disk
#
append qemu_args " -m 128 "
append qemu_args " -nographic "
append qemu_args " -device ahci,id=ahci "
append qemu_args " -drive id=hdd,file=bin/hdd_disk.raw,format=raw,if=none -device ide-hd,drive=hdd,bus=ahci.0 "
run_genode_until {.*all expected devices present and accessible.*\n} 120