genode/repos/dde_linux/run/wifi.run
Norman Feske bf62d6b896 Move timer from os to base repository
Since the timer and timeout handling is part of the base library (the
dynamic linker), it belongs to the base repository.

Besides moving the timer and its related infrastructure (alarm, timeout
libs, tests) to the base repository, this patch also moves the timer
from the 'drivers' subdirectory directly to 'src' and disamibuates the
timer's build locations for the various kernels. Otherwise the different
timer implementations could interfere with each other when using one
build directory with multiple kernels.

Note that this patch changes the include paths for the former os/timer,
os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/.

Issue #3101
2019-01-14 12:33:57 +01:00

194 lines
4.6 KiB
Tcl

#
# Configure wireless lan
#
proc wifi_ssid { } {
return $::env(GENODE_WIFI_SSID)
}
proc wifi_psk { } {
return $::env(GENODE_WIFI_PSK)
}
#
# Restrict platforms
#
assert_spec x86
#
# Build
#
set build_components {
core init timer
drivers/rtc
drivers/wifi
server/report_rom
server/dynamic_rom
test/lwip/http_srv
lib/vfs/jitterentropy
lib/vfs/lwip
}
source ${genode_dir}/repos/base/run/platform_drv.inc
append_platform_drv_build_components
build $build_components
create_boot_directory
#
# Generate config
#
append config {
<config verbose="yes">
<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="timer">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Timer"/> </provides>
</start>
<start name="rtc_drv">
<resource name="RAM" quantum="1M"/>
<provides> <service name="Rtc"/> </provides>
</start>
<start name="test-lwip_httpsrv">
<resource name="RAM" quantum="16M"/>
<config>
<libc stdout="/dev/null" stderr="/dev/log" socket="/socket"/>
<vfs>
<dir name="dev"> <log/> <null/> </dir>
<dir name="socket"> <lwip dhcp="yes"/> </dir>
</vfs>
</config>
</start>
<start name="scan_report_rom">
<binary name="report_rom"/>
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config verbose="no"/>
</start>
<start name="accesspoints_report_rom">
<binary name="report_rom"/>
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config verbose="no"/>
</start>
<start name="config_rom">
<binary name="dynamic_rom"/>
<resource name="RAM" quantum="4M"/>
<provides><service name="ROM"/></provides>
<config verbose="yes">
<rom name="wifi_config">
<inline description="disconnect">
<wifi_config connected_scan_interval="30" scan_interval="5" rfkill="no" verbose="no" verbose_state="no"/>
</inline>
<sleep milliseconds="15000"/>
<inline description="connect">
<wifi_config connected_scan_interval="30" scan_interval="5" rfkill="no" verbose="no" verbose_state="no">
<network ssid="} [wifi_ssid] {" protection="WPA2" explicit_scan="true" passphrase="} [wifi_psk] {"/>
</wifi_config>
</inline>
<sleep milliseconds="60000"/>
<inline description="rfkill block">
<wifi_config connected_scan_interval="30" scan_interval="5" rfkill="yes" verbose="no" verbose_state="no">
<network ssid="} [wifi_ssid] {" protection="WPA2" explicit_scan="true" passphrase="} [wifi_psk] {"/>
</wifi_config>
</inline>
<sleep milliseconds="30000"/>
<inline description="rfkill unblock">
<wifi_config connected_scan_interval="30" scan_interval="5" rfkill="no" verbose="no" verbose_state="no">
<network ssid="} [wifi_ssid] {" protection="WPA2" explicit_scan="true" passphrase="} [wifi_psk] {"/>
</wifi_config>
</inline>
<sleep milliseconds="30000"/>
</rom>
</config>
</start>
<start name="wifi_drv" caps="200">
<resource name="RAM" quantum="24M"/>
<provides> <service name="Nic"/> </provides>
<config ld_verbose="yes">
<libc stdout="/dev/null" stderr="/dev/null" rtc="/dev/rtc"/>
<vfs>
<dir name="dev"> <log/> <null/> <rtc/>
<jitterentropy name="random"/>
<jitterentropy name="urandom"/>
</dir>
</vfs>
</config>
<route>
<service name="Rtc"> <any-child/> </service>
<service name="Report" label="accesspoints"> <child name="accesspoints_report_rom"/> </service>
<service name="Report" label="state"> <child name="scan_report_rom"/> </service>
<service name="ROM" label="wifi_config"> <child name="config_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>}
append_platform_drv_config
append config {
</config>
}
install_config $config
set firmware_modules {
iwlwifi-6000-4.ucode
iwlwifi-6000g2a-6.ucode
iwlwifi-6000g2b-6.ucode
iwlwifi-7260-17.ucode
iwlwifi-7265-17.ucode
iwlwifi-7265D-29.ucode
iwlwifi-8000C-36.ucode
iwlwifi-8265-36.ucode
regulatory.db
}
#
# Boot modules
#
# generic modules
set boot_modules {
core ld.lib.so init timer rtc_drv report_rom dynamic_rom
vfs_jitterentropy.lib.so
libc.lib.so vfs.lib.so libcrypto.lib.so libssl.lib.so
wpa_driver_nl80211.lib.so wpa_supplicant.lib.so
wifi.lib.so
wifi_drv
test-lwip_httpsrv
vfs_lwip.lib.so
}
append boot_modules $firmware_modules
append_platform_drv_boot_modules
build_boot_image $boot_modules
run_genode_until forever
# vi: set ft=tcl :