Drive development
character devices, block devices, network devices
character Deviceaccessed as a byte stream,cannot be accessed randomlywith the exception, the video card, EEPROM can be randomly accessed EEPROM can be erased 100 million times, is a character device, can be randomly accessedread/write is direct access to hardwareFlash Erase Times Limited, 1 million times, easy to have bad block
Block Devicescan be accessed randomlyAccess as a "block" unitblock size is typically 512 bytesthe size of the block is determined by the hardwareis the basic unit of the kernel for data transfer HDD Structure:The formatted partition is a cylinder, that is, the cylinder of the hard diskIf there are 10 faces, there are 10 cylinders for embedded Devicesif it is flash, the structure is as follows:Flash is in block unitssome are pages, and there are many blocks per page character devices and block devices use different interfaces at all,that is, two kinds of architectures block Devices can also be driven by the architecture of a character device's driver, but this is inefficient character devices typically have direct access to hardware to read data block devices typically go through the system cache to read dataFor example, the old U-disk has just passed the movie, the direct unplug may not be able to read the movie, or run a problem, this is because the writing is written in the cache, and then asynchronously written to the hardware Linux is the exception to all files, network equipment in Linux is not reflected in the fileoperation is accessed by socket sockets Network devices receiving requests from outside the world (outside the system)
How to install the driver:1. Directly compile the kernel2. Manual Installation when needed
Sina Blog: http://blog.sina.com.cn/u/2049150530
Blog Park: http://www.cnblogs.com/sky-heaven/
Know: Http://www.zhihu.com/people/zhang-bing-hua
Driver Development--"character device, block device Introduction" "Sky original"