iperf-2.0.9 在 Linux下的编译 与 海思(arm)平台的交叉编译

iperf-2.0.9 可以用来测试网络带宽,网速等,需要了解具体功能的可以到网上查一下,它的官网是 https://iperf.fr/,安装包和源码可以从这个路径(https://iperf.fr/iperf-download.php)下载,本文使用的是 iPerf 2.0.9 版本。

一、编译环境

我这里使用的编译环境是 Ubuntu 14.04.5 LTS
在这里插入图片描述
使用的交叉编译器是 arm-hisiv100nptl-linux-gcc 4.4.1 的,如下:
在这里插入图片描述

二、在Ubuntu下编译步骤

2.1 编译步骤

在Ubuntu下的编译过程就下面几步,非常简单:解压、创建目标目录、指定编译选项、安装。

tar zxvf iperf-2.0.9-source.tar.gz
cd iperf-2.0.9
mkdir result 
./configure --prefix=`pwd`/result --disable-shared --enable-static
make && make install

编译选项说明
--prefix=`pwd`/result :指定安装目录
--disable-shared :禁止编译动态库
--enable-static :使能编译动态库

2.2 编译过程打印

/home/samba/00_thirdLib/iperf# tar zxvf iperf-2.0.9-source.tar.gz
iperf-2.0.9/
iperf-2.0.9/config.guess
iperf-2.0.9/missing
...
...省略无用打印
iperf-2.0.9/INSTALL
/home/samba/00_thirdLib/iperf# cd iperf-2.0.9
/home/samba/00_thirdLib/iperf/iperf-2.0.9# mkdir result 
/home/samba/00_thirdLib/iperf/iperf-2.0.9# ./configure --prefix=`pwd`/result --disable-shared --enable-static
configure: WARNING: unrecognized options: --disable-shared, --enable-static
checking for a BSD-compatible install... /usr/bin/install -c
...
...省略无用打印
configure: WARNING: unrecognized options: --disable-shared, --enable-static
/home/samba/00_thirdLib/iperf/iperf-2.0.9# make && make install

三、使用交叉编译器编译步骤

3.1 编译步骤

使用 arm-hisiv100nptl-linux-gcc 交叉编译工具编译的话,步骤和上面差不多,就是配置编译选项的步骤有点区别,步骤如下:

tar zxvf iperf-2.0.9-source.tar.gz
cd iperf-2.0.9
mkdir result 
CC=arm-hisiv100nptl-linux-gcc CXX=arm-hisiv100nptl-linux-g++ ./configure --build=i386-linux --host=arm-linux --target=arm-linux --disable-shared --enable-static --prefix="`pwd`/result"
make && make install

以上就是编译 iperf-2.0.9 的全部过程了,这个程序在Linux下编译,总体还算顺利,之前编译 iperf 3.x.x 的还需要修改Makefile,不过工具的用法都差不多,因为急着用,就下载iperf-2.0.9 这个来使用,记录一下编译过程。

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wkd_007

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值