Good news.. i just found cool training for the developer or Validation team.. especially who work with the new hardware/driver… You can use the knowledge to implement it in your daily task..Adding a Driver to the Kernel Tree
Details: Linux Certified
Linux Device Driver Training
Linux Device Driver Development Course
Overall objective of this class is to teach attendees on how to develop device drivers for Linux.
This three day 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, as well as other essential topics.
This course acquaints developers with the issues essential for Linux device driver development. The course progresses through a number of topics. Each topic is presented along with a supporting laboratory exercise before moving on to the next topic.
Attendees will spend approximately 50 percent of the class time actually gaining hands-on experience with these topics.
The following modules will be covered during the class:
Devices in Linux
Devices treated as files, the /dev directory
Device classes – character, block, network, pipe
Creating device files with mknodUser Space Driver APIs
Low-level API
Streams APIHow Loadable Modules Work Benefits of loadable modules
Correct use of insmod, modprobe, rmmod, and lsmod
Passing parameters to a loadable module
The GPL and your driver codeCompiling, Loading And Exporting
Writing a simple module
Compiling modules
Loading/unloading modules
Exporting symbols from a loadable module
Creating stacked loadable modulesCharacter Devices Major and minor numbers
Registering character device file
Driver methods – the file operations table
Transferring data to/from User SpaceTracing and Debugging printk for debugging
Device information in /proc
strace to track system calls
ksyms and ksymoops
Debuggers – gdb and kgdbBlocking and Wait Queues Multi-tasking
Schedule()
Wait Queues
Save sleeping
Poll()Accessing Hardware I/O ports vs. memory mapping
Allocating and mapping I/O space
Functions for reading and writing I/O ports
Barriers
Accessing I/O from User SpaceHandling Interrupts Interrupt Handler functions
Restrictions of kernel code running in interrupt context
Deferred interrupt handling tasklets and workqueuesAccessing PCI hardware
detecting PCI devices
Resource conflicts
Vendor/device IDs
I/O mappingUSB Drivers USB structure and Topology
Endpoints, interfaces and configurations
USB Request Blocks(urbs)
Driver Structure and organization
“Gadget” driversManaging Time Timer interrupts and jiffies
Short Delays
Task queues
Kernel TimersBlock Device Drivers Block Device Drivers
Header files
Registering block drivers
The block_device_operations structure
Special Methods
Network Drivers
The net_device structure
Sockets
Naming scheme and registration
Network driver methods
NAPI the new APIAdding a Driver to the Kernel Tree Where to put it – kernel layout for drivers
Modifying the Makefile
Adding it to configuration options – the Kconfig file
Course Objectives:
• To provide an understanding of the essentials of Linux device drivers.
• To give you practical experience in developing Linux device drivers.
• 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
• Trade-offs between loadable modules and drivers compiled into the kernel.
Who Should Attend:
The course is designed for software engineers who are new to Linux 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.
Course Materials
The class materials for this course have been meticlously designed by leading practioners in this area. The workshop materials include a comprehensive student workbook and CD. The workbook contains all of the slides used in the course as well as hands-on lab exercises. The CD contains the lab exercise code as well as a large amount of Linux software.
Course Workshop and Set-up:
The workshop makes use of standard PC’s with a desktop Linux distribution for development. The course will make use of PC’s and PC devices as examples.
test