Shopping Cart :Check Out

Linux Kernel & Device Driver workshop


• Good ‘C’ programming skills

Days :

• 4 days

Course Contents

Kernel Internals

Introduction to the Linux kernel The File System Process Management
History of Linux Virtual File system & its role Process Defined
Types of kernel Files associated with a process Process Descriptor structures in the kernel
The Linux kernel System calls Process states
Kernel Facilities Process scheduling
Kernel Architecture Process Creation
Kernel version Numbers System calls related to process management
Configure,compile kernel
Memory Management Interrupts Kernel Configuration and Compilation
Defining and Creating secondary memory areas About Interrupts Kernel Building System
Memory allocation & deallocation system calls malloc, calloc, alloca, free Interrupt Handlers Patching the Kernel
Demand Paging defined Softirqs Kernel Configuration
Process Organization in Memory Tasklets Compiling the Linux Kernel
Virtual Memory Management Work Queues
Address Translation and page fault handling Boot Process - understanding Power ON to login prompt process
Buddy System Algorithm Time and Timers BIOS Level
Slab Allocator HZ and Jiffies Boot Loader
Swapping Memory Areas Time of Day Setup, startup_32 functions
Memory Mapping Delayed Execution Available Bootloaders – GRUB, UBoot, etc.
Zones and Pages Kernel Timers Role of a Bootloader
Memory Mapping Bootloader Phase
Zones and Pages Device Drivers Kernel Initialisation Phase
Address Space Character Device Drivers The start_kernel() function
Block Device Caching Block Device Driers System Initialisation Phase
High Memory Network Device Drivers Understanding Runlevels
Paging Various initialization scripts & customizing them
Kernel Command-Line Boot Parameters

Linux Advanced Programming

File I/O Multi Thread Programming Programming & Debugging Tools
Library functions and system calls for I/O Creating multiple threads Debugging and Analysis Tools
Getting file status information with stat() Parent synchronization with other Threads strace : Tracing System calls
Processing directories and directory entries. ltrace : Tracing Library calls
Inter Process Communication Using gdb and ddd utilities
Shell Commands & Shell Scripting Pipes, FIFO's, Core Dump Analysis etc
Basic Shell commands Signals
Bash Shell Essentials System-V IPC's Linux Device Driver Programming
Message queues An introduction to device drivers
Creating Makefiles Shared memory User space vs Kernel space
Makefile basics Semaphores Kernel Architecture or Model
Creating make files for single or multiple source files project Splitting the kernel
Introduction to Sockets Kernel modules
Creating Lilbraries An Overview Kernel Module vs Applications
reating Static Library System calls related to TCP and UDP sockets Role of the Device Drivers
Creating Shared Library Using Wireshark for network sniffing Classes of devices and modules
Multi Process Programming Network Programming
Creating child processes TCP Server Client Programming
fork(). vfork(), exec() UDP Server Client Programming
Parent synchronization with child Lab exercises
Kernel Module Programming Basics Accessing Hardware Mechanisms Communicating with Hardware
Modules Defined System Memory Using I/O Ports
Data Type in the Kernel Device Memory Example: the Parallel Port
Version dependency I/O Ports Side effects and compiler optimization
Building and Running Modules I/O ports vs. memory mapping I/O APIs
Types of Modules in the kernel Allocating and mapping I/O space The hardware
Writing Your first kernel module Functions for reading and writing I/O ports Driver example
Module Related Commands Side effects and compiler optimization Barriers
Statically linked vs Dynamically linked drivers/modules I/O APIs Accessing hardware from User Space
The kernel symbol table Driver example User-Mode Access to Devices
Exporting symbols from modules Barriers open, close, read, write
Module Parameters Accessing hardware from User Space ioctl
Lab exercises for above mentioned topics ioperm, iopl, inb, outb
The proc file system programming mmap, munmap
Kernel Debugging Techniques Using /proc
Kernel Debugging: dmesg, printk Creating proc file system entries
Lab exercises for above mentioned topics Registration
Reading from /proc
Writing to /proc
Lab exercises
Hardware and Interrupt Handling Kernel Threads Concurrency and Race Conditions
Installing and implementing an interrupt handler Lab exercises UP vs SMP Issues
Restrictions of kernel code running in interrupt context Memory Mapping and DMA Combating Race Conditions
IRQs & their Registration Direct Memory Access/Bus Mastering Atomic Operations
IRQ Handling & Control Consistent Mapping Semaphores
Top & Bottom Halves Streaming Mapping Spin Locks
Autodetecting IRQ's Scatter/Gather Mapping
Kernel Help in detecting IRQ's Memory Management Time, Delays and Deferred Work
Probing for the interrupt source Allocating Memory Kernel Timers
Enabling and Disabling Interrupts Accessing Memory Timer handling
Lab exercises Get Some Space (kmalloc()), kfree(), various flags HZ and Jiffies
Get Some Pages (get_free_page()) Time of Day
Tasklets and Bottom halves Get Some Virtual Memory - vmalloc() Delayed Execution
Task queues Get Some Boot-time Space Kernel Timers
Lab exercises Current time
The Linux Device Model Writing various Character Drivers Programming with ioctl( )
Character Device Drivers Memory Based Driver writing device driver with ioctl()
Registering a character device driver IO PORT (Hardware) Based Driver Adding ioctl’s in an existing device driver
The file structure Enhanced Character Device Drivers Lab exercises
Major and minor numbers Driver and Device Control with 'ioctl()'
Character Device Methods open(), release(), read(), write() Blocking VS Non-Blocking I/O Netlink socket interface
Data Transfers between User Process and Driver Sleep vs Wakeup point to point, multicast and broadcast
copy_from_user(), copy_to_user() poll() UDP, TCP and Raw sockets
Making a Device File llseek() Writed kernel module and userspace applilcations using Netlink sockets
Memory Access in Kernel Space Access Control through Drivers Lab exercises
Programming with ioctl( ), mmap()
devfs / lseek /ioctl
Lab exercises
Network Drivers Block Device Drivers
The net_device structure in detail Handling requests
Packet transmission Ram Disk Driver
Packet reception Block drivers structures
Simulating a network device Block Device Driver Registration
Lab exercises Lab exercises
Adding a Driver to the Kernel Tree
A sample device driver project

Note: Training outline subject to change based on trainer conducting the program

Training Programs