From the course: Linux Device Drivers: Reading, Writing, and Debugging
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Linux kernel headers - Linux Tutorial
From the course: Linux Device Drivers: Reading, Writing, and Debugging
Linux kernel headers
- [Instructor] You need to know something about the header files and installing 'em and using 'em and the repercussions of getting things wrong and so forth. So let's talk about that. Right, so the Linux kernel is mostly written in C. And if you're familiar with C at all, and you should be if you're going to be working on Linux device drivers, then you know you need header file to find prototypes or functions and decorations for structs and so forth. And remember, it's essential to build any binaries that you build for the kernel, such as loadable kernel modules, using the right header files and the right configuration file. And it would be good to use the same compiler version and options. And we can simplify that by using the kernel make file when we make modules, to use the same options. So you can typically, for a distro, install the header files for your kernel that's installed and then there'll be underneath usr/src, or when you're building your own kernel, right there in the…
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.