2019-10-15 18:34:47 +00:00
|
|
|
if { [get_cmd_switch --autopilot] } { assert_spec x86 }
|
2019-07-12 13:13:40 +00:00
|
|
|
|
|
|
|
if { [have_spec linux] } {
|
|
|
|
puts "Run script is not supported on this platform."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
2019-09-09 10:15:07 +00:00
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
|
|
|
[depot_user]/pkg/[drivers_nic_pkg] \
|
2021-01-08 16:27:24 +00:00
|
|
|
[depot_user]/src/nic_router \
|
2022-02-28 20:37:17 +00:00
|
|
|
[depot_user]/src/init \
|
|
|
|
[depot_user]/src/report_rom
|
2019-07-12 13:13:40 +00:00
|
|
|
|
2022-02-28 20:37:17 +00:00
|
|
|
build { app/sntp_client }
|
2019-07-12 13:13:40 +00:00
|
|
|
|
2023-09-12 14:21:03 +00:00
|
|
|
install_config {
|
2019-07-12 13:13:40 +00:00
|
|
|
<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"/>
|
|
|
|
|
|
|
|
<start name="report_rom">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
|
|
|
<config verbose="yes">
|
|
|
|
<policy label_suffix="set_rtc" report="sntp_client -> set_rtc"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
|
|
|
|
2023-07-18 08:17:49 +00:00
|
|
|
<start name="drivers" caps="1200" managing_system="yes">
|
2020-07-10 11:04:12 +00:00
|
|
|
<resource name="RAM" quantum="32M"/>
|
2019-07-12 13:13:40 +00:00
|
|
|
<binary name="init"/>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
|
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
2021-01-08 16:27:24 +00:00
|
|
|
<service name="Uplink"> <child name="nic_router"/> </service>
|
2019-07-12 13:13:40 +00:00
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
2021-01-08 16:27:24 +00:00
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="nic_router" caps="200">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<provides>
|
|
|
|
<service name="Nic"/>
|
|
|
|
<service name="Uplink"/>
|
|
|
|
</provides>
|
|
|
|
<config verbose_domain_state="yes">
|
|
|
|
|
|
|
|
<policy label_prefix="sntp_client" domain="downlink"/>
|
|
|
|
<policy label_prefix="drivers" domain="uplink"/>
|
|
|
|
|
|
|
|
<domain name="uplink">
|
|
|
|
|
|
|
|
<nat domain="downlink"
|
|
|
|
tcp-ports="16384"
|
|
|
|
udp-ports="16384"
|
|
|
|
icmp-ids="16384"/>
|
|
|
|
|
|
|
|
</domain>
|
|
|
|
|
|
|
|
<domain name="downlink" interface="10.0.3.1/24">
|
|
|
|
|
|
|
|
<dhcp-server ip_first="10.0.3.2"
|
|
|
|
ip_last="10.0.3.2"
|
2021-08-05 11:31:13 +00:00
|
|
|
dns_config_from="uplink"/>
|
2021-01-08 16:27:24 +00:00
|
|
|
|
|
|
|
<tcp dst="0.0.0.0/0"><permit-any domain="uplink" /></tcp>
|
|
|
|
<udp dst="0.0.0.0/0"><permit-any domain="uplink" /></udp>
|
|
|
|
<icmp dst="0.0.0.0/0" domain="uplink"/>
|
|
|
|
|
|
|
|
</domain>
|
|
|
|
|
|
|
|
</config>
|
2019-07-12 13:13:40 +00:00
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="sntp_client">
|
|
|
|
<resource name="RAM" quantum="8M"/>
|
2023-09-22 11:43:57 +00:00
|
|
|
<config verbose="no" dst_addr="pool.ntp.org" period_min="1"/>
|
2021-01-08 16:27:24 +00:00
|
|
|
<route>
|
|
|
|
<service name="Nic"> <child name="nic_router"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2019-07-12 13:13:40 +00:00
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
2023-09-12 14:21:03 +00:00
|
|
|
build_boot_image [build_artifacts]
|
2019-07-12 13:13:40 +00:00
|
|
|
|
|
|
|
append qemu_args " -nographic "
|
2020-04-02 19:20:50 +00:00
|
|
|
append_qemu_nic_args
|
2019-07-12 13:13:40 +00:00
|
|
|
|
2024-07-24 09:03:43 +00:00
|
|
|
set done_string {report_rom\] <set_rtc year.*?\n}
|
2019-07-12 13:13:40 +00:00
|
|
|
|
|
|
|
run_genode_until $done_string 90
|
2024-07-24 09:03:43 +00:00
|
|
|
set serial_id [output_spawn_id]
|
|
|
|
run_genode_until $done_string 70 $serial_id
|