iperf crosee compilier


wget http://sourceforge.net/projects/iperf/files/latest/download/iperf-2.0.5.tar.gz

tar xvf iperf-2.0.5.tar.gz

./configure --host=arm-linux --prefix=`pwd`/./install \
CC=arm-mv5sft-linux-gnueabi-gcc CXX=arm-mv5sft-linux-gnueabi-g++ \
ac_cv_func_malloc_0_nonnull=yes

沒加上 ac_cv_func_malloc_0_nonnull=yes 會出現下面錯誤
        undefined reference to `rpl_malloc'

make && make install
       
利用 arm-mv5sft-linux-gnueabi-readelf -d install/bin/iperf 可以看到用到哪些 so 檔, 節錄如下

dynamic section at offset 0xcef8 contains 28 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000c (INIT)                       0x94e0
 0x0000000d (FINI)                       0x121b8
 0x00000019 (INIT_ARRAY)                 0x1ceec

加上 CFLAGS=-static CXXFLAGS=-static, 就不會用到 so 檔
    arm-mv5sft-linux-gnueabi-readelf -d install/bin/iperf

    There is no dynamic section in this file.

但檔案大小差很多, 75770 byte 和 988377 byte 的差異。








********************************************************************************************************
使用方法:

 server : iperf -s

 client : iperf -c 192.168.199.199 -t 10 -i 5



Reference : http://embetek.blogspot.tw/2012/04/iperf-for-arm-cross-compile.html



********************************************************************************************************
jperf 是有圖形 GUI 介面的 iperf
下載點在 http://code.google.com/p/xjperf/downloads/list

下載後, 直接執行 jperf.bat 就可以了



留言

這個網誌中的熱門文章

NMEA標準格式 -- GPS

網路 Transformer 的用途

cut,sed,awk 字串處理