kiran bobbu
kiran bobbu

Reputation: 143

why Debugfs entries not enabled?

I have a module that is cresting debugfs entries in /sys/kernel/debug/example . But i didnt see those files in sysfs/kernel/example directory.

I see this function which do the debugfs entry creations are called in late_initcall. late_initcall(example_debug_init); Will this late_initcall affect the entry creation?

Upvotes: 1

Views: 3668

Answers (2)

Also you must enable the:

CONFIG_DEBUG_FS=y

configuration at build time, or else mount will fail.

Here is a minimal example: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/bb8f4eb79565c9771356c80e0964c8fefc163e11

Upvotes: 0

Chris Tsui
Chris Tsui

Reputation: 472

Sounds like you have not mount debugfs. Do it by:

mount -t debugfs none /sys/kernel/debug

For more information about using debugfs, read debugfs.txt in kernel Documentation.

Upvotes: 1

Related Questions