Using mmc_test Tool on Linux
Many friends have questions about how to test
emmc/sdmodules onLinux.Of course,
mmc coreprovidesmmc_test.cas a test file for themmc driver.
How to use the mmc_test.c test file to test the mmc driver?
1. Compile mmc_test.c into the Kernel
By default, mmc_test.c is an independent file and is not compiled into the kernel; we need to enable it manually in menuconfig.
The configurations to enable are: CONFIG_MMC_TEST, CONFIG_MMC_DEBUG, and CONFIG_DEBUG_FS.
Note: For CONFIG_MMC_TEST, you can choose M or *, corresponding to: compile as a module or compile directly into the kernel.
Here we choose *
2. Bind mmc_test
By default, we usually have the mmc driver loaded. To use the mmc_test tool for testing, we need to bind the mmc device to the mmc_test driver.
2.1. Check Driver Number
Use the command below to query the corresponding mmc number, for example: mmc0:0001, ignoring \