When I wrote my coursework about drivers, COM ports and Linux, I ran into a problem - a situation may arise for a beginner when he skips obvious sources when searching for documentation on ignorance. Then, in despair, he finds some coffin, and unable to study it and apply it correctly, he abandons the study of the nucleus.
For me, this has become a real problem, because I did not know anything about writing drivers for Linux! Of course, I went through the Unix device at the university in lectures on “Operating Systems”, but in practice I came across only application programming in C ++ and writing scripts in bash. Although a fairly rich experience of communication with * nix at the administrator level helped me.
')
Most of the documentation I met was either outdated, such as Mike Goblin's articles (Makefile for the kernel module gave me a lot of fun ...), or talmuses large enough for a beginner, like The Linux Kernel, to deal with which, Having an understanding of Unix organization principles and perfect knowledge of English is not an easy task.
And so, where to start? ..
If you have not done this yet - get the source code of the kernel (preferably the current version ...).
www.kernel.org - you need the latest stable version.
Then you can go to Google to search for articles in Russian, with examples, about how to program and use Linux kernel modules in general. The correct questions in Google will give us the following:
netsago.org/ru/docs/1/5"An introduction to writing Linux kernel modules."
Enough detailed and understandable article. Described what tools are needed to build modules and where to get them. Three options for writing the helloworld kernel module are considered. If you did not write a kernel module to you here.
Documentation is usually distributed along with the source code. In linux, you can get it by typing a command in the folder with the source code, unpacked from the archive:
make htmldocs
The documentation contains descriptions of functions and data structures used by modules in the kernel. Very useful when writing a kernel module directly. Also available in man, ps, pdf and xml formats.
Part 1.Part 2."LXF79: Do-It-Yourself Driver"
Another not a bad article, a little more, a little deeper, a little more reveals the work with the kernel. But you shouldn't mess too much with her understanding. There are more understandable and deeper things.
tldp.org/LDP/lkmpg/2.6/html/index.html"The Linux Kernel Module Programming Guide" in English
Enough full howto on modules.
(http://linuxcenter.ru/lib/books/lkmpg.phtml - there is a rather fresh version in Russian, but it's better to use the original one)
And, for a snack, a couple of M. Tim Jones articles:
www.ibm.com/developerworks/ru/library/l-linux-synchronization/index.html"Anatomy of Linux Synchronization Techniques"
Nuclear atomicity mechanisms, mutexes and spinlockes. Written very clear.
www.ibm.com/developerworks/ru/library/l-linux-kernel"Anatomy of the Linux kernel"
History and architectural organization. What is it and what it is usually eaten with. Interesting, and for common development ...