Developing Linux Device Drivers (LFD430) (2024)

Course Description

This instructor-led Linux device driver training will teach you about the different types of Linux device drivers as well as the appropriate APIs & methods through which devices interface with the kernel.

Prerequisites

    To make the most of this training, you must have the following:

    Knowledge of basic kernel interfaces & methods, such as how to write, compile, load & unload modules, use synchronization primitives, & the basics of memory allocation & management, such as is provided by LFD420 Linux Kernel Internals & Development. Pre-class preparation material will be provided before class.

Target Audience

    This training is for experienced developers who want to learn how to develop device drivers for Linux systems.

Learning Objectives

    This training will cover the different kinds of device drivers used in Linux, the appropriate APIs through which devices (both hardware & software) interface with the kernel, necessary modules & techniques for Linux driver development & debugging, & much more.

Content Outline

- Objectives

- Who You Are

- The Linux Foundation

- Copyright & No Confidential Information

- Linux Foundation Training

- Certification Programs & Digital Badging

- Linux Distributions

- Platforms

- Preparing Your System

- Using & Downloading a Virtual Machine

- Things Change in Linux & Open Source Projects

- Documentation & Links

- Procedures

- Kernel Versions

- Kernel Sources & Use of git

- Rolling Your Own Kernel

- Hardware

- Staging Tree

- Labs

- Overview of How to Contribute Properly

- Know Where the Code is Coming From DCO & CLA

- Stay Close to Mainline for Security & Quality

- Study & Understand the Project DNA

- Figure Out What Itch You Want to Scratch

- Identify Maintainers & Their Work Flows & Methods

- Get Early Input & Work in the Open

- Contribute Incremental Bits, Not Large Code Dumps

- Leave Your Ego at the Door: Don’t Be Thin-Skinned

- Be Patient, Develop Long Term Relationships, and Be Helpful

- Types of Devices

- Mechanism vs. Policy

- Avoiding Binary Blobs

- Power Management

- How Applications Use Device Drivers

- Walking Through a System Call Accessing a Device

- Error Numbers

- printk()

- devres: Managed Device Resources

- Labs

- The module driver() Macros

- Modules & Hot Plug

- Labs

- Virtual & Physical Memory

- Memory Zones

- Page Tables

- kmalloc()

- get free pages()

- vmalloc()

- Slabs & Cache Allocations

- Labs

- Device Nodes

- Major & Minor Numbers

- Reserving Major/Minor Numbers

- Accessing the Device Node

- Registering the Device

- udev

- dev printk() & Associates

- file operations Structure

- Driver Entry Points

- The file & inode Structures

- Miscellaneous Character Drivers

- Labs

- Components of the Kernel

- User-Space vs. Kernel-Space

- What are System Calls?

- Available System Calls

- Scheduling Algorithms & Task Structures

- Process Context

- Labs

- Transferring Between Spaces

- put(get) user() & copy to(from) user()

- Direct Transfer: Kernel I/O & Memory Mapping

- Kernel I/O

- Mapping User Pages

- Memory Mapping

- User-Space Functions for mmap()

- Driver Entry Point for mmap()

- Accessing Files from the Kernel

- Labs

- What are Interrupts & Exceptions?

- Exceptions

- Asynchronous Interrupts

- MSI

- Enabling/Disabling Interrupts

- What You Cannot Do at Interrupt Time

- IRQ Data Structures

- Installing an Interrupt Handler

- Labs

- Kinds of Timing Measurements

- Jiffies

- Getting the Current Time

- Clock Sources

- Real-Time Clock

- Programmable Interval Timer

- Time Stamp Counter

- HPET

- Going Tickless

- Labs

- Inserting Delays

- What are Kernel Timers?

- Low-Resolution Timer Functions

- Low-Resolution Timer Implementation

- High-Resolution Timers

- Using High-Resolution Timers

- Labs

- What are ioctls?

- Driver Entry point for ioctls

- Defining ioctls

- Labs

- Unified Device Model

- Basic Structures

- Real Devices

- sysfs

- set & kobject examples

- Labs

- What is Firmware?

- Loading Firmware

- Labs

- What are Wait Queues?

- Going to Sleep & Waking Up

- Going to Sleep Details

- Exclusive Sleeping

- Waking Up Details

- Polling

- Labs

- Top & Bottom Halves

- Softirqs

- Tasklets

- Work Queues

- New Work Queue API

- Creating Kernel Threads

- Threaded Interrupt Handlers

- Interrupt Handling in User-Space

- Labs

- Buses & Ports

- Memory Barriers

- Registering I/O Ports

- Reading & Writing Data from I/O Registers

