genode/repos/os/run/sd_card.run

84 lines
2.3 KiB
Plaintext
Raw Normal View History

if {![have_board pbxa9]} {
puts "Test requires board pbxa9"
exit
}
2011-12-22 15:19:25 +00:00
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/init \
2024-05-30 13:46:57 +00:00
[depot_user]/src/platform \
[depot_user]/raw/pbxa9-devices
build { driver/sd_card app/block_tester }
install_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 caps="100"/>
2024-05-30 13:46:57 +00:00
<start name="platform" managing_system="yes">
<resource name="RAM" quantum="1M"/>
<provides><service name="Platform"/></provides>
<config>
2024-05-30 13:46:57 +00:00
<policy label="pl180_sd_card -> ">
<device name="mmc0"/>
</policy>
</config>
<route>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
<route> <any-service> <parent/> </any-service> </route>
</start>
2024-05-30 13:46:57 +00:00
<start name="pl180_sd_card">
<resource name="RAM" quantum="1M"/>
<provides><service name="Block"/></provides>
<route>
<service name="ROM"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<any-service> <any-child/> </any-service>
</route>
</start>
<start name="block_tester">
<resource name="RAM" quantum="64M" />
<config verbose="no" report="no" log="yes" stop_on_error="no">
<tests>
<sequential length="16M" size="1M" io_buffer="8M" batch="4"/>
<sequential start="4000" write="yes" length="16M" size="1M" io_buffer="8M" batch="4"/>
</tests>
</config>
<route> <any-service> <any-child/> <parent/> </any-service> </route>
</start>
</config> }
build_boot_image [build_artifacts]
2011-12-22 15:19:25 +00:00
set disk_image "bin/sd_card.img"
if { [file exists $disk_image] == 0 } then {
# create empty block device file
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 -nographic "
run_genode_until {.*child "block_tester" exited with exit value 0.*\n} 30
2011-12-22 15:19:25 +00:00
2017-03-20 10:37:41 +00:00
exec rm $disk_image
2011-12-22 15:19:25 +00:00
# vi: set ft=tcl :