问题
I have some homework which I should program a virtual device driver on kernel 3.x Can you suggest some documentation about it? I'm using fedora btw. I know there are lots of tutorials, but there is some difference between 2.x and 3.x.
回答1:
There is no major difference between the last 2.6.x series kernel and the 3.x series. It's an arbitrary distinction.
The reference work for Linux device drivers is the aptly named Linux Device Drivers. It's somewhat out of date (being based on 2.6.10), but still a good guide. There are slightly less out-of-date examples on Martinez Javiers GitHub.
Of course, the ultimate guide is the code itself. Regardless of what you do you will have to refer to the code frequently. Code reading is an incredibly valuable skill, and you should practice it as much as possible.
来源:https://stackoverflow.com/questions/10582294/documentation-about-device-driver-programming-on-kernel-3-x