Skip to content
This repository

Linux Driver Template

branch: master

updates

latest commit 54b54e0325
Constantine authored
Octocat-spinner-32 .gitignore fixes September 18, 2012
Octocat-spinner-32 Makefile updates January 13, 2013
Octocat-spinner-32 README.md mv misc_drv.c misc_loop_drv.c December 12, 2012
Octocat-spinner-32 ctracer.h updates December 11, 2012
Octocat-spinner-32 dio.c fix November 14, 2012
Octocat-spinner-32 kthread_sample.c +misc_drv.c fixes, +pr_fmt, removed timer December 10, 2012
Octocat-spinner-32 ldt-test updates January 13, 2013
Octocat-spinner-32 ldt.c restored ioctl December 10, 2012
Octocat-spinner-32 ldt_configfs_basic.c checkpatch and cgcc fixes December 10, 2012
Octocat-spinner-32 ldt_plat_dev.c checkpatch and cgcc fixes December 10, 2012
Octocat-spinner-32 ldt_plat_drv.c updates December 11, 2012
Octocat-spinner-32 ldt_plat_test ldt.c simplified: removed work, ioctl December 06, 2012
Octocat-spinner-32 misc_loop_drv.c updates January 13, 2013
Octocat-spinner-32 misc_loop_drv_test updates January 13, 2013
Octocat-spinner-32 tracing.h fix November 14, 2012
README.md

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.

Usage:

Just run

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

and explore sources.

Files:

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: https://github.com/makelinux/ldt/

Compiled and tested on Linux versions:

v3.6-rc5

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

2.6.38-11-generic (Ubuntu 11.04)

v2.6.37-rc8

v2.6.36-rc8

Failed compilation with:

v2.6.35-rc6 failed because of DEFINE_FIFO

Something went wrong with that request. Please try again.