mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-12 16:02:57 +00:00
142 lines
4.0 KiB
Plaintext
142 lines
4.0 KiB
Plaintext
|
#
|
||
|
# there are no nic driver packages for rpi3 and imx53 tz
|
||
|
#
|
||
|
if {[have_board rpi3] || [have_board imx53_qsb_tz]} {
|
||
|
puts "Run script is not supported on this platform."
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
#
|
||
|
# lx & riscv would require extra setup on the test machine which is not desired
|
||
|
#
|
||
|
if {[get_cmd_switch --autopilot] && ([have_spec linux] ||
|
||
|
[have_board virt_qemu_riscv])} {
|
||
|
|
||
|
puts "Autopilot mode is not supported on this platform."
|
||
|
exit 0
|
||
|
}
|
||
|
|
||
|
proc test_timeout { } {
|
||
|
if {[have_spec sel4] && [have_board pc]} { return 60 }
|
||
|
return 30
|
||
|
}
|
||
|
|
||
|
proc dst_ip { } {
|
||
|
if {[expr ![have_include power_on/qemu]]} {
|
||
|
return "10.0.0.2"
|
||
|
} else {
|
||
|
return "10.0.2.2"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
build { server/nic_uplink app/ping }
|
||
|
|
||
|
create_boot_directory
|
||
|
|
||
|
import_from_depot [depot_user]/src/[base_src] \
|
||
|
[depot_user]/pkg/[drivers_nic_pkg] \
|
||
|
[depot_user]/src/init
|
||
|
|
||
|
append config {
|
||
|
|
||
|
<config>
|
||
|
|
||
|
<parent-provides>
|
||
|
<service name="ROM"/>
|
||
|
<service name="IRQ"/>
|
||
|
<service name="IO_PORT"/>
|
||
|
<service name="IO_MEM"/>
|
||
|
<service name="PD"/>
|
||
|
<service name="RM"/>
|
||
|
<service name="CPU"/>
|
||
|
<service name="LOG"/>
|
||
|
</parent-provides>
|
||
|
|
||
|
<start name="timer" caps="100">
|
||
|
<resource name="RAM" quantum="1M"/>
|
||
|
<provides><service name="Timer"/></provides>
|
||
|
<route>
|
||
|
<service name="PD"> <parent/> </service>
|
||
|
<service name="ROM"> <parent/> </service>
|
||
|
<service name="LOG"> <parent/> </service>
|
||
|
<service name="CPU"> <parent/> </service>
|
||
|
<service name="IO_PORT"> <parent/> </service>
|
||
|
<service name="IO_MEM"> <parent/> </service>
|
||
|
<service name="IRQ"> <parent/> </service>
|
||
|
</route>
|
||
|
</start>
|
||
|
|
||
|
<start name="drivers" caps="1200" managing_system="yes">
|
||
|
<resource name="RAM" quantum="32M"/>
|
||
|
<binary name="init"/>
|
||
|
<route>
|
||
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
||
|
<service name="Uplink"> <child name="nic_uplink"/> </service>
|
||
|
<service name="Timer"> <child name="timer"/> </service>
|
||
|
<service name="RM"> <parent/> </service>
|
||
|
<service name="PD"> <parent/> </service>
|
||
|
<service name="ROM"> <parent/> </service>
|
||
|
<service name="LOG"> <parent/> </service>
|
||
|
<service name="CPU"> <parent/> </service>
|
||
|
<service name="IO_PORT"> <parent/> </service>
|
||
|
<service name="IO_MEM"> <parent/> </service>
|
||
|
<service name="IRQ"> <parent/> </service>
|
||
|
</route>
|
||
|
</start>
|
||
|
|
||
|
<start name="nic_uplink" caps="100">
|
||
|
<resource name="RAM" quantum="1M"/>
|
||
|
<provides>
|
||
|
<service name="Uplink"/>
|
||
|
<service name="Nic"/>
|
||
|
</provides>
|
||
|
<config verbose="yes"/>
|
||
|
<route>
|
||
|
<service name="Timer"> <child name="timer"/> </service>
|
||
|
<service name="PD"> <parent/> </service>
|
||
|
<service name="ROM"> <parent/> </service>
|
||
|
<service name="LOG"> <parent/> </service>
|
||
|
<service name="CPU"> <parent/> </service>
|
||
|
</route>
|
||
|
</start>
|
||
|
|
||
|
<start name="ping_1" caps="100">
|
||
|
<binary name="ping"/>
|
||
|
<resource name="RAM" quantum="8M"/>
|
||
|
<config dst_ip="} [dst_ip] {" period_sec="1" count="3"/>
|
||
|
<route>
|
||
|
<service name="Nic"> <child name="nic_uplink"/> </service>
|
||
|
<service name="Timer"> <child name="timer"/> </service>
|
||
|
<service name="PD"> <parent/> </service>
|
||
|
<service name="ROM"> <parent/> </service>
|
||
|
<service name="LOG"> <parent/> </service>
|
||
|
<service name="CPU"> <parent/> </service>
|
||
|
</route>
|
||
|
</start>
|
||
|
|
||
|
<start name="ping_2" caps="100">
|
||
|
<binary name="ping"/>
|
||
|
<resource name="RAM" quantum="8M"/>
|
||
|
<config dst_ip="} [dst_ip] {" period_sec="1" count="3"/>
|
||
|
<route>
|
||
|
<service name="Nic"> <child name="nic_uplink"/> </service>
|
||
|
<service name="Timer"> <child name="timer"/> </service>
|
||
|
<service name="PD"> <parent/> </service>
|
||
|
<service name="ROM"> <parent/> </service>
|
||
|
<service name="LOG"> <parent/> </service>
|
||
|
<service name="CPU"> <parent/> </service>
|
||
|
</route>
|
||
|
</start>
|
||
|
|
||
|
</config>
|
||
|
}
|
||
|
|
||
|
install_config $config
|
||
|
|
||
|
build_boot_image [build_artifacts]
|
||
|
|
||
|
append qemu_args " -nographic "
|
||
|
append_qemu_nic_args
|
||
|
|
||
|
run_genode_until "child \"ping_.\" exited with exit value 0.*child \"ping_.\" exited with exit value 0.*\n" [test_timeout]
|