From 53316bfd55d1f6668ec376960561613290efb89a Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Tue, 6 May 2014 16:57:35 +0200 Subject: [PATCH] ports-foc: Enable l4inux_netperf tests for x86 USB network cards can now be tested on x86. Ref #1143 --- repos/ports-foc/run/l4linux_netperf.inc | 72 +++++++++++++++++++++---- 1 file changed, 62 insertions(+), 10 deletions(-) diff --git a/repos/ports-foc/run/l4linux_netperf.inc b/repos/ports-foc/run/l4linux_netperf.inc index c3f03275d..7d077a10a 100644 --- a/repos/ports-foc/run/l4linux_netperf.inc +++ b/repos/ports-foc/run/l4linux_netperf.inc @@ -4,7 +4,17 @@ # \date 2013-07-08 # +assert_spec foc +assert_spec 32bit + +if {[have_spec arm]} { assert_spec foc_arndale +} + +set ip [check_installed ip] +set wget [check_installed wget] +set md5 [check_installed md5sum] + if {$use_nic_bridge == 1} { set route_nic "nic_bridge" @@ -54,6 +64,9 @@ set build_components { l4linux } +lappend_if [have_spec pci] build_components drivers/pci +lappend_if [have_spec acpi] build_components drivers/acpi + build $build_components create_boot_directory @@ -82,9 +95,35 @@ set config { +} + +append_if [have_spec acpi] config { + + + + + + + + + + + + } + +append_if [expr ![have_spec acpi] && [have_spec pci]] config { + + + + } + +append config { - + + + + @@ -93,7 +132,7 @@ set config { - } + } append config " " append config { @@ -103,10 +142,15 @@ append config { +} +append_if [have_spec arm] config { +} + +append config { @@ -148,22 +192,30 @@ set boot_modules { initrd.gz usb_drv nic_bridge - platform_drv kdb_uart_drv } +lappend_if [have_spec arm] boot_modules platform_drv +lappend_if [have_spec pci] boot_modules pci_drv +lappend_if [have_spec acpi] boot_modules acpi_drv + set uri "http://genode.org/files/l4linux/initrd-arm-netperf.gz" +if {[have_spec x86]} { + set uri "http://genode.org/files/l4linux/busybox-initrd-x86-20140506.gz" +} elseif {[have_spec arm]} { + set uri "http://genode.org/files/l4linux/initrd-arm-mdev.gz" +} if {![file exists bin/initrd.gz]} { puts "Download initramfs ..." - exec >& /dev/null wget -c -O bin/initrd.gz $uri + exec >& /dev/null $wget -c -O bin/initrd.gz $uri + exec >& /dev/null $wget -O bin/initrd.gz.md5 $uri.md5 + cd bin + exec $md5 -c initrd.gz.md5 + cd .. } -exec >& /dev/null wget -O bin/initrd.gz.md5 $uri.md5 -cd bin -exec md5sum -c initrd.gz.md5 -cd .. -build_boot_image [join $boot_modules " "] +build_boot_image $boot_modules # @@ -174,7 +226,7 @@ set ip_match "(\[0-9]{1,3})\\.(\[0-9]{1,3})\\.(\[0-9]{1,3})\\.(\[0-9]{1,3})" # # Local IP # -set ip_string [ exec ip addr show dev eth0 ] +set ip_string [ exec $ip addr show dev eth0 ] regexp $ip_match $ip_string ip_local