- Allocating & Mapping I/O Memory

- Accessing I/O Memory

- Access by User - ioperm(), iopl(), /dev/port

- Labs

- What is PCI?

- PCI Device Drivers

- Locating PCI Devices

- Accessing Configuration Space

- Accessing I/O & Memory Spaces

- PCI Express

- Labs

- What are Platform Drivers?

- Main Data Structures

- Registering Platform Devices

- An Example

- Hardcoded Platform Data

- The New Way: Device Trees

- Labs

- What is DMA?

- DMA Directly to User

- DMA & Interrupts

- DMA Memory Constraints

- DMA Masks

- DMA API

- DMA Pools

- Scatter/Gather Mappings

- Labs

- Network Layers & Data Encapsulation

- Datalink Layer

- Network Device Drivers

- Loading/Unloading

- Opening & Closing

- Labs

- net device Structure

- net device ops Structure

- sk buff Structure

- Socket Buffer Functions

- netdev printk() & Associates

- Labs

- Transmitting Data & Timeouts

- Receiving Data

- Statistics

- Labs

- Multicasting **

- Changes in Link State

- ioctls

- NAPI & Interrupt Mitigation

- NAPI Details

- TSO & TOE

- MII & ethtool **

- What is USB?

- USB Topology

- Terminology

- Endpoints

- Descriptors

- USB Device Classes

- USB Support in Linux

- Registering USB Device Drivers

- Moving Data

- Example of a USB Driver

- Labs

- Power Management

- ACPI & APM

- System Power States

- Callback Functions

- Labs

- What are Block Drivers?

- Buffering

- Registering a Block Driver

- gendisk Structure

- Request Handling

- Labs

- Evaluation Survey

- UNIX & Linux **

- Monolithic & Micro Kernels

- Object-Oriented Methods

- Main Kernel Components

- User-Space & Kernel-Space

- Task Structure

- Memory Allocation

- Transferring Data between User & Kernel Spaces

- Object-Oriented Inheritance - Sort Of

- Linked Lists

- Jiffies

- Labs

- What are Modules?

- A Trivial Example

- Compiling Modules

- Modules vs Built-in

- Module Utilities

- Automatic Module Loading

- Module Usage Count

- Module Licensing

- Exporting Symbols

- Resolving Symbols **

- Labs

- Processes, Threads, & Tasks

- Kernel Preemption

- Real Time Preemption Patch

- Labs

- Installation & Layout of the Kernel Source

- Kernel Browsers

- Kernel Configuration Files

- Kernel Building & Makefiles

- initrd & initramfs

- Labs

- Coding Style

- Using Generic Kernel Routines & Methods

- Making a Kernel Patch

- sparse

- Using likely() & unlikely()

- Writing Portable Code, CPU, 32/64-bit, Endianness

- Writing for SMP

- Writing for High Memory Systems

- Power Management

- Keeping Security in Mind

- Labs

- Concurrency & Synchronization Methods

- Atomic Operations

- Bit Operations

- Spinlocks

- Seqlocks

- Disabling Preemption

- Mutexes

- Semaphores

- Completion Functions

- Read-Copy-Update (RCU)

- Reference Counts

- Labs

- Virtual Memory Management

- Systems With & Without MMU & the TLB

- Memory Addresses

- High & Low Memory

- Memory Zones

- Special Device Nodes

- NUMA

- Paging

- Page Tables

- page structure

- Labs

- Requesting & Releasing Pages

- Buddy System

- Slabs & Cache Allocations

- Memory Pools

- kmalloc()

- vmalloc()

- Early Allocations & bootmem()

- Memory Defragmentation

- Labs

FAQs

To attend the training session you should have an operational Desktops or Laptops with required specification along with good internet connection to access the labs.

We would always recommend you to attend the live session to practice & clarify the doubts instantly & get more value from your investment. However, if due to some contingency if you have to skip the class Radiant Techlearning would help you with the recorded session of that particular day. However, those recorded sessions are not meant only for personal consumption & NOT for distribution or any commercial use.

Radiant Techlearning has a data center containing the Virtual Training environment for the purpose of professional’s hand-on-practice.

Professionals can easily access these labs over Cloud with the help of remote desktop connection.

Radiant virtual labs provides you the flexibility to learn from anywhere in the world & in any time zone.

The professionals will be enthralled as we engage them the real world & industry Oriented projects during the training program. These projects will improve your skills & knowledge & you will gain better experience. These real time projects, they will help you a lot in your future tasks & assignments.

Send a Message.

Developing Linux Device Drivers (LFD430) (2024)
Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 5958

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.