2017-12-08 15:44:44 +00:00
|
|
|
create_boot_directory
|
|
|
|
|
2019-06-27 17:42:01 +00:00
|
|
|
if {[have_spec linux] || [have_spec rpi3] ||
|
2019-05-07 10:06:04 +00:00
|
|
|
[expr [have_spec imx53] && [have_spec trustzone]]} {
|
2018-04-10 14:45:01 +00:00
|
|
|
puts "Run script does not support this platform."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2019-02-19 13:24:52 +00:00
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
2019-04-24 13:09:49 +00:00
|
|
|
[depot_user]/pkg/[drivers_nic_pkg] \
|
2019-02-19 13:24:52 +00:00
|
|
|
[depot_user]/src/report_rom \
|
|
|
|
[depot_user]/src/fs_rom \
|
|
|
|
[depot_user]/src/vfs \
|
|
|
|
[depot_user]/src/vfs_lxip \
|
|
|
|
[depot_user]/src/fetchurl \
|
|
|
|
[depot_user]/src/libc \
|
|
|
|
[depot_user]/src/libssh \
|
|
|
|
[depot_user]/src/libssl \
|
|
|
|
[depot_user]/src/libcrypto \
|
|
|
|
[depot_user]/src/zlib \
|
|
|
|
[depot_user]/src/curl \
|
|
|
|
[depot_user]/src/init \
|
|
|
|
[depot_user]/src/chroot \
|
|
|
|
[depot_user]/src/extract \
|
|
|
|
[depot_user]/src/libarchive \
|
|
|
|
[depot_user]/src/liblzma \
|
|
|
|
[depot_user]/src/verify
|
2017-12-08 15:44:44 +00:00
|
|
|
|
|
|
|
set config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
</parent-provides>
|
|
|
|
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
|
|
|
|
<default caps="100"/>}
|
|
|
|
|
2019-02-20 08:51:55 +00:00
|
|
|
proc depot_user_download { user } {
|
|
|
|
return [exec cat [genode_dir]/depot/$user/download] }
|
2017-12-08 15:44:44 +00:00
|
|
|
|
2019-02-20 08:51:55 +00:00
|
|
|
proc depot_user_pubkey { user } {
|
|
|
|
return [exec cat [genode_dir]/depot/$user/pubkey] }
|
2017-12-08 15:44:44 +00:00
|
|
|
|
|
|
|
append config {
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Timer"/> </provides>
|
|
|
|
</start>
|
|
|
|
|
2020-07-10 11:04:12 +00:00
|
|
|
<start name="drivers" caps="1000" managing_system="yes">
|
|
|
|
<resource name="RAM" quantum="32M"/>
|
2019-04-24 13:09:49 +00:00
|
|
|
<binary name="init"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
<provides> <service name="Nic"/> </provides>
|
|
|
|
</start>
|
|
|
|
|
2017-12-08 15:44:44 +00:00
|
|
|
<start name="vfs">
|
|
|
|
<resource name="RAM" quantum="20M"/>
|
|
|
|
<provides> <service name="File_system"/> </provides>
|
|
|
|
<config>
|
|
|
|
<vfs>
|
|
|
|
<dir name="depot">
|
2019-02-20 08:51:55 +00:00
|
|
|
<dir name="nfeske">
|
2017-12-08 15:44:44 +00:00
|
|
|
<ram/>
|
2019-02-20 08:51:55 +00:00
|
|
|
<inline name="download">} [depot_user_download nfeske] {</inline>
|
|
|
|
<inline name="pubkey">} [depot_user_pubkey nfeske] {</inline>
|
|
|
|
</dir>
|
|
|
|
<dir name="genodelabs">
|
|
|
|
<ram/>
|
|
|
|
<inline name="download">} [depot_user_download genodelabs] {</inline>
|
|
|
|
<inline name="pubkey">} [depot_user_pubkey genodelabs] {</inline>
|
2017-12-08 15:44:44 +00:00
|
|
|
</dir>
|
|
|
|
</dir>
|
|
|
|
<dir name="public"> <ram/> </dir>
|
|
|
|
</vfs>
|
2018-02-16 09:29:32 +00:00
|
|
|
<policy label="depot_download -> depot" root="/depot" writeable="yes"/>
|
|
|
|
<policy label="depot_download -> public" root="/public" writeable="yes"/>
|
2017-12-08 15:44:44 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="report_rom">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
|
|
<config verbose="yes">
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="depot_download" caps="2000">
|
|
|
|
<binary name="init"/>
|
2018-04-19 13:04:43 +00:00
|
|
|
<resource name="RAM" quantum="70M"/>
|
2017-12-08 15:44:44 +00:00
|
|
|
<route>
|
|
|
|
<service name="ROM" label="config">
|
|
|
|
<parent label="depot_download.config"/> </service>
|
2018-05-19 15:52:48 +00:00
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
2017-12-08 15:44:44 +00:00
|
|
|
<service name="File_system"> <child name="vfs"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
|
|
|
|
set fd [open [run_dir]/genode/installation w]
|
2019-02-20 08:51:55 +00:00
|
|
|
puts $fd {
|
|
|
|
<installation arch="x86_64">
|
|
|
|
<archive path="genodelabs/pkg/wm/2018-02-26"/>
|
|
|
|
<index path="nfeske/index/19.02"/>
|
|
|
|
<index path="nfeske/index/19.03"/>
|
|
|
|
</installation>}
|
2017-12-08 15:44:44 +00:00
|
|
|
close $fd
|
|
|
|
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
file copy -force [genode_dir]/repos/gems/recipes/raw/depot_download/depot_download.config \
|
|
|
|
[run_dir]/genode/depot_download.config
|
|
|
|
|
|
|
|
build { app/depot_download_manager app/depot_query }
|
|
|
|
|
|
|
|
append boot_modules { depot_download_manager depot_query }
|
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
2019-04-24 13:09:49 +00:00
|
|
|
append qemu_args " -nographic "
|
2020-04-02 19:20:50 +00:00
|
|
|
append_qemu_nic_args
|
2019-04-24 13:09:49 +00:00
|
|
|
|
2017-12-08 15:44:44 +00:00
|
|
|
|
2019-02-20 08:51:55 +00:00
|
|
|
# watch the state reports generated by the depot-download manager
|
|
|
|
set expected_pattern {}
|
|
|
|
append expected_pattern {.*path="genodelabs/pkg/wm/2018-02-26" state="done".*}
|
|
|
|
append expected_pattern {.*path="nfeske/index/19.02" state="done".*}
|
|
|
|
append expected_pattern {.*path="nfeske/index/19.03" state="failed".*}
|
|
|
|
|
|
|
|
run_genode_until $expected_pattern 150
|