spi 读写测试:
写:dd if=/dev/urandom of=/mnt/UDISK/dd.tmp conv=fsync
读:dd if=/mnt/UDISK/dd.tmp of=/dev/null
tf卡读写:
需要先插入TF卡,设备会自动检测并生成节点
写:dd if=/dev/urandom of=/mnt/SDCARD/dd.tmp bs=1M count=10M conv=fsync
清内存:echo 3 > /proc/sys/vm/drop_caches
读:dd if=/mnt/SDCARD/dd.tmp of=/dev/null bs=1M count=10M
(这句如果提示dd: can't open 'id=/mnt/SDCARD/dd.tmp': No such file or directory,可能是因为复制的内容里有乱码,手动输入试试)
tinatest测试方法:
编译固件的时候make menuconfig把tinatest选上,并配置相应的存储测试
spi 读写测试:tt /base/storage/rwdev
tfcard读写测试:
修改/etc/tinatest.json下的读写路径参数devfile,改成/mnt/SDCARD/xxx
tt /base/storage/rwdev
跑测试时候的log:
代码语言:javascript复制root@TinaLinux:/# tt /base/storage/rwdev
COMMAND: rwdev -d 0xFF00 -d 0xAA55 -b 1m -s 10m -a 0 -a 1 -a 2 -l 1 /mnt/SDCARD/rwdev.tmp
rwdev: do write/read/verify for devices
version: v0.0.4
build: Compiled in Jul 29 2020 at 06:20:06
date: Thu Jan 1 01:00:47 1970
action : write read verify
data : 0xFF00 0xAA55
buffer : 1MB
loop : 1
dev : /mnt/SDCARD/rwdev.tmp
size : 10MB
=== [0] buf: 1MB data: 0xFF00 ===
write ... OK (45309.73 KB/s)
read ... OK (120470.59 KB/s)
verify ... OK
=== [0] buf: 1MB data: 0xAA55 ===
write ... OK (55053.76 KB/s)
read ... OK (120470.59 KB/s)
verify ... OK