mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-31 19:17:04 +00:00
97 lines
1.6 KiB
Plaintext
97 lines
1.6 KiB
Plaintext
|
#
|
||
|
# Build
|
||
|
#
|
||
|
|
||
|
if {[expr ![have_spec x86_64]]} {
|
||
|
puts "Run script is not supported on this platform."
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
set use_top 0
|
||
|
|
||
|
set build_components {
|
||
|
core init timer
|
||
|
test/driver_time
|
||
|
}
|
||
|
|
||
|
|
||
|
append_if $use_top build_components { app/top }
|
||
|
|
||
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||
|
append_platform_drv_build_components
|
||
|
|
||
|
build $build_components
|
||
|
|
||
|
create_boot_directory
|
||
|
|
||
|
# override default platform driver policy
|
||
|
proc platform_drv_policy {} {
|
||
|
return {
|
||
|
<policy label_prefix="test-driver_time"> <device name="PS2"/> </policy>
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#
|
||
|
# Generate config
|
||
|
#
|
||
|
|
||
|
append config {
|
||
|
<config verbose="yes" prio_levels="4">
|
||
|
<parent-provides>
|
||
|
<service name="ROM"/>
|
||
|
<service name="IRQ"/>
|
||
|
<service name="IO_MEM"/>
|
||
|
<service name="IO_PORT"/>
|
||
|
<service name="PD"/>
|
||
|
<service name="RM"/>
|
||
|
<service name="CPU"/>
|
||
|
<service name="LOG"/>
|
||
|
<service name="TRACE"/>
|
||
|
</parent-provides>
|
||
|
<default-route>
|
||
|
<any-service> <parent/> <any-child/> </any-service>
|
||
|
</default-route>
|
||
|
<default caps="100"/>
|
||
|
|
||
|
<start name="timer">
|
||
|
<resource name="RAM" quantum="1M"/>
|
||
|
<provides><service name="Timer"/></provides>
|
||
|
</start>
|
||
|
|
||
|
<start name="test-driver_time" priority="-1">
|
||
|
<resource name="RAM" quantum="2M"/>
|
||
|
</start>}
|
||
|
|
||
|
append_platform_drv_config
|
||
|
|
||
|
append_if $use_top config {
|
||
|
<start name="top">
|
||
|
<resource name="RAM" quantum="2M"/>
|
||
|
<config period_ms="40000"/>
|
||
|
</start>}
|
||
|
|
||
|
append config {
|
||
|
</config>}
|
||
|
|
||
|
install_config $config
|
||
|
|
||
|
#
|
||
|
# Boot modules
|
||
|
#
|
||
|
|
||
|
# generic modules
|
||
|
set boot_modules {
|
||
|
core ld.lib.so init timer
|
||
|
test-driver_time
|
||
|
}
|
||
|
|
||
|
append_if $use_top boot_modules { top }
|
||
|
|
||
|
append_platform_drv_boot_modules
|
||
|
|
||
|
build_boot_image $boot_modules
|
||
|
|
||
|
append qemu_args "-nographic "
|
||
|
|
||
|
run_genode_until forever
|