Linux Kernel & Device Driver Programming
COP5641 Spring 2013
[Home]
[Syllabus]
[Calendar]
[Class Code]
[Assignments]
[References]
[Final Projects]
References
Textbooks
Title: Linux Kernel Development (3rd Edition) Author: Robert Love Publisher: Addison-Wesley Professional ISBN 978-0672329463 Hard copy available from Amazon.com. |
Title: Linux Device Drivers, 3rd Edition Authors: Jonathan Corbet, Allessandro Rubini & Greg Kroah-Hartman Publisher: O'Reilly ISBN 0-596-00590-3 http://www.lwn.net/Kernel/LDD3 |
Kernel Debugging and Development Resources
The following resource guides have been put together by members of the Spring 2013 class:
Student Contributor | Tool Name | Synopsis | Notes | Other References |
Patrick Tully | ctags | Source code indexer. Indexes source code for fast lookups of methods, variables, structs, macros, etc. | class presentation (pptx) | http://vim.wikia.com/wiki/Browsing_programs_with_tags http://ctags.sourceforge.net/ctags.html |
Shuanglong Zhang | vim + ctags + cscope | vim - text editor ctags and cscope- generates tags for functions and macros, used for navigating code |
class presentation (odp) | http://www.ctags.sourceforge.net http://www.sourceforge.net/projects/cscope/files |
Michael Backherms | git | Speedy tool for distributed revision control and source code management | class presentation (pptx) | http://en.wikipedia.org/wiki/Git_(software) http://git-scm.com/book/en/Getting-Started http://lwn.net/Articles/160191/ |
Steven Bronson | static analysis tools (Frama-C) | Frama-C is a static analysis tool for C code. Propositions are specified in ACSL (ANSI/ISO C Specification Language). There are a variety of plugins available to handle different aspects of static analysis (value analysis, slicing, etc.). | Installation: 'aptitude install frama-c' -- Install frama-c-gui if you want a GUI. Example: A more accessible example than the one I showed in my presentation is available on their website. Their walkthrough uses GUI features to interactively submit queries about the code. Kernel Notes:You can build the kernel using 'gcc -save-temps' to generate .i files in the source root, then run frama-c on them: frama-c *.i . For programs with a simpler build system, you can use frama-c directly as you would a C compiler (without relying on another compiler to provide pre-processed source files). |
home page ACSL description sample program showed in my presentation another example I didn't show a very good presentation they provided, but it assumes some familiarity with theorem provers and axiomatic semantics and moved too quickly for people with no background in it |
Britton Dennis | Doxygen | Generates reference manuals in HTML, LATEX, RTF, PostScript, PDF, and man pages. Generates code structure from source files. | class presentation: (pptx), (pdf) Demo: (mpg) |
Brief introduction Manual List of projects that use it |
Martin Brown | kgdb | Remote gdb for the kernel | class presentation (pdf) | (See slide 23 for complete list) |
Ben Buzbee | kexec, kdump, and crash | Tools for analyzing kernel crashes | class presentation (pptx) | Crash whitepaper Tutorial on system setup Man page - kdump Man page - kexec Man page - crash |
Linux Kernel
- Linux Kernel Site
- Linux Kernel Documentation Site
- Linux-kernel mailing list
- Understanding the Linux Kernel 3rd Edition
- Anatomy of Linux synchronization methods (2007)
- The mutex API
General Interest
- The Open Group's Single Unix Specification API search engine. This is the API implemented by Linux and other Unix-like operating systems.
- Definition of "cargo cult programming". Cargo cult programming can be a big problem with device driver code.
- GCC Inline Assembly Howto. You will run into some bits of assembly code as you read through the architecture-dependent portions of the kernel sources.
Good Books on Operating Systems
- Andrew Tanenbaum and Maarten van Steen, Distributed Systems Principles and Paradigms
- Mukesh Singhal and Niranjan Shivaratri, Advanced Concepts in Operating Systems
- Tanenbaum, Modern Operating Systems (background)
- Silberschatz, Galvin, Gagne, Operating System Concepts (background)
- Gary Nutt, Operating Systems: A Modern Perspective (background)
- Gary Nutt, Kernel Projects for Linux (background)
- Kernighan, Ritchie, The C Programming Language (background)
- Maxwell, Linux Core Kernel Commentary (background)