Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
Education & Training  >  Find a course 

Linux device driver development

» 

Business & IT Services

» 

Education & Training
US & Canada home

» Special deals
» What's new
» Register for class
» Locations
» Find a course
» ProLiant
» Business Analysis
» HP-UX
» HP Indigo
» HP Integrity
» HP NonStop
» HP Software (OpenView)
» HP OpenVMS
» HP Tru64
» HP VSE
» Imaging & printing
» iPAQ & Tablet PC
» ITSM / ITIL
» Linux
» Microsoft
» MPE/iX
» Project Management
» Service & support
» Storage & SAN
» VMware
» Printable catalogs
» Find training in other countries
» Certification
» Education consulting
» HP Virtual Rooms
» ITRC / Online training
Content starts here

At a glance

Course number U5514X
Length 5 days
Delivery method Onsite dedicated training (OST)
How to order To order or find out more information, please call our Customer Registration Center (CRC) in the US at 800-472-5277 (800-HPCLASS) or in Canada at 800-563-5089.
You can also submit a query online.

Course overview

This course provides substantial 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, how to access PCI/ISA hardware, as well as other essential topics.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. Such questions as: how do I develop a character device, how do I debug a driver, how do I use task queues are examined.Attendees will spend approximately 50 percent of the class time actually gaining hands-on experience with these topics.


Prerequisites

  • Fundamentals of UNIX course bundle 51434S+100
  • ANSI C programming or equivalent

Audience

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 of gcc, gdb, and make.


Ways to save

Benefits to you

Attendees will learn:

  • The steps necessary to add devices 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
  • Basic networking tasks
  • The use of a variety of performance tools
  • Trade-offs between loadable modules and drivers compiled into the kernel.

Next Steps


Course outline

  • How To Configure And Install The Kernel
    • Obtain and install the kernel source code
    • Configure and build a new kernel
    • Install the new kernel
  • How Loadable Modules Work
    • Benefits of loadable modules
    • Loadable device drivers
    • Correct use of insmod, modprobe, rmmod, and lsmod
    • Passing parameters to a loadable module
    • The GPL and Linux
  • Module Mechanics and Code Portability
    • Identifying important header files
    • Writing a simple module
    • Compiling modules
    • Loading/unloading modules
    • Exporting symbols from a loadable module
    • Creating stacked loadable modules
    • Integer types for portability
    • Tips on portability
  • Tracing and Debugging
    • Printk for debugging
    • Device information in /proc
    • strace to track system calls
    • Ksyms and ksymoops
    • Debuggers, e.g., gdb, and kgdb
  • Character Devices
    • Classes of device files
    • Major and minor numbers
    • Creating device files with mknod
    • Registering character device file
    • Listing character device driver methods
  • Data: User To/From Kernel
    • Important functions for accessing user space
    • Shared Memory
    • Kiobufs
  • IOCTLs
    • What is ioctl
    • Using ioctl commands to interact with a device
    • Implementing IOCTL in drivers
  • Blocking and Wait Queues
    • Multi-tasking
    • Schedule()
    • Wait Queues
    • Save sleeping
    • Poll()
  • Memory management
    • Memory allocation with kmalloc and kfree
    • Page-oriented memory allocation
    • Memory allocation in the virtual address space
    • The mmap() method.
  • I/O ports and interrupts
    • Uses of I/O ports and IRQs
    • Platform dependency issues
    • Functions used for reading and writing I/O ports
    • Interrupt Handler functions
    • Restrictions of kernel code running in an interrupt context
  • Time Management And Task Queues
    • Timer interrupts
    • Delay execution techniques
    • Task queues
    • Task queue operations
    • Obtaining the current time
  • Synchronization
    • Race conditions
    • Atomic access
    • Dead lock
    • Spinlocks
    • The Kernel Lock
    • Disabling interrupts
  • Accessing PCI/ISA hardware
    • Code to detect PCI devices in the system
    • Resource conflicts
    • Vendor/device IDs
    • I/O mapping
    • DMA
  • Network Drivers
    • The net_device structure
    • Naming scheme
    • Network driver methods
    • Various network and block driver methods
  • Block Device Drivers
    • Block device drivers
    • Header files
    • Registering block drivers
    • The block_device_operations structure
    • Special methods
  • Case Study: Serial Port Driver
    • Register character driver
    • Create basic ramdisk character driver
      • Allocate/deallocate ram
      • Implement read/write
    • Implement IOCTL in driver
      • Change baud rate
      • Change various driver settings
      • Transfer data to and from user space
    • Create /proc file which lists the current driver settings
    • Detect Serial port
    • Initialize serial port by programming I/O ports
    • Send data through serial port
      • Use task queues and bottom halves to allow buffered transfers
    • Receive data through serial port
      • Use task queues for polled reading
      • Use Interrupts for interrupt enabled reading
    • Debug the new driver


Printable version
Privacy statement Using this site means you accept its terms Feedback to Education & Training
© 2008 Hewlett-Packard Development Company, L.P.