From the course: Linux Device Drivers: Reading, Writing, and Debugging
Linux kernel documentation tree - Linux Tutorial
From the course: Linux Device Drivers: Reading, Writing, and Debugging
Linux kernel documentation tree
- [Instructor] Let's take a couple minutes to look at the kernel documentation tree and talk about what's available. There is a subdirectory in your kernel source tree called documentation. There are a lot of files, a lot of directories, a lot of information. There's technical documentation about particular technologies in the kernel, but there's also documentation about how to be a Linux kernel developer, how to work with the community, what the standards are, and so forth, how to submit patches, CodingStyle. There's also a lot of documents you can build that are like manuals, and you can pick the format, build it as HTML, or build it as PDF, and so forth. I also want to remind you that since the Linux kernel is open-source, the AI models available often are familiar with the kernel source, and you can ask the models questions about things in the kernel source to help explain it to you or find things in it. For example, I tried in DeepSeek, show me an example of a struct declaration in Linux kernel source code, where there is an ifdef inside near the beginning of the struct. And DeepSeek answered struct module. And the reason I asked that is it's important to remember that when you build a device driver kernel module, you need to build it against kernel header files with configuration that represents how the kernel was configured that you're going to load the module in. Because it's stuff like ifdefs in a structure, you want to make sure you get the right layout for a structure that you use in your code. And then good old regular web searches obviously are helpful to find out stuff about how the Linux kernel works. But remember, Linux kernel is open-source, look at the source code. Use tools that index the source code, the Linux kernel make file supports building for cscope and ctags, for example. And there's a Linux Index website you can use. Let's take a quick look at the documentation directory. So here we are in the documentation subdirectory for the Ubuntu Noble kernel. And if we do a list, we see lots of subdirectory and a few files. One's called process for example. And if we list what's in process, we can see all these dot RST files that can be converted to PDF, et cetera. And there's a lot of stuff there, and you could tell by the titles what they talk about. So there's one place to start looking at documentation.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.