2018-11-07 14:16:30 +00:00
|
|
|
if {![have_spec 64bit]} {
|
|
|
|
puts "\nSolo5 requires a 64bit architecture\n"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[have_spec linux]} {
|
2018-11-20 08:24:45 +00:00
|
|
|
puts "\nRun script is not supported on this platform\n"
|
|
|
|
exit 0
|
2018-11-07 14:16:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
import_from_depot \
|
2019-02-19 13:24:52 +00:00
|
|
|
[depot_user]/src/[base_src] \
|
|
|
|
[depot_user]/src/init \
|
|
|
|
[depot_user]/src/rtc_drv \
|
2018-11-07 14:16:30 +00:00
|
|
|
|
2019-02-28 13:54:11 +00:00
|
|
|
append config {
|
2018-11-07 14:16:30 +00:00
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RAM"/>
|
|
|
|
<service name="ROM"/>
|
2018-12-03 13:26:21 +00:00
|
|
|
<service name="IRQ"/>
|
2018-11-07 14:16:30 +00:00
|
|
|
<service name="IO_PORT"/>
|
|
|
|
</parent-provides>
|
|
|
|
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service> </default-route>
|
|
|
|
|
|
|
|
<start name="timer" caps="96">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Timer"/> </provides>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="rtc_drv" caps="96">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Rtc"/> </provides>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="nic_loopback" caps="96">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Nic"/> </provides>
|
|
|
|
</start>
|
|
|
|
|
2019-01-06 20:17:07 +00:00
|
|
|
<start name="ram_block" caps="96">
|
2018-11-07 14:16:30 +00:00
|
|
|
<resource name="RAM" quantum="40M"/>
|
|
|
|
<provides> <service name="Block"/> </provides>
|
|
|
|
<config size="32M" block_size="4096"/>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="test" caps="256">
|
|
|
|
<binary name="sequence"/>
|
|
|
|
<resource name="RAM" quantum="16M"/>
|
|
|
|
<config>
|
|
|
|
<start name="solo5-test_hello">
|
|
|
|
<config>
|
|
|
|
<solo5 cmdline="Hello_Solo5"/>
|
|
|
|
<rtc/> <nic/> <blk/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
<start name="solo5-test_fpu"/>
|
|
|
|
<start name="solo5-test_globals"/>
|
|
|
|
<start name="solo5-test_quiet"/>
|
|
|
|
<start name="solo5-test_blk">
|
|
|
|
<config> <blk/> </config>
|
2019-02-28 13:54:11 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
if { ![get_cmd_switch --autopilot] || ![have_include "power_on/qemu"] } {
|
|
|
|
append config {
|
2018-11-07 14:16:30 +00:00
|
|
|
<start name="solo5-test_time">
|
|
|
|
<config> <rtc/> </config>
|
2019-02-28 13:54:11 +00:00
|
|
|
</start>}
|
|
|
|
}
|
|
|
|
|
|
|
|
append config {
|
2018-11-07 14:16:30 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
2019-02-28 13:54:11 +00:00
|
|
|
install_config $config
|
|
|
|
|
2018-11-07 14:16:30 +00:00
|
|
|
build {
|
|
|
|
app/sequence
|
|
|
|
server/nic_loopback
|
2019-01-06 20:17:07 +00:00
|
|
|
server/ram_block
|
2018-11-07 14:16:30 +00:00
|
|
|
test/solo5
|
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image {
|
|
|
|
nic_loopback
|
2019-01-06 20:17:07 +00:00
|
|
|
ram_block
|
2018-11-07 14:16:30 +00:00
|
|
|
sequence
|
|
|
|
solo5.lib.so
|
|
|
|
solo5-test_blk
|
|
|
|
solo5-test_fpu
|
|
|
|
solo5-test_globals
|
|
|
|
solo5-test_hello
|
|
|
|
solo5-test_quiet
|
|
|
|
solo5-test_time
|
|
|
|
}
|
|
|
|
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
|
|
|
|
run_genode_until {child "test" exited with exit value 0} 40
|