Skip to page content Skip to section menu Skip to site-wide navigation About Us | Consultancy | Training | Software | Publications | Open Source | Support | Open Standards | FAQ | Jobs
Site Style Info

Linux Kernel Internals and Device Driver Programming — A 5-day Course

Synopsis

Developers building embedded solutions using Linux often need to make kernel-level modifications, or to write drivers for custom hardware. This advanced programming course provides an intensive overview of the Linux 2.6 kernel, kernel level programming and device driver theory and implementation, as well as kernel configuration and compilation. You'll develop and test code on both a Debian 2.6 Kernel running on a PC Platform and an ELinos 2.6 Kernel running on an ARM 9 target board. You'll gain experience of device drivers for components and protocols often found in embedded systems, such as I2C, SPI, Bluetooth and USB.

Course Objectives

You will gain a comprehensive understanding of Linux Kernel building, kernel and device driver programming, and experience of device drivers for components and protocols often found in embedded systems such as I2C, SPI, Bluetooth and USB. You'll consolidate your knowledge with practical labs, including:

Prerequisites

Scheduled and On-site Courses

Courses in this subject are scheduled on an 'ad-hoc' basis. We can arrange a course at our Carshalton centre or on customer site for any client wishing to send two or more delegates on the same course.

For courses at the Carshalton Centre the fee will be:

On-site course fees are as above + expenses recharged at cost.

For a 1:1 course in Carshalton the fee is £2750 + VAT. For a 1:1 on-site course the fee is £2750 + VAT + expenses recharged at cost.

If there are any dates showing below this line, a course has been scheduled and places for individuals are available at £1750. Otherwise, no courses are currently scheduled and the above fees apply.

Publicly scheduled dates, locations, and prices

A schedule of dates for this course is not currently available. Please call 0800 651 0338 or use our contact form to enquire about places and availability.


Contents

Linux Background

  • The evolution of Linux
  • Linux and the POSIX API
  • Understanding how the Linux Kernel is split up
  • The major differences between Linux 1.x and Linux 2.x
  • Key changes between Linux 2.4 and Linux 2.6

Linux Internals - the key parts

  • Memory addressing - segmentation and paging
  • Process creation, process switching, process destruction
  • Interrupts and Exception Handling
  • Time, timing and timer interrupts
  • Memory management and the process address space
  • System calls, signals and the POSIX API
  • I/O Devices
  • File systems - VFS, EXT2, Flash File Systems
  • Inter-process communication
  • Program loading and execution

Modules

  • Loadable modules and insmod
  • Security issues with loadable modules
  • Applications compared to kernel modules
  • User space, kernel space
  • Compiling and loading a module
  • Initialisation, shutdown and error handling by a module
  • Usage counting and module unloading
  • How a module acquires and accesses system resources (I/O Ports, I/O memory)
  • Automatic and manual configuration
  • User space drivers

Character Drivers

  • Major and minor device numbers
  • Dynamic allocation of major numbers
  • File operations - the file_operations structure and the file structure
  • Case study - Rubini and Corbet's scull device
  • Getting applications to use new devices

Device driver

  • Device driver testing and debugging
  • Using ioctl commands
  • Blocking vs. non-blocking I/O
  • Controlling access to a device

Time and the Linux Kernel

  • Timer interrupts and kernel time
  • Kernel time and the jiffies variable
  • Task queues
  • Understanding kernel timers
  • Tasklets and deferred work

Memory management - basics

  • kmalloc
  • Lookaside caches
  • vmalloc
  • Boot time memory allocation

Hardware management and usage - basics

  • I/O Ports and I/O Memory
  • Interrupts and Interrupt handling
  • The /proc interface
  • Circular buffers
  • Spinlocks
  • Race conditions

Block drivers

  • Registering
  • Handling requests - and data transfer
  • Queuing and block drivers
  • The ioctl command and block drivers

Case studies

  • USB device drivers
  • I2C and SPI device drivers
  • CAN device drivers
  • Bluetooth device drivers
  • Network device drivers
  • Overview of the Linux TCP/IP Protocol stack
  • TCP/IP over Ethernet
  • PPP over a dial-up modem connection
  • TCP/IP over USB
  • TCP/IP over Bluetooth
  • A/D and D/A for control applications