#
# Check for platform support
#
proc buffer_size_kib {} {
if {[have_board pbxa9]} { return [expr 12 * 1024] }
if {[have_board imx8q_evk]} { return [expr 1024] }
if {[have_board imx6q_sabrelite]} { return [expr 1024] }
if {[have_board imx53_qsb]} { return [expr 1024] }
if {[have_board imx53_qsb_tz]} { return [expr 1024] }
if {[have_board rpi]} { return [expr 4 * 1024] }
puts "\n Run script is not supported on this platform. \n";
exit 0;
}
proc sd_card_drv {} {
if {[have_board pbxa9]} { return pl180_sd_card_drv }
if {[have_board imx8q_evk]} { return imx8_sd_card_drv }
if {[have_board imx6q_sabrelite]} { return imx6_sd_card_drv }
if {[have_board imx53_qsb]} { return imx53_sd_card_drv }
if {[have_board imx53_qsb_tz]} { return imx53_sd_card_drv }
if {[have_board rpi]} { return rpi_sd_card_drv }
puts "\n Run script is not supported on this platform. \n";
exit 0;
}
proc platform_drv {} {
if {[have_board imx8q_evk]} { return imx8mq_platform_drv }
return platform_drv
}
proc device_resources {} {
if {[have_board pbxa9]} {
return {
}
}
if {[have_board imx8q_evk]} {
return {
}
}
if {[have_board imx6q_sabrelite]} {
return {
}
}
if {[have_board imx53_qsb] || [have_board imx53_qsb_tz]} {
return {
}
}
if {[have_board rpi]} {
return {
}
}
puts "\n Run script is not supported on this platform. \n";
exit 0;
}
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/init \
[depot_user]/src/platform_drv
install_config {
} [device_resources] {
}
build { drivers/sd_card }
build_boot_image [sd_card_drv]
#
# 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
if {[have_include power_on/qemu]} {
if { [file exists $disk_image] != 0 } then {
exec rm -f $disk_image
}
}