Linux Device Drivers: Kernel Level Programming – 2021 Release

Welcome to Linux Device Drivers: Programming at the Kernel Level with Doug Abbott.  If you are ready to learn with the experts, then this course is for you.  Doug has over 20 years of experience working on the operating system and device driver level with emphasis on embedded Linux applications and is here to answer your questions.

Online Classes

High Quality

Flexible Schedule

Certifications

Interactive

Instructor Help

High Success Rate

Extra Resources

Welcome to Linux Device Drivers: Programming at the Kernel Level with Doug Abbott.  If you are ready to learn with the experts, then this course is for you.  Doug has over 20 years’ experience working on the operating system and device driver level with emphasis on embedded Linux applications and is here to answer your questions.

Working with Doug you will become a master Linux programmer at the Device Driver level and be able to:

  • Understand how device drivers interact with the Linux kernel
  • Work with the rich set of kernel APIs that provide a multitude of services to driver programmers
  • See how Linux handles asynchronous I/O in a way that is totally transparent to applications
  • Examine the unique problems of debugging in Kernel space
  • Understand how much of a device driver involves interactions with the kernel that have nothing to do with accessing physical hardware

While taking this course you will have access to Doug’s video lectures, demos, and hands-on exercises where you will have ample opportunity to practice what you’ve learned. Most of the lab exercises run on a standard PC. Nevertheless, the code is easily ported to other architectures supported by Linux.

The hands-on exercises can be done using any version of the Linux Kernel.  Because the Linux Kernel changes frequently, we are here to support any questions you may have on the course exercises and solutions while you take the course.

Some of the exercises are hardware-dependent and require either a parallel printer port if your computer has one, or you can purchase a single-board computer to use to do the exercises – see purchase options section below.

In This Course You Will Learn:

As a result of taking this course, you will be able to:

  • Create and build kernel loadable modules
  • Understand the four types of devices and their properties
  • Determine how device drivers interact with the Linux kernel
  • Use techniques for debugging kernel-level code
  • Access peripheral hardware
  • Manage Asynchronous interrupts

Prerequisites

To successfully complete this course you will need to be proficient in C programming and Linux Essentials or have taken C Programming Bootcamp Part 1C Programming Bootcamp Part 2 and Linux Essentials.

You will need a PC running a fairly recent Linux distribution such as CentOS 7.  To complete the hardware-based exercises in modules 7 to 10 you will need either a standard 25-pin parallel port or a small single-board computer with general-purpose I/O ports. You can purchase a single board computer with your course below or directly from the instructor at www.intellimetrix.us/gogotraining.  If your laptop lacks a parallel port, a compatible docking station usually has one.

Module 00: Course Introduction

Module 01: What’s a Device Driver?

  • Why Device Drivers?
  • User Space and Kernel Space
  • Process Context and Interrupt Context
  • User Space I/O Apis
  • Types of Devices
  • The/dev/Directory
  • Exercise: Explore the /dev Directory

Module 02: Kernel Loadable Modules

  • What is a Kernel Loadable Module?
  • Module Utilities
  • Building a Module
  • Modules and the GPL

Module 03: Demo: Kernel Modules

Exercise: Build and Run a Module

Module 04: Basic Character Driver

  • Registering and Initializing a Driver
  • The File Operations Table, fops
  • Driver Example
  • Mutual Exclusion, the Mutex
  • Exercise: Build and Run simple_char

Module 05: Basic Driver Code Review

  • Exercise: Build and Run Basic Driver

Module 06: Debugging Kernel Code

  • printk
  • strace
  • Pseudo file systems
    • /proc
    • /sys
  • ioctl

Module 07: Debugging Demo

  • strace
  • /proc Files
  • Create a /proc File
  • Create a /debugfs File
  • ioctl

Module 08: KGDB

  • Configuring the Kernel for KGDB
    • Make xconfig
  • Set up Second Virtual Machine
    • Pseudo Serial Port
    • Shared Folder
  • “Magic” sys Request Trigger
  • Debugging Kernel Modules

Module 09: KGDB Demo

  • Exercise: Explore KGDB

Module 10: Blocking I/O

  • The Wait Queue
  • Putting a Process to Sleep
  • The misc Device
  • The seq File Interface
  • Poll and Select
  • Asynchronous Notification

