Title
SF007 – Linux Device Drivers Training
Training on Linux Device Drivers Programming
Course Overview
So, how does one master so many device drivers on Linux? The ideal approach is to learn one device driver at a time. Take it as a project on Linux and complete that driver project before moving on to another driver project. Its lot of fun (and lot of hard work). Right?
Our Linux device driver training course helps people learn design and develop one such driver – Virtual Character device driver, on a standard desktop PC architecture (on an x86/x8-64 hardware platform). Every participant will be writing substantial code from scratch and complete that as a project in the training session.
This intensive training course transforms an IT-Professional or a Student into a Linux Device Driver & Kernel Developer. The participant will develop a deep understanding of Linux device driver subsystem, how it interfaces with Linux kernel as well as various devices; Participant will also learn other kernel subsystems and skills necessary to do efficient programming in kernel mode in Linux.
- Linux Device Driver Training will be delivered by our Founder/Director who is an Expert with 20+ years of experience in Linux Kernel and SAN software development.
- The course flow will be an assignment driven model so that participant can have a deep understanding of kernel modules & Linux device driver framework as well as kernel mode programming practices.
- Participant will be writing an advanced memory based device driver from scratch that not only teaches techniques to write an efficient driver, but also kernel programming issues that lead to races, Linux kernel hangs & oops leading to kernel crash
- Lectures, Classroom Discussions and Lab Exercises
- 30% Theory, 70% Lab
- Location: Sanfoundry Institute, Bangalore, India
Labs-Assignments
Lab1 – Identification of major and minor numbers for various popular (reserved) devices.
Lab2 – Writing simple kernel module with command line arguments.
Lab3 – Identification of currently allocated IO-ports, IO-memory & IRQs on your system/laptop.
Lab4 – Writing a memory based character device driver (DLKM Kernel Module) of fixed size (/dev/sanfd0).
Lab5 – Writing an advanced memory based character device driver of dynamic size (/dev/sanfd_dynamic).
Lab6 – Writing /dev/sanfd_zero device driver (reading any sized data from this device returns zero-filled data).
Lab7 – Writing /dev/sanfd_null device driver (ala bit-bucket / black-hole driver).
Lab8 – Implementation of ioctls – RESET (it should reset the device to its default size and initial values), GETSIZE (should return the current size of the device), EXPAND X (will expand the size of /dev/sanfd_dynamic device by X bytes).
Lab9 – Writing a userspace program to get the device size.
Lab10 – Writing a userspace program to expand the dynamic device size by 1MB and verify the working of the driver.
Lab11 – Writing user-space code to parallelly generate load on the devices, generate race conditions and implement locks in the driver to fix all the issues.
Test the working of all the devices of the driver as follows.
/dev/sanfd0
1a. echo “welcome to sanfoundry’s device driver class” > /dev/sanfd0
1b. Verify the output by issuing “cat /dev/sanfd0”
2a. dd if=/dev/sanfd0 of=mydata count=1 bs=512
– verify the output & size of mydata
2b. dd if=/dev/sanfd0 of=mydata count=1 bs=1M
– verify the output & size of mydata file
2c. dd if=/dev/sanfd0 of=mydata
– verify the output & size of mydata file
3a. dd if=/dev/zero of=/dev/sanfd0 count=1 bs=512
– verify the behavior of the driver
3b. dd if=/dev/zero of=/dev/sanfd0 count=1 bs=1M
– verify the behavior of the driver
3c. dd if=/dev/zero of=/dev/sanfd0
– verify the behavior of the driver
/dev/sanfd_dynamic
1. echo “welcome to sanfoundry’s device driver class” > /dev/sanfd_dynamic
2a. dd if=/dev/sanfd_dynamic of=mydata count=1 bs=512
– verify the output & size of mydata
2b. dd if=/dev/sanfd_dynamic of=mydata count=1 bs=1M
– verify the output & size of mydata file
2c. dd if=/dev/sanfd_dynamic of=/dev/null
– Observe the behavior of the system
3a. dd if=/dev/zero of=/dev/sanfd_dynamic count=1 bs=512
– verify the behavior of the driver
3b. dd if=/dev/zero of=/dev/sanfd_dynamic count=1 bs=1M
– verify the behavior of the driver
3c. dd if=/dev/zero of=/dev/sanfd_dynamic
– verify the behavior of the system
/dev/sanfd_zero
1. dd if=/dev/sanfd_zero of=zerodata count=1 bs=512
– verify the output & size of zerodata file
2. dd if=zerodata of=/dev/sanfd_zero count=1 bs=512
– verify the behaviour
IT Professionals and/or Students who want to be a serious Linux Device Driver & Kernel Developer on Linux based enterprise and embedded platforms
Click Here for Linux Device Drivers course training schedule, fee and registration information.
Course Outline
|
|