Linux Driver Template
C Shell Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

LDT - Linux Driver Template

LDT project is useful for Linux driver development beginners and as starting point for a new drivers. The driver uses following Linux facilities: module, platform driver, file operations (read/write, mmap, ioctl, blocking and nonblocking mode, polling), kfifo, completion, interrupt, tasklet, work, kthread, timer, simple misc device, multiple char devices, Device Model, configfs, UART 0x3f8, HW loopback, SW loopback, ftracer.


Just run

git clone git:// && cd ldt && make && ./ldt-test && sudo ./misc_loop_drv_test

and explore sources.


Main source file of LDT: ldt.c

Test script, run it: ldt-test

Generic testing utility for Device I/O: dio.c

Simple misc driver with read, write, fifo, tasklet and IRQ: misc_loop_drv.c

Browse the rest of source:

Compiled and tested on Linux versions:

v4.10 - compiled only

4.4.0-62-generic (Ubuntu 16.04.1)

3.19.0-33-generic (Ubuntu 15.04)

3.13.0-37-generic (Ubuntu 14.04.1 LTS)

3.2.0-30-generic-pae (Ubuntu 12.04 LTS)

2.6.38-11-generic (Ubuntu 11.04)



Failed compilation with:

v2.6.35-rc6 failed because of DEFINE_FIFO