mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-11 15:33:04 +00:00
parent
bf96c7f16e
commit
43e7cc56a3
@ -30,6 +30,16 @@ proc need_usb_hid { } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
##
|
||||||
|
# Return name of the NIC driver binary
|
||||||
|
#
|
||||||
|
proc nic_drv_binary { } {
|
||||||
|
if {[have_spec linux]} { return linux_nic_drv }
|
||||||
|
if {[have_spec omap4] || [have_spec arndale] || [have_spec rpi]} { return usb_drv }
|
||||||
|
if {!([have_spec imx53] || [have_spec riscv] || [have_spec odroid_xu] || [have_spec wand_quad])} { return nic_drv }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
proc platform_drv_build_components {} {
|
proc platform_drv_build_components {} {
|
||||||
set drv_build_components ""
|
set drv_build_components ""
|
||||||
lappend_if [have_platform_drv] drv_build_components drivers/platform
|
lappend_if [have_platform_drv] drv_build_components drivers/platform
|
||||||
|
@ -54,11 +54,10 @@ set config {
|
|||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="test-lxip_http_srv">
|
<start name="test-lxip_http_srv">
|
||||||
<resource name="RAM" quantum="8M"/>
|
<resource name="RAM" quantum="28M"/>
|
||||||
<config ld_verbose="yes">
|
<config ld_verbose="yes">
|
||||||
<libc stdout="/dev/log" stderr="/dev/log" ip_addr="10.0.2.55" gateway="10.0.2.1" netmask="255.255.255.0">
|
|
||||||
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
||||||
</libc>
|
<libc stdout="/dev/log" stderr="/dev/log" ip_addr="10.0.2.55" gateway="10.0.2.1" netmask="255.255.255.0"/>
|
||||||
</config>
|
</config>
|
||||||
</start>}
|
</start>}
|
||||||
|
|
||||||
@ -84,6 +83,7 @@ append_platform_drv_config
|
|||||||
|
|
||||||
append_if $use_nic_driver config {
|
append_if $use_nic_driver config {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -106,7 +106,7 @@ set boot_modules {
|
|||||||
|
|
||||||
# platform-specific modules
|
# platform-specific modules
|
||||||
lappend_if $use_usb_driver boot_modules usb_drv
|
lappend_if $use_usb_driver boot_modules usb_drv
|
||||||
lappend_if $use_nic_driver boot_modules nic_drv
|
lappend_if $use_nic_driver boot_modules [nic_drv_binary]
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
@ -29,7 +29,7 @@ create_boot_directory
|
|||||||
# Generate config
|
# Generate config
|
||||||
#
|
#
|
||||||
|
|
||||||
set config {
|
append config {
|
||||||
<config verbose="yes">
|
<config verbose="yes">
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="ROM"/>
|
<service name="ROM"/>
|
||||||
@ -52,21 +52,20 @@ set config {
|
|||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="test-lxip_udp_echo">
|
<start name="test-lxip_udp_echo">
|
||||||
<resource name="RAM" quantum="2M"/>
|
<resource name="RAM" quantum="28M"/>
|
||||||
<config port="1337">
|
<config port="1337">
|
||||||
<libc stdout="/dev/log" stderr="/dev/log" ip_addr="10.0.2.55"
|
|
||||||
gateway="10.0.2.1" netmask="255.255.255.0">
|
|
||||||
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
||||||
</libc>
|
<libc stdout="/dev/log" stderr="/dev/log" ip_addr="10.0.2.55"
|
||||||
|
gateway="10.0.2.1" netmask="255.255.255.0"/>
|
||||||
</config>
|
</config>
|
||||||
</start>}
|
</start>}
|
||||||
|
|
||||||
append_if [have_spec gpio] config "
|
append_if [have_spec gpio] config {
|
||||||
<start name=\"[gpio_drv]\">
|
<start name="} [gpio_drv] {">
|
||||||
<resource name=\"RAM\" quantum=\"4M\"/>
|
<resource name=\"RAM\" quantum=\"4M\"/>
|
||||||
<provides><service name=\"Gpio\"/></provides>
|
<provides><service name=\"Gpio\"/></provides>
|
||||||
<config/>
|
<config/>
|
||||||
</start>"
|
</start>}
|
||||||
|
|
||||||
append_if $use_usb_driver config {
|
append_if $use_usb_driver config {
|
||||||
<start name="usb_drv">
|
<start name="usb_drv">
|
||||||
@ -83,6 +82,7 @@ append_platform_drv_config
|
|||||||
|
|
||||||
append_if $use_nic_driver config {
|
append_if $use_nic_driver config {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -106,7 +106,7 @@ set boot_modules {
|
|||||||
|
|
||||||
# platform-specific modules
|
# platform-specific modules
|
||||||
lappend_if $use_usb_driver boot_modules usb_drv
|
lappend_if $use_usb_driver boot_modules usb_drv
|
||||||
lappend_if $use_nic_driver boot_modules nic_drv
|
lappend_if $use_nic_driver boot_modules [nic_drv_binary]
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
@ -14,7 +14,7 @@ build $build_components
|
|||||||
|
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
|
|
||||||
set config {
|
append config {
|
||||||
<config verbose="yes">
|
<config verbose="yes">
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="CPU"/>
|
<service name="CPU"/>
|
||||||
@ -35,7 +35,8 @@ set config {
|
|||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
<resource name="RAM" quantum="2M"/>
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides> <service name="Nic"/> </provides>
|
<provides> <service name="Nic"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
@ -82,8 +83,8 @@ append config {
|
|||||||
|
|
||||||
install_config $config
|
install_config $config
|
||||||
|
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init timer nic_drv vfs dynamic_rom
|
core init timer } [nic_drv_binary] { vfs dynamic_rom
|
||||||
ld.lib.so vfs_lxip.lib.so lxip.lib.so
|
ld.lib.so vfs_lxip.lib.so lxip.lib.so
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ build $build_components
|
|||||||
|
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
|
|
||||||
set config {
|
append config {
|
||||||
<config verbose="yes">
|
<config verbose="yes">
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="ROM"/>
|
<service name="ROM"/>
|
||||||
@ -39,6 +39,7 @@ set config {
|
|||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="2M"/>
|
<resource name="RAM" quantum="2M"/>
|
||||||
<provides> <service name="Nic"/> </provides>
|
<provides> <service name="Nic"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
@ -63,14 +64,13 @@ set config {
|
|||||||
<start name="test-vfs_lxip">
|
<start name="test-vfs_lxip">
|
||||||
<resource name="RAM" quantum="48M"/>
|
<resource name="RAM" quantum="48M"/>
|
||||||
<config>
|
<config>
|
||||||
<libc stdout="/dev/log" stderr="/dev/log">
|
|
||||||
<vfs>
|
<vfs>
|
||||||
<dir name="dev"> <log/> </dir>
|
<dir name="dev"> <log/> </dir>
|
||||||
<dir name="socket">
|
<dir name="socket">
|
||||||
<lxip ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1" nameserver="8.8.8.8"/>
|
<lxip ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1" nameserver="8.8.8.8"/>
|
||||||
</dir>
|
</dir>
|
||||||
</vfs>
|
</vfs>
|
||||||
</libc>
|
<libc stdout="/dev/log" stderr="/dev/log"/>
|
||||||
</config>
|
</config>
|
||||||
</start>
|
</start>
|
||||||
<!--
|
<!--
|
||||||
@ -88,9 +88,8 @@ append config {
|
|||||||
|
|
||||||
install_config $config
|
install_config $config
|
||||||
|
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init timer
|
core init timer } [nic_drv_binary] {
|
||||||
nic_drv
|
|
||||||
ld.lib.so libc.lib.so libc_lock_pipe.lib.so
|
ld.lib.so libc.lib.so libc_lock_pipe.lib.so
|
||||||
libm.lib.so
|
libm.lib.so
|
||||||
vfs_lxip.lib.so lxip.lib.so
|
vfs_lxip.lib.so lxip.lib.so
|
||||||
|
@ -84,6 +84,7 @@ append_if $use_usb_driver config {
|
|||||||
|
|
||||||
append_if $use_nic_driver config {
|
append_if $use_nic_driver config {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -129,8 +130,6 @@ append config {
|
|||||||
<arg value="-f" />
|
<arg value="-f" />
|
||||||
<arg value="/etc/lighttpd/lighttpd.conf" />
|
<arg value="/etc/lighttpd/lighttpd.conf" />
|
||||||
<arg value="-D" />
|
<arg value="-D" />
|
||||||
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log"
|
|
||||||
ip_addr="10.0.1.1" gateway="10.0.1.5" netmask="255.255.255.0">
|
|
||||||
<vfs>
|
<vfs>
|
||||||
<dir name="dev">
|
<dir name="dev">
|
||||||
<log/>
|
<log/>
|
||||||
@ -158,7 +157,9 @@ mimetype.assign = (
|
|||||||
<rom name="index.bin" as="index.bin" />
|
<rom name="index.bin" as="index.bin" />
|
||||||
</dir>
|
</dir>
|
||||||
</vfs>
|
</vfs>
|
||||||
</libc>
|
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log"
|
||||||
|
ip_addr="10.0.1.1" gateway="10.0.1.5"
|
||||||
|
netmask="255.255.255.0"/>
|
||||||
</config>
|
</config>
|
||||||
<route>
|
<route>
|
||||||
<service name="Nic"> <child name="nic_bridge"/> </service>
|
<service name="Nic"> <child name="nic_bridge"/> </service>
|
||||||
@ -187,7 +188,7 @@ set boot_modules {
|
|||||||
# platform-specific modules
|
# platform-specific modules
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
||||||
lappend_if $use_usb_driver boot_modules usb_drv
|
lappend_if $use_usb_driver boot_modules usb_drv
|
||||||
lappend_if $use_nic_driver boot_modules nic_drv
|
lappend_if $use_nic_driver boot_modules [nic_drv_binary]
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
assert_spec x86
|
||||||
|
|
||||||
set build_components {
|
set build_components {
|
||||||
core init
|
core init
|
||||||
drivers/timer drivers/nic lib/vfs/lxip
|
drivers/timer drivers/nic lib/vfs/lxip
|
||||||
@ -12,7 +14,7 @@ build $build_components
|
|||||||
|
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
|
|
||||||
set config {
|
append config {
|
||||||
<config verbose="yes">
|
<config verbose="yes">
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="CPU"/>
|
<service name="CPU"/>
|
||||||
@ -33,7 +35,8 @@ set config {
|
|||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
<resource name="RAM" quantum="2M"/>
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides> <service name="Nic"/> </provides>
|
<provides> <service name="Nic"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
@ -97,8 +100,8 @@ append config {
|
|||||||
|
|
||||||
install_config $config
|
install_config $config
|
||||||
|
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init timer nic_drv vfs dynamic_rom
|
core init timer } [nic_drv_binary] { vfs dynamic_rom
|
||||||
ld.lib.so libc.lib.so libm.lib.so
|
ld.lib.so libc.lib.so libm.lib.so
|
||||||
libc_resolv.lib.so
|
libc_resolv.lib.so
|
||||||
vfs_lxip.lib.so lxip.lib.so
|
vfs_lxip.lib.so lxip.lib.so
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
assert_spec linux
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build
|
# Build
|
||||||
#
|
#
|
||||||
@ -34,16 +36,15 @@ set config {
|
|||||||
<resource name="RAM" quantum="1M"/>
|
<resource name="RAM" quantum="1M"/>
|
||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="linux_nic_drv">
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides> <service name="Nic"/> </provides>
|
<provides> <service name="Nic"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="test-lwip_httpsrv">
|
<start name="test-lwip_httpsrv">
|
||||||
<resource name="RAM" quantum="5M"/>
|
<resource name="RAM" quantum="5M"/>
|
||||||
<config>
|
<config>
|
||||||
<libc stdout="/dev/log" stderr="/dev/log">
|
|
||||||
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
||||||
</libc>
|
<libc stdout="/dev/log" stderr="/dev/log"/>
|
||||||
</config>
|
</config>
|
||||||
</start>
|
</start>
|
||||||
</config>
|
</config>
|
||||||
@ -56,8 +57,8 @@ install_config $config
|
|||||||
#
|
#
|
||||||
|
|
||||||
set boot_modules {
|
set boot_modules {
|
||||||
core init timer nic_drv
|
core init timer linux_nic_drv
|
||||||
ld.lib.so libc.lib.so lwip.lib.so test-lwip_httpsrv
|
ld.lib.so libc.lib.so libm.lib.so lwip.lib.so test-lwip_httpsrv
|
||||||
}
|
}
|
||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
assert_spec linux
|
assert_spec x86
|
||||||
|
|
||||||
set build_components {
|
set build_components {
|
||||||
core init
|
core init
|
||||||
@ -14,7 +14,7 @@ build $build_components
|
|||||||
|
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
|
|
||||||
set config {
|
append config {
|
||||||
<config verbose="yes">
|
<config verbose="yes">
|
||||||
<parent-provides>
|
<parent-provides>
|
||||||
<service name="ROM"/>
|
<service name="ROM"/>
|
||||||
@ -37,7 +37,8 @@ set config {
|
|||||||
<provides> <service name="Timer"/> </provides>
|
<provides> <service name="Timer"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
<resource name="RAM" quantum="2M"/>
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides> <service name="Nic"/> </provides>
|
<provides> <service name="Nic"/> </provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
@ -146,8 +147,8 @@ append config {
|
|||||||
|
|
||||||
install_config $config
|
install_config $config
|
||||||
|
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init timer nic_drv ram_fs vfs
|
core init timer } [nic_drv_binary] { ram_fs vfs
|
||||||
ld.lib.so libc.lib.so libm.lib.so
|
ld.lib.so libc.lib.so libm.lib.so
|
||||||
libc_resolv.lib.so stdcxx.lib.so libc_pipe.lib.so
|
libc_resolv.lib.so stdcxx.lib.so libc_pipe.lib.so
|
||||||
vfs_lxip.lib.so lxip.lib.so
|
vfs_lxip.lib.so lxip.lib.so
|
||||||
@ -158,6 +159,8 @@ append_platform_drv_boot_modules
|
|||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
|
||||||
|
append qemu_args " -nographic -net nic,model=e1000 -net tap,ifname=tap0,downscript=no,script=no "
|
||||||
|
|
||||||
run_genode_until forever
|
run_genode_until forever
|
||||||
|
|
||||||
# vi: set ft=tcl :
|
# vi: set ft=tcl :
|
||||||
|
@ -47,6 +47,7 @@ append config {
|
|||||||
<provides><service name="Timer"/></provides>
|
<provides><service name="Timer"/></provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>
|
</start>
|
||||||
@ -96,9 +97,9 @@ install_config $config
|
|||||||
#
|
#
|
||||||
|
|
||||||
# generic modules
|
# generic modules
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init
|
core init
|
||||||
timer nic_drv
|
timer } [nic_drv_binary] {
|
||||||
nic_bridge
|
nic_bridge
|
||||||
ld.lib.so
|
ld.lib.so
|
||||||
libc.lib.so
|
libc.lib.so
|
||||||
@ -116,7 +117,7 @@ append_platform_drv_boot_modules
|
|||||||
|
|
||||||
build_boot_image $boot_modules
|
build_boot_image $boot_modules
|
||||||
|
|
||||||
append qemu_args " -m 512 "
|
append qemu_args " -m 512 -nographic "
|
||||||
|
|
||||||
append_if [have_spec x86] qemu_args " -net nic,model=e1000 "
|
append_if [have_spec x86] qemu_args " -net nic,model=e1000 "
|
||||||
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 "
|
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 "
|
||||||
|
@ -47,6 +47,7 @@ append config {
|
|||||||
<provides><service name="Timer"/></provides>
|
<provides><service name="Timer"/></provides>
|
||||||
</start>
|
</start>
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>
|
</start>
|
||||||
@ -68,8 +69,6 @@ append config {
|
|||||||
<arg value="-f" />
|
<arg value="-f" />
|
||||||
<arg value="/etc/lighttpd/lighttpd.conf" />
|
<arg value="/etc/lighttpd/lighttpd.conf" />
|
||||||
<arg value="-D" />
|
<arg value="-D" />
|
||||||
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log"
|
|
||||||
ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1">
|
|
||||||
<vfs>
|
<vfs>
|
||||||
<dir name="dev">
|
<dir name="dev">
|
||||||
<log/>
|
<log/>
|
||||||
@ -107,7 +106,8 @@ mimetype.assign = (
|
|||||||
</inline>
|
</inline>
|
||||||
</dir>
|
</dir>
|
||||||
</vfs>
|
</vfs>
|
||||||
</libc>
|
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log"
|
||||||
|
ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1"/>
|
||||||
</config>
|
</config>
|
||||||
<route>
|
<route>
|
||||||
<service name="Nic"> <child name="nic_bridge"/> </service>
|
<service name="Nic"> <child name="nic_bridge"/> </service>
|
||||||
@ -121,9 +121,8 @@ mimetype.assign = (
|
|||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
<config server_ip="10.0.2.55" server_port="80">
|
<config server_ip="10.0.2.55" server_port="80">
|
||||||
<libc stdout="/dev/log" stderr="/dev/log">
|
|
||||||
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
||||||
</libc>
|
<libc stdout="/dev/log" stderr="/dev/log"/>
|
||||||
</config>
|
</config>
|
||||||
</start>
|
</start>
|
||||||
</config>}
|
</config>}
|
||||||
@ -135,9 +134,9 @@ install_config $config
|
|||||||
#
|
#
|
||||||
|
|
||||||
# generic modules
|
# generic modules
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init
|
core init
|
||||||
timer nic_drv
|
timer } [nic_drv_binary] {
|
||||||
nic_bridge
|
nic_bridge
|
||||||
ld.lib.so
|
ld.lib.so
|
||||||
libc.lib.so
|
libc.lib.so
|
||||||
|
@ -8,8 +8,9 @@ proc enable_test_2 { } { return 1 }
|
|||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
|
|
||||||
proc nic_drv { } {
|
proc nic_drv { } {
|
||||||
if {[have_spec omap4] || [have_spec arndale] || [have_spec rpi]} { return usb_drv }
|
if {[nic_drv_binary] == "usb_drv"} { return usb_drv }
|
||||||
if {!([have_spec imx53] || [have_spec riscv] || [have_spec odroid_xu] || [have_spec wand_quad])} { return nic_drv }
|
if {[nic_drv_binary] == ""} { return "" }
|
||||||
|
return nic_drv
|
||||||
}
|
}
|
||||||
|
|
||||||
proc gpio_drv { } {
|
proc gpio_drv { } {
|
||||||
@ -54,6 +55,7 @@ proc nic_drv_config { } {
|
|||||||
if {[nic_drv] == "nic_drv"} {
|
if {[nic_drv] == "nic_drv"} {
|
||||||
append result {
|
append result {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="6M"/>
|
<resource name="RAM" quantum="6M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -247,7 +249,7 @@ build_boot_image "
|
|||||||
core init timer nic_router nic_bridge ld.lib.so libc.lib.so libm.lib.so
|
core init timer nic_router nic_bridge ld.lib.so libc.lib.so libm.lib.so
|
||||||
libc_resolv.lib.so lwip.lib.so lxip.lib.so test-http_clnt
|
libc_resolv.lib.so lwip.lib.so lxip.lib.so test-http_clnt
|
||||||
test-lwip_httpsrv_static nic_dump test-lxip_udp_echo test-lxip_udp_client
|
test-lwip_httpsrv_static nic_dump test-lxip_udp_echo test-lxip_udp_client
|
||||||
[nic_drv] [gpio_drv] [platform_drv_boot_modules]"
|
[nic_drv_binary] [gpio_drv] [platform_drv_boot_modules]"
|
||||||
|
|
||||||
proc nic_qemu_args { } {
|
proc nic_qemu_args { } {
|
||||||
if {[have_spec x86]} { return "-net nic,model=e1000" }
|
if {[have_spec x86]} { return "-net nic,model=e1000" }
|
||||||
|
@ -12,8 +12,9 @@ proc enable_test_6 { } { return 1 }
|
|||||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||||
|
|
||||||
proc nic_drv { } {
|
proc nic_drv { } {
|
||||||
if {[have_spec omap4] || [have_spec arndale] || [have_spec rpi]} { return usb_drv }
|
if {[nic_drv_binary] == "usb_drv"} { return usb_drv }
|
||||||
if {!([have_spec imx53] || [have_spec riscv] || [have_spec odroid_xu] || [have_spec linux] || [have_spec wand_quad])} { return nic_drv }
|
if {[nic_drv_binary] == ""} { return "" }
|
||||||
|
return nic_drv
|
||||||
}
|
}
|
||||||
|
|
||||||
proc gpio_drv { } {
|
proc gpio_drv { } {
|
||||||
@ -58,6 +59,7 @@ proc nic_drv_config { } {
|
|||||||
if {[nic_drv] == "nic_drv"} {
|
if {[nic_drv] == "nic_drv"} {
|
||||||
append result {
|
append result {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="6M"/>
|
<resource name="RAM" quantum="6M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -90,7 +92,7 @@ proc client_config { prot index ip_addr gateway netmask nic srv_port srv_ip } {
|
|||||||
append result {
|
append result {
|
||||||
<start name="} $prot {_client_} $index {">
|
<start name="} $prot {_client_} $index {">
|
||||||
<binary name="} [client_bin $prot] {" />
|
<binary name="} [client_bin $prot] {" />
|
||||||
<resource name="RAM" quantum="2M"/>
|
<resource name="RAM" quantum="28M"/>
|
||||||
<route>
|
<route>
|
||||||
<service name="Nic"> <child name="} $nic {"/> </service>
|
<service name="Nic"> <child name="} $nic {"/> </service>
|
||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
@ -108,7 +110,7 @@ proc server_config { prot index ip_addr gateway netmask nic port } {
|
|||||||
append result {
|
append result {
|
||||||
<start name="} $prot {_server_} $index {">
|
<start name="} $prot {_server_} $index {">
|
||||||
<binary name="} [server_bin $prot] {" />
|
<binary name="} [server_bin $prot] {" />
|
||||||
<resource name="RAM" quantum="2M"/>
|
<resource name="RAM" quantum="28M"/>
|
||||||
<route>
|
<route>
|
||||||
<service name="Nic"> <child name="} $nic {"/> </service>
|
<service name="Nic"> <child name="} $nic {"/> </service>
|
||||||
<any-service> <parent/> <any-child/> </any-service>
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
@ -269,12 +271,12 @@ build_boot_image "
|
|||||||
core init timer nic_router nic_bridge ld.lib.so libc.lib.so libm.lib.so
|
core init timer nic_router nic_bridge ld.lib.so libc.lib.so libm.lib.so
|
||||||
libc_resolv.lib.so lwip.lib.so lxip.lib.so test-http_clnt
|
libc_resolv.lib.so lwip.lib.so lxip.lib.so test-http_clnt
|
||||||
test-lwip_httpsrv_static test-lxip_udp_echo test-lxip_udp_client
|
test-lwip_httpsrv_static test-lxip_udp_echo test-lxip_udp_client
|
||||||
[nic_drv] [gpio_drv] [platform_drv_boot_modules]"
|
[nic_drv_binary] [gpio_drv] [platform_drv_boot_modules]"
|
||||||
|
|
||||||
proc nic_qemu_args { } {
|
proc nic_qemu_args { } {
|
||||||
if {[have_spec x86]} { return "-net nic,model=e1000" }
|
if {[have_spec x86]} { return "-net nic,model=e1000" }
|
||||||
if {[have_spec lan9118]} { return "-net nic,model=lan9118" } }
|
if {[have_spec lan9118]} { return "-net nic,model=lan9118" } }
|
||||||
|
|
||||||
append qemu_args "-m 384 -nographic -net user -redir udp:5555::1337 [nic_qemu_args]"
|
append qemu_args "-m 400 -nographic -net user -redir udp:5555::1337 [nic_qemu_args]"
|
||||||
|
|
||||||
run_genode_until {.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n} 60
|
run_genode_until {.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n.*Test done.*\n} 60
|
||||||
|
@ -246,6 +246,7 @@ proc drivers_start_nodes { feature_arg } {
|
|||||||
|
|
||||||
append_if [use_nic_drv feature] start_nodes {
|
append_if [use_nic_drv feature] start_nodes {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="8M"/>
|
<resource name="RAM" quantum="8M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>
|
</start>
|
||||||
@ -310,7 +311,7 @@ proc drivers_boot_modules { feature_arg } {
|
|||||||
lappend_if [use_gpio_drv feature] boot_modules [gpio_drv]
|
lappend_if [use_gpio_drv feature] boot_modules [gpio_drv]
|
||||||
lappend_if [use_input_filter feature] boot_modules input_filter
|
lappend_if [use_input_filter feature] boot_modules input_filter
|
||||||
lappend_if [use_input_filter feature] boot_modules [language_chargen].chargen
|
lappend_if [use_input_filter feature] boot_modules [language_chargen].chargen
|
||||||
lappend_if [use_nic_drv feature] boot_modules nic_drv
|
lappend_if [use_nic_drv feature] boot_modules [nic_drv_binary]
|
||||||
lappend_if [use_ps2_drv feature] boot_modules ps2_drv
|
lappend_if [use_ps2_drv feature] boot_modules ps2_drv
|
||||||
lappend_if [use_timer feature] boot_modules timer
|
lappend_if [use_timer feature] boot_modules timer
|
||||||
lappend_if [use_usb_drv feature] boot_modules usb_drv
|
lappend_if [use_usb_drv feature] boot_modules usb_drv
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
TARGET = nic_drv
|
TARGET = linux_nic_drv
|
||||||
REQUIRES = linux
|
REQUIRES = linux
|
||||||
LIBS = lx_hybrid config
|
LIBS = lx_hybrid config
|
||||||
SRC_CC = main.cc
|
SRC_CC = main.cc
|
||||||
|
@ -82,6 +82,7 @@ append_if $use_usb_driver config {
|
|||||||
|
|
||||||
append_if $use_nic_driver config {
|
append_if $use_nic_driver config {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -96,7 +97,6 @@ append config {
|
|||||||
<arg value="-f" />
|
<arg value="-f" />
|
||||||
<arg value="/etc/lighttpd/lighttpd.conf" />
|
<arg value="/etc/lighttpd/lighttpd.conf" />
|
||||||
<arg value="-D" />
|
<arg value="-D" />
|
||||||
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log">
|
|
||||||
<vfs>
|
<vfs>
|
||||||
<dir name="dev">
|
<dir name="dev">
|
||||||
<log/>
|
<log/>
|
||||||
@ -104,7 +104,7 @@ append config {
|
|||||||
</dir>
|
</dir>
|
||||||
<tar name="genode_org.tar"/>
|
<tar name="genode_org.tar"/>
|
||||||
</vfs>
|
</vfs>
|
||||||
</libc>
|
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log"/>
|
||||||
</config>
|
</config>
|
||||||
</start>}
|
</start>}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ set boot_modules {
|
|||||||
|
|
||||||
# platform-specific modules
|
# platform-specific modules
|
||||||
lappend_if $use_usb_driver boot_modules usb_drv
|
lappend_if $use_usb_driver boot_modules usb_drv
|
||||||
lappend_if $use_nic_driver boot_modules nic_drv
|
lappend_if $use_nic_driver boot_modules [nic_drv_binary]
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
||||||
|
|
||||||
append_platform_drv_boot_modules
|
append_platform_drv_boot_modules
|
||||||
|
@ -43,6 +43,7 @@ append_platform_drv_config
|
|||||||
|
|
||||||
append config {
|
append config {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>
|
</start>
|
||||||
@ -53,7 +54,6 @@ append config {
|
|||||||
<arg value="-f" />
|
<arg value="-f" />
|
||||||
<arg value="/etc/lighttpd/lighttpd.conf" />
|
<arg value="/etc/lighttpd/lighttpd.conf" />
|
||||||
<arg value="-D" />
|
<arg value="-D" />
|
||||||
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log">
|
|
||||||
<vfs>
|
<vfs>
|
||||||
<dir name="dev">
|
<dir name="dev">
|
||||||
<log/>
|
<log/>
|
||||||
@ -91,7 +91,7 @@ mimetype.assign = (
|
|||||||
</inline>
|
</inline>
|
||||||
</dir>
|
</dir>
|
||||||
</vfs>
|
</vfs>
|
||||||
</libc>
|
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log"/>
|
||||||
</config>
|
</config>
|
||||||
</start>}
|
</start>}
|
||||||
|
|
||||||
@ -106,8 +106,8 @@ install_config $config
|
|||||||
#
|
#
|
||||||
|
|
||||||
# generic modules
|
# generic modules
|
||||||
set boot_modules {
|
append boot_modules {
|
||||||
core init timer ld.lib.so nic_drv
|
core init timer ld.lib.so } [nic_drv_binary] {
|
||||||
libc.lib.so libm.lib.so
|
libc.lib.so libm.lib.so
|
||||||
lwip.lib.so zlib.lib.so
|
lwip.lib.so zlib.lib.so
|
||||||
lighttpd
|
lighttpd
|
||||||
|
@ -167,6 +167,7 @@ append_if $use_usb_driver config {
|
|||||||
|
|
||||||
append_if $use_nic_driver config {
|
append_if $use_nic_driver config {
|
||||||
<start name="nic_drv">
|
<start name="nic_drv">
|
||||||
|
<binary name="} [nic_drv_binary] {"/>
|
||||||
<resource name="RAM" quantum="4M"/>
|
<resource name="RAM" quantum="4M"/>
|
||||||
<provides><service name="Nic"/></provides>
|
<provides><service name="Nic"/></provides>
|
||||||
</start>}
|
</start>}
|
||||||
@ -274,7 +275,7 @@ lappend_if $use_nic_bridge boot_modules nic_bridge
|
|||||||
# platform-specific modules
|
# platform-specific modules
|
||||||
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
lappend_if [have_spec gpio] boot_modules [gpio_drv]
|
||||||
lappend_if $use_usb_driver boot_modules usb_drv
|
lappend_if $use_usb_driver boot_modules usb_drv
|
||||||
lappend_if $use_nic_driver boot_modules nic_drv
|
lappend_if $use_nic_driver boot_modules [nic_drv_binary]
|
||||||
|
|
||||||
append_if $use_wifi_driver boot_modules {
|
append_if $use_wifi_driver boot_modules {
|
||||||
ram_fs fs_rom report_rom
|
ram_fs fs_rom report_rom
|
||||||
|
Loading…
Reference in New Issue
Block a user