The Linux Kernel Driver Model and sysfs
English | MP4 | H264 773 kbps 29.970 fps | 320 x 240 | MP3 127 kbps 48 KHz Stereo | 51mns | 346 MB
Genre: elearning
Sysfs is a virtual file system provided by Linux 2.6. Sysfs exports information about devices and drivers from the kernel device model to userspace, and is also used for configuration. It is similar to the sysctl mechanism found in BSD systems, but implemented as a file system instead of a separate mechanism.
For each object added in the driver model tree (drivers, devices including class devices) a directory in sysfs is created. The parent/child relationship is reflected with subdirectories under /sys/devices/ (reflecting the physical layout). The subdirectory /sys/bus/ is populated with symbolic links, reflecting how the devices belong to different busses. /sys/class/ shows devices grouped according to classes, like network, while /sys/block/ contains the block devices.
For device drivers and devices, attributes may be created. These are simple files; the rule is that they should only contain a single value and/or allow a single value to be set (unlike some files in procfs, which need to be heavily parsed). These files show up in the subdirectory of the device driver respective to the device. Using attribute groups, a subdirectory filled with attributes may also be created.
For USA, EU, Japan, Sing, Au, Ru, UAE, GE, CA, SA.
Mirror For Japan, EU, UAE, China, Au, Ru, SA, Brazil and Sing...
0 comments:
Post a Comment