genode/repos/libports/run/lwip_lx.run

123 lines
3.0 KiB
Plaintext
Raw Normal View History

#
# To execute this run script on your Linux host you have to do some
# preparation:
#
2021-02-15 14:51:11 +00:00
# 1) Setup a TAP device:
# ! export USER=[YOUR_USER_NAME]
# ! export TAP_DEV=tap0
2021-02-15 14:51:11 +00:00
# ! sudo ip tuntap add dev $TAP_DEV mode tap user $USER
# ! sudo ip address flush dev $TAP_DEV
# ! sudo ip address add 10.0.2.1/24 brd 10.0.2.255 dev $TAP_DEV
# ! sudo ip link set dev $TAP_DEV addr 02:00:00:ca:fe:01
# ! sudo ip link set dev $TAP_DEV up
#
# 2) Now, start the test and connect using your favorite HTTP client, e.g.:
2021-02-15 14:51:11 +00:00
# ! cd build/x86_64
# ! make run/lwip_lx KERNEL=linux BOARD=linux
# ! lynx -dump http://10.0.2.55
#
# 3) Clean up your Linux when done testing:
# ! sudo ip tuntap delete $TAP_DEV mode tap
#
assert_spec linux
2011-12-22 15:19:25 +00:00
build {
core init timer lib/ld lib/libc lib/vfs lib/vfs_lwip
driver/nic test/lwip/http_srv server/nic_router server/report_rom
2011-12-22 15:19:25 +00:00
}
create_boot_directory
install_config {
2011-12-22 15:19:25 +00:00
<config verbose="yes">
2011-12-22 15:19:25 +00:00
<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>
2011-12-22 15:19:25 +00:00
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
2011-12-22 15:19:25 +00:00
<start name="timer">
2014-08-26 14:41:21 +00:00
<resource name="RAM" quantum="1M"/>
2011-12-22 15:19:25 +00:00
<provides> <service name="Timer"/> </provides>
</start>
<start name="devices_report_rom">
<binary name="report_rom"/>
<resource name="RAM" quantum="1200K"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides>
<config verbose="yes"/>
</start>
2024-05-30 13:46:57 +00:00
<start name="linux_nic" ld="no">
<resource name="RAM" quantum="8M"/>
<config>
<report mac_address="true"/>
</config>
<route>
<service name="Uplink"> <child name="nic_router"/> </service>
<service name="Report"> <child name="devices_report_rom"/> </service>
<any-service> <parent/> </any-service>
</route>
2011-12-22 15:19:25 +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="test-lwip_httpsrv" domain="downlink"/>
2024-05-30 13:46:57 +00:00
<policy label_prefix="linux_nic" domain="uplink"/>
<domain name="uplink" interface="10.0.2.55/24" gateway="10.0.2.1">
<nat domain="downlink"
tcp-ports="16384"
udp-ports="16384"
icmp-ids="16384"/>
<tcp-forward port="443" domain="downlink" to="10.0.3.2"/>
<tcp-forward port="80" domain="downlink" to="10.0.3.2"/>
</domain>
<domain name="downlink" interface="10.0.3.1/24"/>
</config>
</start>
2011-12-22 15:19:25 +00:00
<start name="test-lwip_httpsrv">
<resource name="RAM" quantum="5M"/>
<config ld_verbose="true">
<vfs>
<dir name="dev"> <log/> </dir>
<dir name="socket"> <lwip ip_addr="10.0.3.2" netmask="255.255.255.0" gateway="10.0.3.1"/> </dir>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log" socket="/socket"/>
</config>
2011-12-22 15:19:25 +00:00
</start>
2011-12-22 15:19:25 +00:00
</config>
}
build_boot_image [build_artifacts]
2011-12-22 15:19:25 +00:00
run_genode_until forever
# vi: set ft=tcl :