压力测试工具的百度云链接: http://pan.baidu.com/s/1kUXtxXH
tar zxvf stress-0.18.1.tar.gz
查看README.txt,本文主要讲解如何交叉编译stess文件移植到开发板上。
第一种方法: 在解压后的路径下输入:
./configure --host=aarch64-poky-linux
make
cd src/
file stress
第二种方法:
(1):更改configure文件,第255行:
# cross_compiling=no
cross_compiling=yes
(2):运行:
source /opt/poky/2.0.1/environment-setup-aarch64-poky-linux
./configure
make clean
(3):修改Makefile
# CC = gcc sunyi
CC = /opt/poky/2.0.1/sysroots/x86_64-pokysdk-Linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/opt/poky/2.0.1/sysroots/aarch64-poky-linux
make
make install
cd src/
file stress
sunyi@mint /mnt/hgfs/share/stress-0.18.1/src $ stress -c 1
stress: info: [9721] dispatching hogs: 1 cpu, 0 io, 0 vm, 0 hdd
sunyi@mint /mnt/hgfs/share/stress-0.18.1/src $ stress -c 2
stress: info: [9754] dispatching hogs: 2 cpu, 0 io, 0 vm, 0 hdd