第一次交叉编译基于群晖 213j(CPU:Armada 370)的iperf过程

前言

为了测试网络吞吐率,使用iperf,但是官网没有提供arm版,只能自己编译。

基础

系统:Ubuntu 17.04
一开始用CentOS 6.9,怎么着都编译不过去,报错”/lib64/libc.so.6: version `GLIBC_2.18’ not found (required by /lib64/libstdc++.so.6)”
编译器 : armada370-gcc493_glibc220_hard-GPL.txz
iperf : iperf v3.3

过程

root@ubuntu:~# mkdir soft
root@ubuntu:~# cd soft
root@ubuntu:~/soft# tar axf armada370-gcc493_glibc220_hard-GPL.txz
root@ubuntu:~/soft# tar axf iperf-3.3.tar.gz
root@ubuntu:~/soft# cd arm-unkNown-linux-gnueabi/bin
root@ubuntu:~/soft/arm-unkNown-linux-gnueabi/bin# export PATH=$PATH:`pwd`
root@ubuntu:~/soft/arm-unkNown-linux-gnueabi/bin# mkdir ~/soft/iperf
root@ubuntu:~/soft/arm-unkNown-linux-gnueabi/bin# cd ../../iperf-3.3/
root@ubuntu:~/soft/iperf-3.3# ./configure --host=arm-unkNown-linux-gnueabi --prefix=/root/soft/iperf CXX=arm-unkNown-linux-gnueabi-g++
root@ubuntu:~/soft/iperf-3.3# make -j 4 && make install
root@ubuntu:~/soft/iperf-3.3# cd ../iperf3/bin
root@ubuntu:~/soft/iperf/bin# file iperf3
iperf3: ELF 32-bit LSB executable,ARM,EABI5 version 1 (SYSV),dynamically linked,interpreter /lib/ld-linux-armhf.so.3,for GNU/Linux 2.6.32,not stripped
root@ubuntu:~/soft/iperf/bin# arm-unkNown-linux-gnueabi-strip iperf3
root@ubuntu:~/soft/iperf/bin# file iperf3
iperf3: ELF 32-bit LSB executable,stripped

root@ubuntu:~/soft/iperf/bin# ll
总用量 40
drwxr-xr-x 2 root root  4096 1214 16:13 ./
drwxr-xr-x 6 root root  4096 1214 16:10 ../
-rwxr-xr-x 1 root root  5908 1214 16:13 iperf3
-rwxr-xr-x 1 root root 24072 1214 16:13 iperf3.nostrip

结尾

关键点在于./configure 的时候要指定--host

参考

Cross-compiling FFmpeg for Serviio 1.8 with shared libraries on Synology NAS (for 7 cpu architectures) | PC LOAD LETTER
https://pcloadletter.co.uk/2017/01/07/cross-compiling-ffmpeg-for-serviio-1-8-with-shared-libraries-on-synology-nas-for-7-cpu-architectures/

我的群晖是什么cpu
https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/General/What_kind_of_CPU_does_my_NAS_have

iPerf - The ultimate speed test tool for TCP,UDP and SCTP
https://iperf.fr/

下载

iPerf v3.3 for Armada370
http://download.csdn.net/download/sbdx/10158763

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...