tmarks
Posts: 13
Joined: Tue Mar 05, 2013 2:34 am

/sys/kernel/debug does not exist

Fri Apr 12, 2013 1:18 am

Hey,

So I am looking for a way to "enable" the debug folder in /sys/kernel as it does not exist in my raspberry pi. I know there is a simple solution for this by enabling some command in the .config file but would like someone to walk me through it.

The reason I need the debug folder is to mount debugfs so I can sniff usb packets being sent to the bus using usbmon. Rather than installing 3rd party software and taking up more space, I'd prefer to use the existing linux libraries to handle tracking the usb data.

Thanks,
T

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: /sys/kernel/debug does not exist

Fri Apr 12, 2013 2:49 am

Hey - I'm glad you posted this, because it syncs up with a similar experience of mine.

I had to get debugfs mounted in order to get "usbview" working.

As far as I know, the directory does already exist - you just need to mount it.
I have the following line in /etc/rc.local:

mount -t debugfs none /sys/kernel/debug

P.S. Yes, I know there is a way to do it in /etc/fstab as well, but, for my own philosophical reasons, I prefer to do it in rc.local (as above).

FWIW, I don't think it is possible to "mkdir" anything in the "fake" directories (/proc and /sys).
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “General programming discussion”