iperf打流工具
本示例适用平台:ok4418
编译方法
克隆源码
git clone https://github.com/esnet/iperf.git
交叉编译
mkdir install
./configure --host=arm-linux CC=arm-cortex_a9-linux-gnueabi-gcc CFLAGS=-static CXX=arm-cortex_a9-linux-gnueabi-g++ CXXFLAGS=-static --prefix=$PWD/install
make;make install
用法
TBC
phytool
本示例适用平台:rk3399
网络phy芯片调试工具。
编译方法
克隆源码
git clone https://github.com/wkz/phytool.git
加载环境变量
source envsetup.sh
编译
make
用法
$ ./phytool
Usage: phytool read IFACE/ADDR/REG
phytool write IFACE/ADDR/REG <0-0xffff>
phytool print IFACE/ADDR[/REG]
Clause 22:
ADDR := <0-0x1f>
REG := <0-0x1f>
Clause 45 (not supported by all MDIO drivers):
ADDR := PORT:DEV
PORT := <0-0x1f>
DEV := <0-0x1f>
REG := <0-0xffff>
Examples:
phytool read eth0/0:4/0x1000
phytool write eth0/0xa/0 0x1140
phytool print eth0/0x1c
The `read` and `write` commands are simple register level
accessors. The `print` command will pretty-print a register. When
using the `print` command, the register is optional. If left out, the
most common registers will be shown.
Bug report address: https://github.com/wkz/phytool/issues
查看3399平台eth0口phy芯片寄存器值
[root@rk3399:/]# ./phytool print eth0/0:1
ieee-phy: id:0x001cc915
ieee-phy: reg:BMCR(0x00) val:0x1140
flags: -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 1000-full
ieee-phy: reg:BMSR(0x01) val:0x7949
capabilities: -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
flags: +ext-status -aneg-complete -remote-fault +aneg-capable -link -jabber +ext-register
memtester
本示例适用平台:t507
内存压力测试工具。
编译方法
依托t507的sdk,使用bulidroot添加memtester到文件系统。
添加编译配置
make menuconfig
重现编译buidlroot,获取编译的可执行文件
用法
memtester size times
lz4
压缩工具,一般镜像编译完成后的压缩打包会用到。
编译方法
git clone https://github.com/ScottImpGreen/lz4.git
make install
sudo make install
用法
export PATH=/usr/local/bin:$PATH
交叉编译语法
参考链接:
https://blog.csdn.net/liufuchun111/article/details/81509651
–build
用来指定执行代码编译的主机,一般由config.guess自动配置
例如:
--build=x86
–host
用来指定编译出来的二进制程序所执行的主机环境
例如:
--host=arm64
–prefix
用来指定程序编译完成后安装的路径
例如:
--prefix=$PWD/install
安装路径
1.Makefile工程
# make install DESTDIR=/path
2.QT工程
make install INSTALL_ROOT=/path
3.ninja工程
DESTDIR=/path ninja -C . install
注意:./path为绝对路径