Linux & Open-Source Training Linux Laptops Linux Services

Linux Device Driver Development Training

Course Description

This course introduces attendees to developing device drivers for Linux.

This course acquaints developers with the issues essential for Linux device driver development. The course progresses through a number of topics. Each topic is presented along with a supporting laboratory exercise before moving on to the next topic.


Overview

This two day course provides practice with the key steps in developing Linux device drivers. The course shows attendees how device drivers work with the Linux kernel, how to compile and load drivers, how to debug drivers, as well as other essential topics. We will discuss character, block and network drivers,

Attendees will develop a complete, simple, driver that demonstrates the process of creating a Linux device driver. The course covers the key issues in Linux device drivers.

Attendees will spend approximately 50 percent of the class time actually gaining hands-on experience with these topics.

.

Course Objectives:

• To provide an understanding of the essentials of Linux device drivers.
• To give you practical experience in developing Linux device drivers.
• To explain the characteriistics of Linux kernel important to Device Driver writers

Attendees will learn:

The steps necessary to add device drivers to a Linux system

How to determine what hardware is present on a Linux system

The purpose and functionality of device drivers

Compiling and linking device drivers

Basics of network device drivers.

Trade-offs between loadable modules and drivers compiled into the kernel.


Who Should Attend:

The course is designed for software engineers who are new to Linux and/or device drivers. Attendees should have experience with C, be able to perform basic UNIX commands, and have some experience with the basic GNU tools.


Duration

Two days


Course Materials

The workshop materials include a comprehensive student workbook. The workbook contains all of the slides used in the course as well as hands-on lab exercises. Students are able to bring home the lab and example code used in the class.


Course Workshop and Set-up:

When this class is presented virtually via something like WebEx, attendees are responsible for providing their own native Linux computer. You need to have root access on the computer. Some exercises may involve using a virtual machine in addition and the host computer should be configured to allow running virtual machines.

.

The following modules will be covered during the class:

   
   
How Loadable Modules Work Benefits of loadable modules
Correct use of insmod, modprobe, rmmod, and lsmod
Passing parameters to a loadable module
The GPL and your driver code
Compiling, Loading And Exporting
Identifying important header files
Writing a simple module
Compiling modules
Loading/unloading modules
Exporting symbols from a loadable module
Creating stacked loadable modules
Character Devices Classes of device

0e files
Major and minor numbers
Creating device files with mknod
Registering character device file
Listing character device driver methods
Dynamic major/minor numbers

Tracing and Debugging printk for debugging

Information in /proc and /sys
strace to track system calls
crash, gdb

Data: User To/From Kernel

Functions for accessing user space
Shared Memory
Issues with accessing user space from kernel space

IOCTL, mmap() and fasync()

What is ioctl
Using ioctl commands Implement­ing IOCTL in drivers
Implementing mmap() in a driver
Implementing fasync() in a driver

Blocking and Wait Queues

Schedule()
Wait Queues
Poll()

Memory management


Memory allocation with kmalloc and kfree
Page-oriented memory allocation

Network Drivers

The net_device structure
Naming scheme
Network driver methods

Block Device Drivers

Block device drivers
Header files
Registering block drivers

   



   

If you have any questions about the difficulty level of the class or any other aspect of the class, please contact us at: classes (at) linuxcertified.com

Optional: All attendees will get a Linux laptop to be used during the class. You have the option of purchasing this laptop with an additional course fee.

Enrollment Form

On-site: If you would like to arrange an on-site Linux Device Driver class, please contact us: classes (at) linuxcertified.com.

Public class schedule: Please see dates on our calendar page.

 

Receive Announcements & Linux Tips

info@linuxcertified.com
Linux is a registered trademark of Linus Torvalds.