Week 5 - June 3-7

Lecture recording here.

Introduction

This week will be about Device Drivers.

Videos

Linux Device DriversLinux Devices and Drivers
How Do Linux Kernel Drivers Work?
How to build a Linux loadable kernel module that Rickrolls people

Quiz

Lecture Material

Labs

Assignment

None.

Sample Code

A peripheral writer. A device driver has been written to simulate the control of a peripheral writer. A user level application has been written to open, close, write to, read from, and send IOCTL's to this driver. Reference material to parts of the code are embedded within the code. User level documentation can be found at peripheralWriter.docx.

The Makefile for the kernel level driver can be found at Makefile.
The source code for the kernel level driver can be found at peripheralWriter.h and peripheralWriter.c.
A macro for inserting the module into the kernel can be found at load.sh and a macro for removing the module from the kernel can be found at unload.sh.

The Makefile for the user level application can be found at Makefile.
The source code for the user level application can be found at userWriter.cpp.