2025年深圳 将构建“1+6+63”生物多样性保护体系
2022-05-23
(资料图)
mmc_test.c
编译到内核默认情况下,mmc_test.c
是独立的文件,并没有编译到内核中,需要我们到menuconfig
中手动打开。
打开的配置有:CONFIG_MMC_TEST
、CONFIG_MMC_DEBUG
、CONFIG_DEBUG_FS
三个配置。
注意:CONFIG_MMC_TEST
,该选项可以选择M
和*
,分别对应为:编译成模块
或者直接编译到内核
mmc_test
绑定默认情况下,我们一般都已经加载了mmc driver
,那么要想使用mmc_test
工具测试,需要将mmc
设备绑定到该mmc_test
驱动上。
通过下面命令,查询对应的mmc
编号,如下:mmc0:0001
,忽略掉\
ls/sys/bus/mmc/drivers/mmcblk/mmc0\:0001/
echommc0:0001>/sys/bus/mmc/drivers/mmcblk/unbind
mmc_test
驱动echommc0:0001>/sys/bus/mmc/drivers/mmc_test/bind
debugfs
挂载mount-tdebugfsnone/sys/kernel/debug
cd/sys/kernel/debug/mmc0/mmc0\:0001/cattestlist
0:Runalltests1:Basicwrite(nodataverification)2:Basicread(nodataverification)3:Basicwrite(withdataverification)4:Basicread(withdataverification)5:Multi-blockwrite6:Multi-blockread7:Poweroftwoblockwrites8:Poweroftwoblockreads9:Weirdsizedblockwrites10:Weirdsizedblockreads11:Badlyalignedwrite12:Badlyalignedread13:Badlyalignedmulti-blockwrite14:Badlyalignedmulti-blockread15:Correctxfer_sizeatwrite(startfailure)16:Correctxfer_sizeatread(startfailure)17:Correctxfer_sizeatwrite(midwayfailure)18:Correctxfer_sizeatread(midwayfailure)19:Highmemwrite20:Highmemread21:Multi-blockhighmemwrite22:Multi-blockhighmemread23:Best-casereadperformance24:Best-casewriteperformance25:Best-casereadperformanceintoscatteredpages26:Best-casewriteperformancefromscatteredpages27:Singlereadperformancebytransfersize28:Singlewriteperformancebytransfersize29:Singletrimperformancebytransfersize30:Consecutivereadperformancebytransfersize31:Consecutivewriteperformancebytransfersize32:Consecutivetrimperformancebytransfersize33:Randomreadperformancebytransfersize34:Randomwriteperformancebytransfersize35:Largesequentialreadintoscatteredpages36:Largesequentialwritefromscatteredpages37:Writeperformancewithblockingreq4kto4MB38:Writeperformancewithnon-blockingreq4kto4MB39:Readperformancewithblockingreq4kto4MB40:Readperformancewithnon-blockingreq4kto4MB41:Writeperformanceblockingreq1to512sgelems42:Writeperformancenon-blockingreq1to512sgelems43:Readperformanceblockingreq1to512sgelems44:Readperformancenon-blockingreq1to512sgelems45:Resettest46:Commandsduringread-noSetBlockCount(CMD23)47:Commandsduringwrite-noSetBlockCount(CMD23)48:Commandsduringread-useSetBlockCount(CMD23)49:Commandsduringwrite-useSetBlockCount(CMD23)50:Commandsduringnon-blockingread-useSetBlockCount(CMD23)51:Commandsduringnon-blockingwrite-useSetBlockCount(CMD23)
echonumber>test
number
:是上面的测试序号。
如:echo 1 > test
mmc0:Startingtestsofcardmmc0:0001...mmc0:Testcase1.Basicwrite(nodataverification)...mmc0:Result:OK
来源:嵌入式艺术
版权归原作者所有,如有侵权,请联系删除。
▍
标签:
下一篇: 最后一页