memtester内存测试工具移植到imx6ul开发板中测试
主机平台: UBUNTU14.04硬件平台:明远智睿MY-IMX6UL-EK140
内核版本 :linux-4.1.15
交叉编译链:arm-linux-gnueabihf(gcc version 5.3.1)
1.下载源码:
http://pyropus.ca/software/memtester/
2.创建编译目录:
$ mkdir /home/myzr/my-work/source_tar/memtester
把下载的源码放入此目录中
3.解压进入源码目录:
$ tar xvf memtester-4.3.0.tar.gz
$ cd memtester-4.3.0/
4.配置交叉编译环境变量:
$ source ~/my-work/03_toolchain/gcc-linaro-5.3/environment-setup-gcc-linaro-5.3-arm.sh
5.配置memtester编译选项:
$ vi conf-cc
把cc改为:arm-linux-gnueabihf-gcc
arm-linux-gnueabihf-gcc -O2 -DPOSIX -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -DTEST_NARROW_WRITES -c
This will be used to compile .c files.
$ vi conf-ld
把cc改为:arm-linux-gnueabihf-gcc
arm-linux-gnueabihf-gcc -s
This will be used to link .o files into an executable.
6.编译
$ make
7.测试:
把编译出的可执行文件memtester复制到开发板中
给文件添加一个可执行权限:
# chmod +x memtester
进行测试:
# ./memtester 10M 2
memtester version 4.3.0 (32-bit)
Copyright (C) 2001-2012 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).
pagesize is 4096
pagesizemask is 0xfffff000
want 10MB (10485760 bytes)
got10MB (10485760 bytes), trying mlock ...locked.
Loop 1/2:
Stuck Address : ok
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
Block Sequential : ok
Checkerboard : ok
Bit Spread : ok
Bit Flip : ok
Walking Ones : ok
Walking Zeroes : ok
8-bit Writes : ok
16-bit Writes : ok
Loop 2/2:
Stuck Address : ok
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
Block Sequential : ok
Checkerboard : ok
Bit Spread : ok
Bit Flip : ok
Walking Ones : ok
Walking Zeroes : ok
8-bit Writes : ok
16-bit Writes : ok
Done.
页:
[1]