2021-01-29 12:48:00 +00:00
|
|
|
if {[expr ![have_spec nova] && ![have_spec sel4] && ![have_spec hw] && ![have_spec foc] || ![have_spec x86] || [have_include power_on/qemu]]} {
|
2018-05-22 13:01:25 +00:00
|
|
|
puts "\n Run script is not supported on this platform. \n"; exit 0 }
|
|
|
|
|
|
|
|
proc wifi_ssid {} {
|
|
|
|
return "$::env(GENODE_WIFI_SSID2)" }
|
|
|
|
|
|
|
|
proc wifi_psk {} {
|
|
|
|
return "$::env(GENODE_WIFI_PSK2)" }
|
|
|
|
|
|
|
|
create_boot_directory
|
2022-09-16 12:05:32 +00:00
|
|
|
import_from_depot [depot_user]/src/[base_src] \
|
2023-05-02 16:17:56 +00:00
|
|
|
[depot_user]/pkg/pc_wifi \
|
2024-05-30 13:46:57 +00:00
|
|
|
[depot_user]/src/acpi \
|
2022-09-16 12:05:32 +00:00
|
|
|
[depot_user]/src/dynamic_rom \
|
|
|
|
[depot_user]/src/init \
|
2024-05-30 13:46:57 +00:00
|
|
|
[depot_user]/src/pc_nic \
|
2022-09-16 12:05:32 +00:00
|
|
|
[depot_user]/src/nic_router \
|
|
|
|
[depot_user]/src/pci_decode \
|
2024-05-30 13:46:57 +00:00
|
|
|
[depot_user]/src/platform \
|
2022-09-16 12:05:32 +00:00
|
|
|
[depot_user]/src/report_rom \
|
2024-05-30 13:46:57 +00:00
|
|
|
[depot_user]/src/pc_rtc
|
2022-09-16 12:05:32 +00:00
|
|
|
|
2024-06-14 09:07:17 +00:00
|
|
|
build { app/ping server/nic_router test/nic_router_uplinks }
|
2022-09-16 12:05:32 +00:00
|
|
|
|
|
|
|
install_config {
|
2018-05-22 13:01:25 +00:00
|
|
|
<config prio_levels="4">
|
|
|
|
<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>
|
2022-09-16 12:05:32 +00:00
|
|
|
<default caps="100"/>
|
|
|
|
|
2023-07-27 10:05:50 +00:00
|
|
|
<start name="report_rom" caps="200">
|
2024-06-14 09:07:17 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
2022-09-16 12:05:32 +00:00
|
|
|
<provides>
|
|
|
|
<service name="ROM" />
|
|
|
|
<service name="Report" />
|
|
|
|
</provides>
|
|
|
|
<config>
|
2024-05-30 13:46:57 +00:00
|
|
|
<policy label="pci_decode -> system" report="acpi -> acpi"/>
|
2024-06-14 09:07:17 +00:00
|
|
|
<policy label="platform -> devices" report="pci_decode -> devices"/>
|
|
|
|
<policy label="router -> config" report="test -> router_config"/>
|
|
|
|
<policy label="test -> ping_result" report="ping -> result"/>
|
2022-09-16 12:05:32 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="acpi" caps="250">
|
2022-09-16 12:05:32 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
</start>
|
2018-05-22 13:01:25 +00:00
|
|
|
|
2022-09-16 12:05:32 +00:00
|
|
|
<start name="pci_decode" caps="350">
|
2022-11-18 13:11:38 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2022-09-16 12:05:32 +00:00
|
|
|
<route>
|
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
|
|
<service name="ROM" label="system"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="platform" caps="100" managing_system="yes">
|
2022-09-16 12:05:32 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides> <service name="Platform"/> </provides>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="devices"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
<config>
|
2024-05-30 13:46:57 +00:00
|
|
|
<policy label_prefix="wifi" info="yes"> <pci class="WIFI"/> </policy>
|
|
|
|
<policy label_prefix="nic" info="yes"> <pci class="ETHERNET"/> </policy>
|
2022-09-16 12:05:32 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
2018-05-22 13:01:25 +00:00
|
|
|
|
|
|
|
<start name="timer" priority="0">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
|
|
|
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="pc_rtc" priority="-1">
|
2018-05-22 13:01:25 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides>
|
|
|
|
<service name="Rtc"/>
|
|
|
|
</provides>
|
|
|
|
</start>
|
|
|
|
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="nic" priority="-1" caps="250">
|
|
|
|
<binary name="pc_nic"/>
|
2021-01-08 16:27:24 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
|
|
|
<route>
|
|
|
|
<service name="Uplink"> <child name="router"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2018-05-22 13:01:25 +00:00
|
|
|
</start>
|
|
|
|
|
2024-06-14 09:07:17 +00:00
|
|
|
<start name="wifi" caps="600" priority="-1">
|
2022-03-28 12:20:25 +00:00
|
|
|
<resource name="RAM" quantum="32M"/>
|
2021-05-26 06:02:03 +00:00
|
|
|
<config ld_verbose="no">
|
2018-05-22 13:01:25 +00:00
|
|
|
<vfs>
|
2023-07-07 09:46:39 +00:00
|
|
|
<dir name="dev"> <log/> <rtc/> <null/>
|
2018-05-22 13:01:25 +00:00
|
|
|
<jitterentropy name="random"/>
|
|
|
|
<jitterentropy name="urandom"/>
|
|
|
|
</dir>
|
|
|
|
<dir name="config"> <ram/> </dir>
|
2023-05-03 15:34:22 +00:00
|
|
|
<dir name="firmware">
|
|
|
|
<tar name="wifi_firmware.tar"/>
|
|
|
|
</dir>
|
2018-05-22 13:01:25 +00:00
|
|
|
</vfs>
|
2018-08-09 09:09:19 +00:00
|
|
|
<libc stdout="/dev/null" stderr="/dev/null" rtc="/dev/rtc"/>
|
2018-05-22 13:01:25 +00:00
|
|
|
</config>
|
|
|
|
<route>
|
2021-01-08 16:27:24 +00:00
|
|
|
<service name="Uplink"> <child name="router"/> </service>
|
2018-05-22 13:01:25 +00:00
|
|
|
<service name="Rtc"> <any-child/> </service>
|
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
2018-08-09 09:09:19 +00:00
|
|
|
<service name="ROM" label="wifi_config"> <child name="config_rom"/> </service>
|
2023-05-02 16:17:56 +00:00
|
|
|
<service name="ROM" label="wifi.lib.so"> <parent label="pc_wifi.lib.so"/> </service>
|
2023-05-03 15:34:22 +00:00
|
|
|
<service name="ROM" label="wifi_firmware.tar"> <parent label="pc_wifi_firmware.tar"/> </service>
|
2018-05-22 13:01:25 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="config_rom" priority="-2">
|
|
|
|
<binary name="dynamic_rom"/>
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<provides><service name="ROM"/></provides>
|
2024-06-14 09:07:17 +00:00
|
|
|
<config>
|
2018-08-09 09:09:19 +00:00
|
|
|
<rom name="wifi_config">
|
2018-05-22 13:01:25 +00:00
|
|
|
<inline description="CONNECT">
|
2018-09-13 13:13:23 +00:00
|
|
|
<wifi_config connected_scan_interval="0" scan_interval="5" rfkill="no" verbose="no" verbose_state="no">
|
|
|
|
<network ssid="} [wifi_ssid] {" protection="WPA2" passphrase="} [wifi_psk] {"/>
|
2018-08-09 09:09:19 +00:00
|
|
|
</wifi_config>
|
2018-05-22 13:01:25 +00:00
|
|
|
</inline>
|
|
|
|
<sleep milliseconds="600000"/> <!-- 10 minutes -->
|
|
|
|
</rom>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="router" caps="200" priority="-2">
|
|
|
|
<binary name="nic_router"/>
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
2020-12-07 15:46:15 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Nic"/>
|
|
|
|
<service name="Uplink"/>
|
|
|
|
</provides>
|
2018-05-22 13:01:25 +00:00
|
|
|
<route>
|
2024-06-14 09:07:17 +00:00
|
|
|
<service name="ROM" label="config"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="test" caps="200" priority="-2">
|
|
|
|
<binary name="test-nic_router_uplinks"/>
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<route>
|
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
|
|
<service name="ROM" label="ping_result"> <child name="report_rom"/> </service>
|
2018-05-22 13:01:25 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="ping" priority="-2">
|
|
|
|
<resource name="RAM" quantum="8M"/>
|
|
|
|
<config dst_ip="1.1.1.1"
|
|
|
|
period_sec="1"
|
2024-06-14 09:07:17 +00:00
|
|
|
report="yes"
|
2018-05-22 13:01:25 +00:00
|
|
|
count="999"/>
|
|
|
|
<route>
|
2024-06-14 09:07:17 +00:00
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
2018-05-22 13:01:25 +00:00
|
|
|
<service name="Nic"> <child name="router"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
2024-06-14 09:07:17 +00:00
|
|
|
append qemu_args " -nographic "
|
2018-05-22 13:01:25 +00:00
|
|
|
|
2024-06-14 09:07:17 +00:00
|
|
|
build_boot_image [build_artifacts]
|
2018-05-22 13:01:25 +00:00
|
|
|
|
2024-06-14 09:07:17 +00:00
|
|
|
run_genode_until "child \"test\" exited with exit value.*\n" 300
|
|
|
|
grep_output {\[init\] child "test" exited with exit value}
|
|
|
|
compare_output_to {[init] child "test" exited with exit value 0}
|