mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-30 02:28:54 +00:00
bf62d6b896
Since the timer and timeout handling is part of the base library (the dynamic linker), it belongs to the base repository. Besides moving the timer and its related infrastructure (alarm, timeout libs, tests) to the base repository, this patch also moves the timer from the 'drivers' subdirectory directly to 'src' and disamibuates the timer's build locations for the various kernels. Otherwise the different timer implementations could interfere with each other when using one build directory with multiple kernels. Note that this patch changes the include paths for the former os/timer, os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/. Issue #3101
106 lines
2.1 KiB
Plaintext
106 lines
2.1 KiB
Plaintext
#
|
|
# Check for platform support
|
|
#
|
|
|
|
if {[have_spec pl180]} { set buffer_size_kib [expr 12 * 1024]
|
|
} elseif {[have_spec imx6]} { set buffer_size_kib [expr 1024]
|
|
} elseif {[have_spec imx53] &&
|
|
![have_spec foc]} { set buffer_size_kib [expr 1024]
|
|
} elseif {[have_spec rpi]} { set buffer_size_kib [expr 4 * 1024]
|
|
} elseif {[have_spec omap4]} { set buffer_size_kib [expr 4 * 1024]
|
|
} elseif {[have_spec arndale]} { set buffer_size_kib [expr 1024]
|
|
} else {
|
|
puts "\n Run script is not supported on this platform. \n";
|
|
exit 0;
|
|
}
|
|
|
|
|
|
#
|
|
# Build the boot modules
|
|
#
|
|
|
|
set build_components {
|
|
core init timer
|
|
test/sd_card_bench
|
|
}
|
|
|
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
|
append_platform_drv_build_components
|
|
build $build_components
|
|
create_boot_directory
|
|
|
|
|
|
#
|
|
# Install the config
|
|
#
|
|
|
|
append config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="ROM"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="PD"/>
|
|
<service name="RM"/>
|
|
<service name="CPU"/>
|
|
<service name="LOG"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="100"/>}
|
|
|
|
append_platform_drv_config
|
|
|
|
append config {
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Timer"/></provides>
|
|
</start>
|
|
<start name="sd_card_bench">
|
|
<resource name="RAM" quantum="16M"/>
|
|
<provides><service name="Block"/></provides>}
|
|
|
|
append config "<config buffer_size_kib=\"$buffer_size_kib\"/>"
|
|
|
|
append config {
|
|
</start>
|
|
</config>}
|
|
|
|
install_config $config
|
|
|
|
|
|
#
|
|
# Create the boot image
|
|
#
|
|
|
|
set boot_modules {
|
|
core ld.lib.so init
|
|
timer
|
|
sd_card_bench
|
|
}
|
|
|
|
append_platform_drv_boot_modules
|
|
build_boot_image $boot_modules
|
|
|
|
|
|
#
|
|
# Run and evaluate the test
|
|
#
|
|
# If we run on qemu, provide a virtual disk
|
|
#
|
|
|
|
set disk_image "bin/sd_card.img"
|
|
if {[have_include power_on/qemu]} {
|
|
|
|
if { [file exists $disk_image] == 0 } then {
|
|
catch { exec dd if=/dev/zero of=$disk_image bs=1M count=512 } }
|
|
|
|
append qemu_args "-drive file=$disk_image,format=raw,if=sd,cache=writeback "
|
|
append qemu_args "-nographic "
|
|
}
|
|
|
|
run_genode_until "--- SD card benchmark finished ---" 120
|
|
|
|
exec rm -f $disk_image
|