Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn Linux Kernel Programming
Rating: 4.2 out of 5(1,006 ratings)
7,615 students

Learn Linux Kernel Programming

This course will teach you how to start writing Linux Kernel Modules and Device Drivers. Course is full of examples
Created byLinux Trainer
Last updated 12/2020
English
German [Auto],English [Auto],

What you'll learn

  • What is Kernel Module,Device Driver and Differences
  • Advantages and Disadvantages of Kernel Modules
  • Understanding the hello world Linux Kernel Module and process of compilation
  • Various commands: lsmod, rmmod, modinfo, insmod, modprobe, modinfo, depmod, objdump, dmesg
  • Passing Parameters to Linux Kernel Modules
  • Exporting Symbols
  • Kernel Panic,oops, BUG, WARN
  • Process Management in Linux Kernel
  • Creating Kernel Threads
  • Module Metadata
  • Printk and Dynamic Debug

Course content

13 sections112 lectures5h 40m total length
  • What is Device Driver2:33

    Learn how device drivers control hardware devices, communicate with hardware via registers and memory maps, register with the kernel using kernel APIs, and expose access through device files.

  • What is Kernel Module3:30

    Learn how kernel modules extend the kernel as loadable code, enabling device drivers to communicate with hardware, and how to load or unload these modules from the /lib/modules directory.

  • Device Drivers vs Kernel Modules7:26

    Explore how device drivers relate to kernel modules, comparing built-in versus module loading, and weigh memory savings, dynamic loading, debugging ease, and security risks in kernel design.

  • Types of Kernel Modules1:25

    Explore two types of kernel modules—those inside the Linux source and out-of-tree modules distributed separately—and describe the development workflow from initial submission through maintainer review to inclusion in the kernel.

  • Basic Commands4:21

    Learn how to view and inspect kernel modules using lsmod and modinfo, identify loaded modules, their dependencies, sizes, versions, licenses, and configurable parameters.

  • Hello World Kernel Module17:50

    Write a hello world linux kernel module with init and exit using module_init and module_exit, specify license, and print with printk; build and load with insmod, lsmod, and rmmod.

  • Printf vs Printk2:42

    Contrast printf in user space with printk in the kernel, noting log levels and buffering, and that printf relies on the standard library while printk handles kernel messages.

  • Simplified Makefile2:42

    Update the makefile to add a default target all and a clean target, enabling one-command builds with make and one-command cleanups for Linux kernel modules.

  • What happens when run insmod3:17

    Insmod triggers a kernel load sequence where user space calls the kernel, checks permissions, copies the module from user space, and runs the module's init function.

  • What happens if we return -1 from Kernel Module Init function1:36

    Returning a non-zero value from a kernel module init function signals failure and prevents the module from loading, evidenced by error messages in the kernel log.

  • Give another name to Kernel Module3:21

    Change the kernel module name by editing the Makefile, listing required object files, and rebuilding with make to produce a module with your chosen name.

  • Kernel Module Span across Multiple C Files2:30

    learn how to compile a kernel module spanning multiple c files by updating the makefile to include all object files, resolving undefined symbol errors, and loading the module for verification.

  • Two Kernel Modules from Single Makefile2:16

    Learn to build two kernel modules from a single makefile by updating the makefile rules with plus equals, generate and load modules, and perform basic tests.

  • Dmesg in deep8:09

    Learn how dmesg reads the kernel ring buffer, prints or clears the contents, and uses timestamps and local levels to filter messages.

  • Dmesg follow option1:44

    Watch new kernel messages in real time using the dmesg follow option. Learn to run commands in background to observe logs during driver debugging.

  • Linux Kernel Module example with module_init only3:25

    Learn how a Linux kernel module with module_init only behaves when loaded and attempted to unload, revealing that absence of an exit function prevents removal and triggers errors.

  • Linux Kernel Module example with module_exit only2:33

    This lecture demonstrates a Linux kernel module example that uses only an exit function, shows loading the module, and explains handling modules with or without an innate function.

  • Two Line Linux Kernel Module1:50

    Explore a minimal linux kernel module by removing init and exit functions, load and unload it to observe behavior, and understand how function definitions expose APIs for other modules.

  • Cross Compilation7:07

    Discover how to cross compile the kernel for a target machine by setting environment variables, overriding the top-level makefile defaults, and using a suitable cross compiler.

  • Resources0:03
  • Introduction Quiz

Requirements

  • C
  • Basics understanding of most frequently used commands in Linux (echo, cat, make, ls etc)
  • Access to a computer running Linux (either direct or on VM)

Description

110+ Lectures on Linux Kernel Programming

Updated on Dec 12th 2020 : Added more videos in Bonus section

Do you want to expand your horizon and be a part of programming evolution? Would you like to become proficient in Linux Kernel Module Programming to gain skills that are valued by the programming industry?

And why not? After all, Linux is one of the most popular OS for software developers, and its popularity is only going to increase over time.

There are many Linux Kernel Module Programming courses available to learn these skills.

However, these courses are often lacking in the practical approach, and students often feel left behind.

So, what is the best course available to learn this valuable skill right now?

Introducing Learn Linux Kernel Programming, a high-quality course developed by Linux Weekend Learning.

This course is built on a practical approach and uses a lot of real-world examples to give you proper training.

By enrolling, you will have lifetime access to course. You can learn at your own pace and refer back them whenever you want!

Here are some of the perks of this course:

  • Over 5 hours of video teaching and training

  • 100+ Lectures on Linux Kernel Programming

  • Understanding the in and out of the hello world kernel modules

  • Write various kernel modules which exports symbols, accepts parameters, creates kernel threads

  • Learn about the printk function in deep

  • Various commands used while working in Linux Kernel Modules:insmod, rmmod, modprobe, lsmod, dmesg

  • All examples and notes used in the course are available for download

  • Direct access to your instructors for questions and help through the Udemy communication channels

  • Lifetime access to the course, including all future updates

This course comes with a 30 day money back guaranteed!. If you are not satisfied with the course, you'll get your money back

So what are you waiting for, enroll now and take the next step in learning Linux Kernel Programming

Commands you will learn from this course:

  • lsmod

  • dmesg

  • insmod

  • rmmod

  • modprobe

  • modinfo

  • depmod

  • objdump

  • ps -l

API's covered in the course:

  • module_param

  • module_param_array

  • EXPORT_SYMBOL

  • EXPORT_SYMBOL_GPL

  • MODULE_INFO

  • KBUILD_MODNAME

  • dump_stack

  • panic

  • BUG()

  • for_each_process

  • num_online_cpus

  • printk_rate_limit

  • printk_once

  • print_hex_dump

  • print_hex_dump_bytes

  • current

  • kthread_create

  • wake_up_process

  • kthread_stop

  • kthread_should_stop

  • kthread_run

  • usleep_range

  • msleep

  • smp_processor_id

  • VERMAGIC_STRING

Who this course is for:

  • Developers who are curious about learning Linux Kernel Modules