On Wed, Aug 10, 2011 at 2:14 PM, Jeff Haran <jharan@xxxxxxxxxxxxxx> wrote:
From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] On Behalf Of Vaibhav Jain
Sent: Wednesday, August 10, 2011 12:09 PM
To: kernelnewbies@xxxxxxxxxxxxxxxxx
Subject: Need help in understanding sysfs
Hi,
I need to undestand sysfs and make changes to it.
Please provide me with some good references.
Thanks
Vaibhav Jain
First thing to try would be your favorite search engine. If you do a search for “lwn <topic>” you’ll often be taken to a LWN article that is on topic though perhaps a bit dated. For instance, a search for “lwn sysfs” takes you to here:
http://lwn.net/Articles/54651/
Probably a good place to start. Linux is mostly good code, but the documentation that comes with the kernel sources mostly sucks, so the web is your friend in this regard.
Hi,Sorry for the vague question. I would clarify. There are two things I need :1- I need to know how information is organized in the sysfs and understand the concepts of kobjects , attributes etc.2.- I need to understand how to create a file entry in the sysfs. Particulary i need to create an entry inside the directory /sys/devices/system/cpu/ . I will be requiredto write some driver in the future which will accept inputs from this file but I am not very clear about that right now. So I was thinking of just trying to create an entry for now.I tried searching the web but there are not many articles that explain the above two in detail unlike procfs for which there are a lot of articles with samples.The ones I found were not very interesting to read.ThanksVaibhav Jain
The third link in the google is a classic paper by patrick Mochel, it pretty much covers all the basics.
There is a lot of information on sysfs in Robert love's LKD and
There is an entire chapter on sysfs in LDD, which tells all the details about creating entry and other basics.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies