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

前端之家收集整理的这篇文章主要介绍了第一次交叉编译基于群晖 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

原文链接:https://www.f2er.com/ubuntu/350302.html

猜你在找的Ubuntu相关文章