Consult our trainings :
Linux kernel and device drivers programing Training
- Participants / Prerequisite
During this session you will study the Linux kernel internals. This will enable you to write better applications, optimize your Linux system or participate to Linux kernel enhancement. You will learn how to write device drivers and to integrate them with the Linux 2.6 and 3.x driver framework to provide hotplug and power management.
- Getting the sources. Participating to the LKML. Licenses issues. Overview of the Linux kernel.
- Development tools. The GNU C Compiler and associated tools. indexing the kernel.
- A module primer. Loading a linux module. Using printk and dmesg.
- Loading the kernel and modules.
The "hello world" module. Creation of a patch for the LKML.
- Processes and threads. Kernel data structures task_struct, current and the thread_info.
- Memory management. User and kernel memory spaces. UMA, NUMA, Nodes and zones.
- Synchronizations. Thread context and interrupt context. atomic operations.
- The kernel notion of time. Xtime, jiffies and HZ using delays and sleeps.
- Handling signals in the kernel. Sending and receiving signals in the kernel.
Creation of little modules implementing single kernel functionalities like wait queues, completions, timers, procs interface, kernel threads and signals.
- Registering with the VFS.
- Essentials VFS callback.
- Extending the registration.
Creation of a complete driver implementing a pipeline using most of the kernel utilities, memory allocation and timers. Tests using standard UNIX cat(1) command.
- Accessing memory and devices.
- Managing DMA.
- Interrupt handling.
Extension of the previous driver with interrupt handling. Creation of a little module mapping physical memory for a dedicated user program.
- Overview. The Linux 2.6/3.x object oriented interface for drivers Kset, kobjects and kref
- Object description of device access.
- Implication on driver's development.
- Power management.
Extension of the previous driver with the integration into the Linux driver framework and with power management callbacks.
- Storage. Data structures and implementation of block drivers.
- Network. The sockets and socket buffers: skbuf.
- Input. Data structures and interface with the Linux driver framework.
- USB. Overview, implementation and data structures.
Implementation of small modules implementing a basic network interface. Implementation of an input driver moving the mouse according to a simple character interface.