run: add platform_drv to netperf run script

This commit is contained in:
Alexander Boettcher 2013-06-25 11:02:09 +02:00 committed by Stefan Kalkowski
parent ef6450d5d3
commit f1c99b190f
1 changed files with 31 additions and 9 deletions

View File

@ -1,6 +1,6 @@
# #
# \brief Test for using netperf # \brief Test for using netperf
# \author Alexander Boettcher # \author Alexander Boettcher
# \date 2013-04-18 # \date 2013-04-18
# #
@ -9,18 +9,33 @@
# Build # Build
# #
if {![file exists bin/netperf_host]} {
puts "\nPlease compile a netperf client of version 2.6.0 for your host system."
puts "The sources are available in 'ports/contrib/netperf'."
puts "Please copy the 'netperf' binary to '<build_dir>/bin/netperf_host'.\n"
exit 1
}
spawn bin/netperf_host -V
expect {
{Netperf version 2.6.0} { }
eof { puts "\nError: unsupported netperf version.\n"; exit 1 }
}
set build_components { set build_components {
core init core init
drivers/pci drivers/timer drivers/nic drivers/pci drivers/timer drivers/nic
app/netperf app/netperf
} }
set use_usb_driver [expr [have_spec omap4] || [have_spec exynos5]] set use_usb_driver [expr [have_spec omap4] || [have_spec exynos5]]
set use_nic_driver [expr !$use_usb_driver] set use_nic_driver [expr !$use_usb_driver]
set use_platform_driver [expr $use_usb_driver && [have_spec foc_arndale]]
lappend_if $use_usb_driver build_components drivers/usb lappend_if $use_usb_driver build_components drivers/usb
lappend_if [have_spec acpi] build_components drivers/acpi lappend_if $use_platform_driver build_components drivers/platform
lappend_if [have_spec pci] build_components drivers/pci/device_pd lappend_if [have_spec acpi] build_components drivers/acpi
lappend_if [have_spec pci] build_components drivers/pci/device_pd
build $build_components build $build_components
@ -62,14 +77,20 @@ set config {
</config> </config>
</start> } </start> }
append_if $use_platform_driver config {
<start name="platform_drv">
<resource name="RAM" quantum="1M" />
<provides><service name="Regulator"/></provides>
</start>}
append_if $use_usb_driver config { append_if $use_usb_driver config {
<start name="usb_drv"> <start name="usb_drv">
<resource name="RAM" quantum="12M"/> <resource name="RAM" quantum="12M"/>
<provides> <provides>
<service name="Nic"/> <service name="Nic"/>
</provides> </provides>
<config uhci="yes" ehci="yes" xhci="yes"> <config uhci="no" ehci="yes" xhci="no">
<nic mac="2e:60:90:0c:4e:01" /> <nic mac="2e:60:90:0c:4e:05" />
</config> </config>
</start>} </start>}
@ -118,6 +139,7 @@ set boot_modules {
} }
# platform-specific modules # platform-specific modules
lappend_if $use_platform_driver boot_modules platform_drv
lappend_if [have_spec acpi] boot_modules acpi_drv lappend_if [have_spec acpi] boot_modules acpi_drv
lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec pci] boot_modules pci_drv
lappend_if $use_usb_driver boot_modules usb_drv lappend_if $use_usb_driver boot_modules usb_drv
@ -150,7 +172,7 @@ if [is_qemu_available] {
puts "" puts ""
} }
spawn netperf -H $ip_addr -P 1 -v 2 -t TCP_STREAM -c -C -- -S 0,65520 -P 49153,49153 spawn bin/netperf_host -H $ip_addr -P 1 -v 2 -t TCP_STREAM -c -C -- -S 0,65520 -P 49153,49153
set netperf_id $spawn_id set netperf_id $spawn_id
run_genode_until "Segment" 60 $netperf_id run_genode_until "Segment" 60 $netperf_id