LLC106: Device Driver Programming on Linux
Overview
LLC106: Device Driver Programming on Linux course takes an insight into the Linux kernel and the way it manages devices. In this course we will be looking at the services offered by the Linux Kernel for device drivers, and also look at how to program character, block and network devices.
Pre-Requisites
Command line experience on Linux Platform or undergone LLC033 course, knowledge of C programming on Unix / Linux platform. Considerable knowledge of Linux System Programming concepts like signals, processes, file operations, system calls and sockets or LLC104: Linux Internals & Programming Essentials Course.
Target Audience
This course is for programmers who are interested in system programming.
Duration: 4 days (Full-time)
Course Outline
Module Basics OS Services And Data Structures Hardware and Interrupt Handling Block Device Drivers Network Drivers
– Role of the Device Drivers
– Splitting the kernel
– Classes of devices and modules
– Kernel Architecture or Model
-Introduction to Modules & Device Drivers
– Modules Defined
– Types of Modules in the kernel
– Writing Your first kernel module
– Module Related Commands
– Kernel Module vs Applications
– User space vs Kernel space
– Statically linked vs Dynamically linked drivers/modules
– Exporting symbols from modules
– The kernel symbol table
– Concurrency in the kernel
– Module Parameters
– Version dependency
– Lab exercises
– Atomic functions, Bit Operations
– Linked List, Memory barriers
– Semaphores
– Basic memory Management
– Time intervals in the kernel
– Delaying execution,Kernel timers
– The proc file system
– Registering a character device driver
– File operations
– The file structure
– devfs / lseek /ioctl
– Blocking, non blocking and asynchronous operations
– Using IO Ports
– Installing and implementing an interrupt handler
– Tasklets and Bottom halves
– Task queues
– Handling requests
– Ram Disk Driver
– The net_device structure in detail
– Packet transmission
– Packet reception
– Simulating a network device
– Exploring the rtl8139 network card