我有一个模块在/ sys/kernel/debug/example中创建debugfs条目。 但我没有在sysfs/kernel/example目录中看到这些文件。为什么Debugfs条目未启用?
我看到这个函数在late_initcall中调用debugfs入口创建。 late_initcall(example_debug_init); 这个late_initcall会影响条目的创建吗?
我有一个模块在/ sys/kernel/debug/example中创建debugfs条目。 但我没有在sysfs/kernel/example目录中看到这些文件。为什么Debugfs条目未启用?
我看到这个函数在late_initcall中调用debugfs入口创建。 late_initcall(example_debug_init); 这个late_initcall会影响条目的创建吗?
听起来像你还没有安装debugfs。通过这样做:
mount -t debugfs none /sys/kernel/debug
有关使用debugfs的详细信息,在内核文档阅读debugfs.txt。
而且您必须启用:在构建时
CONFIG_DEBUG_FS=y
配置,否则mount
将失败。