Module 11: Blocking I/O Demo and Code Review

  • Exercise: Build and Run Blocking Driver
  • Exercise: Find the Bug

Module 12: Accessing Hardware

  • Side Effects and Compiler Optimization
  • I/O APIs
  • Barriers

Module 13: Interrupt Handling

  • Interrupt Context
  • Registering an Interrupt Handler, the IRQ Flags
  • Probing for the Interrupt Source
  • The Bottom Half – tasklets and workqueues

Module 14: I/O in User Space, the /sys file system

Module 15: /sys Demo

Module 16: The Linux Driver Model

  • Overview, Motivation
  • Busses
  • Devices
  • Drivers
  • kobject
  • sysfs

Module 17: Demo: lxr

Module 18: Code Review: lddbus.c

  • Exercise: Build and run lddbus.c

Module 19: Managing Time

  • jiffies
  • Current Time
  • Implementing Time Delays
  • The Timer Callback

Module 20: Demo: Time

  • Exercise: Build and Run jit.c

Module 21: Synchronization

  • Mutexes
  • Spinlocks

Module 22: Memory Allocation

  • kmalloc() and kfree()
  • kmalloc() flags
  • The Slab Allocator
  • get_free_pages()
  • The Buddy Algorithm
  • vmalloc()

Module 23: Demo: Memory Allocation

Module 24: Block Devices

  • The Block Subsystem
  • I/O Schedulers
  • Device Registration
  • The Request Queue and Function

Module 25: Code Review: simple_block.c

  • Exercise: Build and Run simple_block.c

Module 26: PCI Devices

  • PCI Addressing and Bridging
  • PCI Tools
  • Accessing Configuration Space
  • PCI Data Structures and Macros

Module 27: Code Review: ne2kpci.c

Module 28: Network Devices

  • Device Registration
  • The Socket Buffer
  • NAPI – the “New” API

Module 29: 29: Code Review: lib8390.c, 8390.c & ne2kpci.c

Module 30: USB Devices

  • USB Structure and Characteristics
  • USB Tools
  • Device Classes
  • USB Data Structures and Macros
  • USB Request Block, URB

Module 31: Device Trees

  • The Problem
  • Background
  • Device Tree Structure
  • “Compatible” Property
  • Device Tree and Linux

Module 32: Review

Course

Delivery Type: The Course is taken online
Length of Access: 1 year
Features: 24/7 Access, Real Instructors, Classroom Materials and Exercise Guides. Exam Prep and Instructor Support.

$499.00Add to cart

Having issues playing videos?

Meet Your Instructor

Doug Abbott

Doug Abbott is a consultant, author, and trainer with over thirty years experience in the computing field. He has done both hardware and software design primarily in the area of data acquisition and instrumentation. As a software engineer, his focus has been on the operating system and device driver level with a particular emphasis on embedded applications of Linux.

As an instructor, Mr. Abbott has developed and taught several courses–both in-person and on-line–for UC Berkeley Extension and UC San Diego Extension. These classes have also been presented on-site to a number of well-known institutions including NASA Houston, Wind River Systems, Jet Propulsion Laboratory, and TRW among others.

Doug is the author of three books:

Embedded Linux Development using Eclipse

     Linux for Embedded and Real-time Applications, 4th Ed.

     PCI Bus Demystified, 2nd Ed.

Doug has both a bachelor’s and master’s degree in electrical engineering from UC Berkeley.

Get Your Course Maetrials

When you purchase this course you will receive access to these materials.

  • Student Guide
  • Exercise Guide
  • Drivers

Course Links

These links are activated when you purchase this course.

  • Course Survey

Course Transcript

This course comes with a Transcript that tracks your progress. You can use your transcript to view and monitor your progress and when you complete the course, you can print or email the transcript.

Letter of Course Attendance

You will be awarded a Certificate of Completion when you finish this course. You will be able to print or email the certificate and share your accomplishment with everyone.

Ask the Instructure a Question

QA Forum

When you purchase this course you will be able to use the QA Forum and have direct access to the instructor.

Do you have special requirements?

    You need a free consultation, call us at those numbers:

    Mobile: +905419417882

    Mobile: +905551664551