Linux Kernel Driver Development
4.0 (18 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
87 students enrolled

Linux Kernel Driver Development

Learn basics of Linux Kernel architecture, the role of device driver. Develop linux device driver development skills
4.0 (18 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
87 students enrolled
Created by Sandesh Ashok
Last updated 3/2020
English [Auto]
Price: $24.99
30-Day Money-Back Guarantee
This course includes
  • 2.5 hours on-demand video
  • 2 articles
  • 9 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Introduction to Linux Kernel Driver development, Basics understanding of Linux kernel, Code Compilation Techniques, Automating build steps using Makefile, Writing basic Linux drivers and submitting your first kernel patch.
  • Basic understanding of C program, Enthusiasm to learn new stuff

Starting your journey in the Linux device driver development is a pain for beginners. This course is designed to clear the air and provide the right insights for beginners to get started in device driver development. 

Before jumping right away into development it is better to know the basics and need of device drivers. So, the course begins with an introduction to Linux kernel architecture, the role of device drivers.

Course Structure Includes:

  1. Introduction to Linux Kernel architecture.

  2. Role of device drivers and their use case.

  3. Intermediate steps involved in the compilation process.

  4. Cross Compilation for the target architecture.

  5. Kernel APIs understanding for getting started.

  6. Implement a Hello World module.

  7. Module Building, inserting, and checking status procedure.

  8. __init and __exit keywords and their use case.

  9. Character driver implementation.

  10. Implementing read, write operations for the character driver.

  11. Creating and submitting our first Linux kernel patch.

This course, if well practiced well enough along with supported theory and lecture, is good enough for any beginner to get started in device drivers development.

As time proceeds, I will be updating the course contents with the additional drivers and techniques for debugging the drivers.

Hope you will enjoy and have fun learning.


Who this course is for:
  • Beginners who want to get started in the Linux kernel development, driver design, workflow in kernel driver development
Course content
Expand all 21 lectures 02:40:54
+ Introduction to Linux Kernel
2 lectures 11:19
Introduction to Linux Kernel

Device drivers are part of runtime linux. They can be added or removed from linux during runtime.
Know how device drivers operate from a high level perspective.

Need for device drivers
+ Code Compilation Techniques
2 lectures 15:02

High level language like C program are converted to machine readable code using a tool called compiler. In this lecture, we shall look in depth into intermediate steps used by compiler to convert the c program to binary.

Code Compilation Steps

Regular compilation of file creates a binary for the architecture on which code is compiled.
If binary for a different architecture is required, we need to perform Cross Compilation.

Preview 05:13
+ Makefile Creation
3 lectures 20:34

Learn basics of makefile and syntax of makefile

Basics of Makefile

Learn how to execute the Makefile. Creating custom Makefile and using the Makefile from the different directory.

Using Makefile
Create a Makefile which is generic and compiles any c program.
+ Hello World Kernel Module
6 lectures 53:48

Students will learn to create the entry and exit function along with the macros for adding the module description and module license.

module_init and module_exit

Create the Makefile for building the helloworld module created in the previous lecture.

Building the kernel module

Insert the kernel module from userspace, list the modules and remove the modules. At the same time, observe the behavior during each step.

Preview 05:11

printk is used to print the messages in the console from kernelspace. However, printk has certain loglevels associated with it. Proper understanding of how printk works helps debugging in the constraint cases.

Understanding printk, log levels in kernel

After inserting the module, understand how kernel exposes the module details to the userspace. Interact with the files, know more about each entries.

Runtime status of the module and kallsysms

__init keryword is the most often used for module initializing. Understanding the behavior of __init keyword helps in writing efficient optimized code.

Understanding __init and __exit keyword
+ Character Driver Module
5 lectures 33:11

Understand how character drivers are identified, create a character driver node. Know basics of Major Number and Minor Number.

Character driver nodes and basics

Know how to register a character driver and deregister a character driver

Register and unregister the character driver

Know how file operations are declared in the driver. File operations are key part of driver development as everything in linux is managed through files.

File operations on our character driver

Implement how file operations like open, close and read are performed as regular file operations on kernel driver.

Implement Open, Read, Close function for fops
Implement Write operation