2012-10-10 15:31:22 +00:00
|
|
|
#
|
|
|
|
# \brief Virtual-machine monitor demo
|
|
|
|
# \author Stefan Kalkowski
|
|
|
|
# \date 2012-06-25
|
|
|
|
#
|
|
|
|
|
2014-06-24 09:48:25 +00:00
|
|
|
assert_spec hw_imx53
|
|
|
|
assert_spec trustzone
|
2012-10-10 15:31:22 +00:00
|
|
|
|
2013-11-27 10:58:35 +00:00
|
|
|
build "core init server/tz_vmm"
|
2012-10-10 15:31:22 +00:00
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
install_config {
|
|
|
|
<config verbose="yes">
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="RAM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="CAP"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="SIGNAL"/>
|
|
|
|
<service name="VM"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service><any-child/><parent/></any-service>
|
|
|
|
</default-route>
|
2013-11-27 10:58:35 +00:00
|
|
|
<start name="tz_vmm">
|
2012-10-10 15:31:22 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
2014-06-24 09:48:25 +00:00
|
|
|
set init_uri "http://genode.org/files/images/imx53_qsb/initrd.gz"
|
|
|
|
set linux_uri "http://genode.org/files/images/imx53_qsb/linux_trustzone.bin"
|
|
|
|
|
2013-11-27 16:12:39 +00:00
|
|
|
if {![file exists bin/initrd.gz]} {
|
|
|
|
puts "Download initramfs ..."
|
|
|
|
exec >& /dev/null wget -c -O bin/initrd.gz $init_uri
|
|
|
|
}
|
|
|
|
if {![file exists bin/linux]} {
|
|
|
|
puts "Download linux binary ..."
|
|
|
|
exec >& /dev/null wget -c -O bin/linux $linux_uri
|
|
|
|
}
|
|
|
|
exec >& /dev/null wget -O bin/initrd.gz.md5 $init_uri.md5
|
|
|
|
exec >& /dev/null wget -O bin/linux.md5 $linux_uri.md5
|
|
|
|
cd bin
|
|
|
|
exec md5sum -c initrd.gz.md5
|
|
|
|
exec md5sum -c linux.md5
|
|
|
|
cd ..
|
|
|
|
|
2013-11-27 10:58:35 +00:00
|
|
|
build_boot_image "core init tz_vmm linux initrd.gz"
|
|
|
|
|
2014-06-24 09:48:25 +00:00
|
|
|
#
|
|
|
|
# Execute test case
|
|
|
|
#
|
|
|
|
run_genode_until {.*\/ #.*} 220
|
|
|
|
|
|
|
|
# Wait for network to settle down
|
|
|
|
send "sleep 5\n"
|
|
|
|
send "wget http://genode.org/\n"
|
|
|
|
|
|
|
|
expect {
|
|
|
|
-re "Connecting to genode.org.*index.html.*\/ #.*" { }
|
|
|
|
timeout { puts stderr "Error: Test execution timed out"; exit -2 }
|
|
|
|
}
|
|
|
|
|
|
|
|
exec rm bin/initrd.gz bin/initrd.gz.md5 bin/linux bin/linux.md5
|