For beginners, the Linux framework is too large, and many knowledge points need to do their own to understand
Device file, device number #ll-A/dev in each line you can see the device file, device number (primary, secondary)
For each hardware device, the system kernel has the appropriate device driver responsible for handling it. In Unix, a device file is used to represent a hardware device, and each device driver is abstracted into the form of a device file , giving the application a consistent file interface that facilitates communication between the application and the operating system.
As a rule, all device files are placed in the/dev directory.
The device in/proc/devices/is loaded into the kernel by Insmod , which produces a major for Mknod as a parameter. Cat/proc/devices
/dev/*.* is by Mknod plus go, format: Mknod Device1 c/b Major minor such as: Mknod DR1 C 254 0, the user through this device name to access your driver. Ls/dev
If there is an order Mknod Doc B 62 0:
The doc is defined by the name, B refers to the block device, and 0 refers to the entire doc. If you change 0 to 1, then 1 refers to the first partition of Doc. 2 is the 2nd one, and so on.
Turn from
http://blog.csdn.net/cainiao413/article/details/6181062
Cat/proc/devices and Ls/dev