- The Linux Kernel documentationВ¶
- Licensing documentationВ¶
- User-oriented documentationВ¶
- Firmware-related documentationВ¶
- Application-developer documentationВ¶
- Introduction to kernel developmentВ¶
- Kernel API documentationВ¶
- Материалы для изучения Linux Kernel и написания модулей/драйверов
- Можете подсказать практичный список литературы по разработке драйверов для linux и вообще по работе в ядре?
- Linux kernel device driver programming [closed]
- 7 Answers 7
- The Linux Kernel documentationВ¶
- Licensing documentationВ¶
- User-oriented documentationВ¶
- Firmware-related documentationВ¶
- Application-developer documentationВ¶
- Introduction to kernel developmentВ¶
- Kernel API documentationВ¶
- Architecture-specific documentationВ¶
- Filesystem DocumentationВ¶
The Linux Kernel documentationВ¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Licensing documentationВ¶
The following describes the license of the Linux kernel source code (GPLv2), how to properly mark the license of individual files in the source tree, as well as links to the full license text.
User-oriented documentationВ¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system.
Firmware-related documentationВ¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Application-developer documentationВ¶
The user-space API manual gathers together documents describing aspects of the kernel interface as seen by application developers.
Introduction to kernel developmentВ¶
These manuals contain overall information about how to develop the kernel. The kernel community is quite large, with thousands of developers contributing over the course of a year. As with any large community, knowing how things are done will make the process of getting your changes merged much easier.
Kernel API documentationВ¶
These books get into the details of how specific kernel subsystems work from the point of view of a kernel developer. Much of the information here is taken directly from the kernel source, with supplemental material added as needed (or at least as we managed to add it — probably not all that is needed).
Источник
Материалы для изучения Linux Kernel и написания модулей/драйверов
Всё на английском! |
1) Самая лучшая книга по ядру — это исходники. Лучший сайт по исходникам ядра, я считаю
Поиск по идентификатору, например вводите struct file и вперед, смотреть как и что.
2) Начнем с русского языка. Очень хорошо описал написание дров, модулей и проччих вещей в ядре — Олег Цилюрик. Очень редко можно встретить более менее актуальный материал по ядру на русском! Очень рекомендую.
http://rus-linux.net/MyLDP/BOO. index.html
3) На opennet.ru тоже есть материал на русском, но там немного посложнее, средний уровень подготовки я считаю, но мне как новичку помогло.
4) Теперь перейдем к топовым книгам. Коротенькая, информативная, стандарт для разработчиков ядра, это конечно же Linux Device Driver, 3 издание и Adison.Wesley.Linux.Kernel.Development.3rd.Edition . По первой (LDD) я делал мноиге примеры, очень рекомендую ее. Вторая как раз по структуре ядра, идеальная прям, открываете оглавление и читаете то что интересно.
Первая книга есть в октрытом доступе, вот оффициальная ссылка.
http://lwn.net/Kernel/LDD3/
5) По написанию дров под линь, очень мало современных материалов и книг, очень прям мало. Потому что ядро развивается очень быстро, каждый день сотни коммитов, поэтому уследить трудно. Но есть еще одна хорошенькая книга. Называется Essential Linux Device Drivers.
6) Фундаментальный труд по ядру, это конечно же книга — Undestanding the linux kernel,3rd edition (почти 1000 страниц)
Рекомендую Adison.Wesley.Linux.Kernel.Development и Цирюльника, для старта самое то.
Есть еще очень хороший сайт
http://eudyptula-challenge.org/
Который высылает вам задание на почту по программированию в ядре, сложность нарастающая, начиная с hello world, заканчивая патчами в РЕАЛЬНОЕ ядро. Многие после прохождения всех заданий, реально получают работу как kernel developer\kernel hacker.[/QUOTE]
На моем гитхабе вы можете посмотреть следующие примеры (которые перекликаются с примерами из книги Linux Device Driver):
Источник
Можете подсказать практичный список литературы по разработке драйверов для linux и вообще по работе в ядре?
Знание Си, алгоритмов, структур данных — на уровне junior’a, под linux писал, но не много. С архитектурой linux’a знаком поверхностно, не говоря уже о разработке драйверов и работе в ядре. Можете подсказать, что можно изучить по архитектуре и разработке в сфере драйверов и ядра, крайне желательно — без воды для новичков, чтобы все по делу было, с практикой тоже хотелось бы. И желательно на русском (на английском материал у меня пока хуже усваивается).
- Вопрос задан более трёх лет назад
- 3636 просмотров
Содержимое каталога Documentation в ядре.
https://lwn.net/Kernel/Index/ для точечного погружения в отдельные топики.
Каталог doc с kernel.org: https://www.kernel.org/doc/
Understanding the Linux Kernel: idak.gop.edu.tr/esmeray/UnderStandingKernel.pdf
Роберт Лав и LDD — две самые лучшие книги для последовательного чтения. В другие книжки можно заглядывать, чтобы посмотреть как там написано про какие-то конкретные темы. На русском читать не стоит, в ядре и без того насыщенная терминология. Неизвестно какая путаница будет после русской документации.
Источник
Linux kernel device driver programming [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago .
I want to learn linux kernel device driver programming. So can anyone please post good tutorials pages or links here. I am new to linux kernel environment. I have searched for it but I don’t know how to start and which one to read for easy understanding basics. Thanks in advance.
7 Answers 7
Depends on your current skills. If you’re really new to Linux, perhaps you should start with user space system programming with Advanced Linux Programming. You’ll get good knowledge of Unix system calls and other concepts such as signals, processes/threads and so on with this free resource. This is a must (understanding the user space API) if you’re developing on the kernel side since the role of a kernel is providing services to users in a secure way.
Otherwise one often cited book is Linux Device Drivers, Third Edition (LDD3). Keep in mind that this edition was written at the time of Linux 2.6.10 and some things changed since then. This article shows the differences as 2.6 evolved (until 2.6.31, that is, so not very useful). I should mention martinezjavier/ldd3, which contains example drivers of LDD3 updated for more recent kernels (thanks to 42n4 for pointing that out).
Another interesting book that’s not as often cited is Essential Linux Device Drivers. You won’t find a free version of this one, but it still features an interesting approach. What I like about this one is it covers lots of different device types and is up-to-date as of 2.6.24, which is a bit better than LDD.
Finally, one great book about the kernel itself (not specifically for drivers) is Understanding the Linux Kernel, 3rd Edition. This covers in-depth kernel facilities and internal mechanisms. It’s up-to-date as of 2.6.11.
As for online tutorials, I found this post on Pete’s Blog is a really great example. Not only does it show how to create a character device (the most easy kernel driver type, i.e. the one you should start with), it uses modern Linux kernel features in an easy to understand fashion, including:
- use of udev
- use of a kernel data structure (FIFO)
- use of kernel synchronization (mutex)
- use of Sysfs with custom attributes
- module options for insmod
Plus: it’s aimed at Linux 3.0, which means it’s more up-to-date compared to other resources.
You might also like this post about how to create Sysfs entries manually, although the Linux device model will take care of registering your device as a Sysfs entry if you don’t need additional nodes or attributes.
Edit: I should add that the best way to learn real Linux device driver programming is to look at actual drivers. There are thousands of drivers in drivers . Start reading and understanding the concept of simple ones like drivers/leds and you will see how rewarding this is.
Источник
The Linux Kernel documentationВ¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Licensing documentationВ¶
The following describes the license of the Linux kernel source code (GPLv2), how to properly mark the license of individual files in the source tree, as well as links to the full license text.
User-oriented documentationВ¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system.
Firmware-related documentationВ¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Application-developer documentationВ¶
The user-space API manual gathers together documents describing aspects of the kernel interface as seen by application developers.
Introduction to kernel developmentВ¶
These manuals contain overall information about how to develop the kernel. The kernel community is quite large, with thousands of developers contributing over the course of a year. As with any large community, knowing how things are done will make the process of getting your changes merged much easier.
Kernel API documentationВ¶
These books get into the details of how specific kernel subsystems work from the point of view of a kernel developer. Much of the information here is taken directly from the kernel source, with supplemental material added as needed (or at least as we managed to add it — probably not all that is needed).
Architecture-specific documentationВ¶
These books provide programming details about architecture-specific implementation.
Filesystem DocumentationВ¶
The documentation in this section are provided by specific filesystem subprojects.
Источник