Coder Social home page Coder Social logo

tsaiyuyan / linux-device-driver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d0u9/linux-device-driver

0.0 1.0 0.0 287 KB

Advanced examples of Linux Device Drivers (LDD3) and detailed manual for running examples in QEMU which is patched with virtual PCI, USB, serial devices. I am actively composing a new book about Driver Development in Linux Kernel.

License: GNU General Public License v2.0

Makefile 6.07% C 86.61% Shell 7.32%

linux-device-driver's Introduction

Linux-Device-Driver

Examples of Linux Device Drivers, currently for kernel 5.10.

Before start

The examples in this repo are compiled against Linux Kernel 5.10. Other versions of kernel are not tested.

Set KERNELDIR environment variable to the Linux kernel source dir, and export it in your local shell.

export KERNELDIR=/path/to/kernel/source/

This environment variable is mainly used in Makefile to determine which the kernel source tree the drivers are built against.

Introduction

This repo demonstrates basic examples of Linux Device Driver(LDD) for the purpose of study and sharing.

Some of examples in this repo are excepted from the book of LDD3(Linux Device Drivers, Third Edition), and the other examples are written by myself in necessary to illustrate some important data structures or details.

LDD3 is a great book, which is authored by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman, I give my sincerely appreciation to all these authors for their great work.

LDD3 is available online, and you may request a copy of PDF from https://lwn.net/Kernel/LDD3/. It is still an excellent book for reference for the development of Linux Driver. However, due to its old age, first published in 2005, some of the APIs and data structures have dramatically changed after it was firstly composed.

Compare to the Kernel 2.6.10, which is a base of LDD3 book, I rewrite all the examples for a brand new Kernel version 5.10, released in Decemeber 2020. Besides kernel version, hardware also evolved a lot in recently years. The parallel port, which is used as an example in I/O operations in LDD3, can be barely found in any computer now. I moved these examples to a QEMU(A generic and open source machine emulator and virtualizer) virtual machine, in which a virtual parallel port device is implemented for convenient debugging.

This is the opening of my whole project, I hope you will enjoy in the tour of reading my documents.

Thanks a lot.

Sincerely, Douglas.


License

Linux-Device-Driver by d0u9 is licensed under a GNU General Public License, version 2.


¶ The end

linux-device-driver's People

Contributors

d0u9 avatar rouzip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.