当前位置: 技术问答>linux和unix
sd卡驱动测试程序mmc_test.c 使用
来源: 互联网 发布时间:2017-04-12
本文导语: RT。在网上查了些资料:大致使用如下: mount -t debugfs none /sys/kernel/debug modprobe mmc_test mmc_test mmc0:0001: Card claimed for testing. echo 25 > /sys/kernel/debug/mmc0/mmc0:0001/test cat /sys/kernel/debug/mmc0:0001/test 问题一: --------------...
RT。在网上查了些资料:大致使用如下:
mount -t debugfs none /sys/kernel/debug
modprobe mmc_test
mmc_test mmc0:0001: Card claimed for testing.
echo 25 > /sys/kernel/debug/mmc0/mmc0:0001/test
cat /sys/kernel/debug/mmc0:0001/test
问题一:
------------------------------------------------------------
mmc_test.c 中mmc_driver.drv.name = "mmc_test"
但是内核里面好像没有注册一个叫"mmc_test"的设备啊
所以我加载mmc_test.ko的时候 mmc_driver.probe 都没法执行
即没有打印mmc_test mmc0:0001: Card claimed for testing.
请问是怎么回事?????????????
问题二:
-----------------------------------------------------
另外 网上这么说
make menuconfig --> Kernel hacking --> 选中Debug Filesystem (CONFIG_DEBUG_FS)选项。
make menuconfig --> kernel hacking --> 选中Kernel debugging (CONFIG_DEBUG_KERNEL)选 项。
挂载debug file system
# mount -t debugfs none /sys/kernel/debug
但是我配置好内核后 烧进去 一跑 结果就死机了,郁闷
打印如下
VFS: Mounted root (ext2 filesystem).
Freeing init memoDWC_otg: Attached device Not Supported
hub 2-0:1.0: over-current change on port 1
init started: BusyBox v1.4.2 (2011-08-10 14:44:43 CST) multi-call binary
Starting pid 934, console /dev/console: '/etc/init.d/rcS'
TCC8900_nand: module license 'Proprietary. (C) 2008 Telechips Inc.' taints kernel.
[NAND ] [PORT CONFIG - CS[0, 1] [NAND Data Port: GPIO_B Hw4 ~ Hw11]
[NAND ] [BClk 156MHZ][1Tick 65][RE-S:0,P:5,H:2][WR-S:0,P:3,H:2][COM-S:2,P:15,H:15]
[NAND ] [NB Area:4MB][DT Area:193MB][HD Area0:32MB]
ndda:
本版精华文库|博客
mount -t debugfs none /sys/kernel/debug
modprobe mmc_test
mmc_test mmc0:0001: Card claimed for testing.
echo 25 > /sys/kernel/debug/mmc0/mmc0:0001/test
cat /sys/kernel/debug/mmc0:0001/test
问题一:
------------------------------------------------------------
mmc_test.c 中mmc_driver.drv.name = "mmc_test"
但是内核里面好像没有注册一个叫"mmc_test"的设备啊
所以我加载mmc_test.ko的时候 mmc_driver.probe 都没法执行
即没有打印mmc_test mmc0:0001: Card claimed for testing.
请问是怎么回事?????????????
问题二:
-----------------------------------------------------
另外 网上这么说
make menuconfig --> Kernel hacking --> 选中Debug Filesystem (CONFIG_DEBUG_FS)选项。
make menuconfig --> kernel hacking --> 选中Kernel debugging (CONFIG_DEBUG_KERNEL)选 项。
挂载debug file system
# mount -t debugfs none /sys/kernel/debug
但是我配置好内核后 烧进去 一跑 结果就死机了,郁闷
打印如下
VFS: Mounted root (ext2 filesystem).
Freeing init memoDWC_otg: Attached device Not Supported
hub 2-0:1.0: over-current change on port 1
init started: BusyBox v1.4.2 (2011-08-10 14:44:43 CST) multi-call binary
Starting pid 934, console /dev/console: '/etc/init.d/rcS'
TCC8900_nand: module license 'Proprietary. (C) 2008 Telechips Inc.' taints kernel.
[NAND ] [PORT CONFIG - CS[0, 1] [NAND Data Port: GPIO_B Hw4 ~ Hw11]
[NAND ] [BClk 156MHZ][1Tick 65][RE-S:0,P:5,H:2][WR-S:0,P:3,H:2][COM-S:2,P:15,H:15]
[NAND ] [NB Area:4MB][DT Area:193MB][HD Area0:32MB]
ndda:
本版精华文库|博客
|