FreeBSD Device Drivers: a 200 hour course rather than a kernel reference
FreeBSD Device Driver Book
At a glance
- What is it?
- FreeBSD Device Drivers is a free MIT licensed book by Edson Brandi, 38 chapters and 4,500 pages of guided FreeBSD 14.3 driver development with hands-on labs and a single driver that evolves across the whole text. It is written for people willing to spend about six months on it, and it says plainly who it is not for.
- Who is it for?
- FreeBSD Device Drivers suits a developer who wants to understand how FreeBSD drivers are written and submitted, and who can commit roughly 200 hours to a structured course with labs on a real system.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 77 days ago.
- What is it written in?
- Mainly Shell, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A guided course, not a reference manual
FreeBSD Device Drivers: From First Steps to Kernel Mastery is a free, open source book by Edson Brandi, and it makes its genre choice explicit. The project calls it a guided course rather than a reference, structured around 38 chapters, 6 appendices and dozens of hands-on labs that compile and load on a real FreeBSD 14.x system. The audience is stated as readers who are willing to learn rather than readers who are already qualified.
The starting point is deliberately low. The book begins with UNIX fundamentals and the C language, walks through each concept the kernel will demand, and only then opens the door to driver development. The stated rationale is that by the time the reader reaches DMA, interrupts and PCI work, the vocabulary feels earned rather than imposed.
The scale is the other thing to understand before starting. The book stats table gives 4,500 or more pages, about 100 hours of reading time and about 100 hours of lab time, for a total study time of roughly 200 hours, which the book itself estimates as about six months at five hours a week. Anyone reading this to decide whether to adopt it should read that row twice.
The comparison the project makes is with the existing FreeBSD references, naming `man 9`, the Architecture Handbook and the Newbus papers as excellent but separate. The claim is that what has been missing is a single text that starts from zero, targets FreeBSD 14.x specifically, treats labs as first class work, and follows one driver from its first line to an upstream review.
Seven parts that build on each other
The structure is a progression rather than a reference arrangement. Part one is foundations, covering lab setup, UNIX, C for kernel work and driver anatomy. Part two builds the first driver, with character drivers, device files, read and write handling and efficient I/O. Part three is concurrency and synchronization, covering threads, mutexes, condition variables, timers, taskqueues and semaphores.
Part four moves to hardware, covering PCI, interrupts, MSI and MSI-X, DMA and power management. Part five is the debugging and practice part, with tracing, KGDB, advanced debugging and performance tuning. Part six covers transport specific drivers: USB and serial, storage devices and the VFS layer, and network drivers. Part seven, described as mastery topics, handles portability and driver abstraction, virtualisation and containerization, security practices, Device Tree and embedded development, performance tuning and profiling, advanced debugging, asynchronous I/O and event handling, creating drivers without documentation through reverse engineering, and submitting a driver to the FreeBSD Project.
The chapter list gives the granularity. Chapter 2 is setting up your lab, chapter 6 is the anatomy of a FreeBSD driver, chapter 8 is working with device files, chapter 19 is handling interrupts, chapter 21 is DMA and high speed data transfer, chapter 36 is creating drivers without documentation, and chapter 37 is submitting your driver to the FreeBSD Project, with chapter 38 closing with final thoughts and next steps.
Roughly half of the recommended study time is hands-on, and the recurring patterns are named in the project description: attach, cleanup and locking. The claim is that the same patterns recur across chapters until they become reflex, which is a better way to learn a kernel API than reading a page of man text per subsystem.
One driver that grows instead of seven separate examples
The pedagogical device that distinguishes this book from a tutorial collection is the `myfirst` driver. It evolves chapter by chapter, gaining synchronisation, then hardware access, then interrupts, then DMA. The reader sees the same code mature rather than meeting a fresh skeleton in every chapter, and by the end the project has covered the full lifecycle from a hello kernel module to submitting a Phabricator review and shepherding a driver into the FreeBSD tree.
The repository mirrors that structure. Alongside the book text there is a `content/` directory, a `public/` directory for the published output, a `scripts/` directory, a `translations/` directory, and an `examples/` tree that holds a README, an `appendices/` folder and a folder per part, from `part-01/` through `part-07/`. So the example code is organised by the same seven part structure as the chapters, and the source of the book is kept in the repository rather than only as a download.
The verification claim is also specific. Every API, every example and every lab is stated to have been verified against the FreeBSD 14.3 source tree, and 14.3 is the target release listed in the stats. For a book about kernel interfaces that change between releases, that is the detail that decides whether the code still compiles when you run it.
Part five covers what happens when something goes wrong, with chapters on debugging and tracing, integrating with the kernel, and advanced topics and practical tips, and the outcome the book promises by the end is that the reader has debugged kernel panics and profiled a driver under load.
How it differs from man 9 and the Architecture Handbook
The genuine alternative to this book is not another book of kernel tutorials, it is the reference documentation the project itself names. `man 9` gives you the API contract for a specific call, the Architecture Handbook explains the platform design, and the Newbus papers describe the model the kernel uses for device attachment. A professional FreeBSD developer will keep all three open.
The difference in approach is that the references are organised by subject and consulted by question, while this book is organised by a learning sequence and read in order. That has direct consequences for when each is the right tool. If you know you need the calling convention for `device_attach`, the manual page is the faster answer and there is no case for reading four hundred pages first. If you do not yet know how a driver is structured, the manual page is close to useless, because it answers questions you have not thought to ask.
The project also positions itself against the encyclopaedic option, stating in its 'who this book is not for' section that the focus is real world FreeBSD driver development and not exhaustive bus or device specifications. So the book is narrower than a hardware reference in a way that is deliberate. The appendices include a FreeBSD kernel API reference, which is the closest it comes to that kind of lookup aid.
There is a second alternative in the same space: learning on the job from an existing driver in the FreeBSD source tree and from the commit history. That route is faster for someone who already knows C and UNIX and just needs the FreeBSD specifics, and it teaches the code as it exists rather than as a teaching example. The book's answer to that is the reverse engineering chapter, where creating a driver without documentation is treated as a skill to be learned rather than an accident to be avoided.
Getting the book and reading it in the right language
The book is distributed in four formats, PDF, EPUB, HTML and Markdown source, so the same content is available as a printable document, an ebook for a reader, a browsable site and plain text in the repository. The repository is where the Markdown lives, which also means corrections and additions can be tracked as commits rather than reissued as a new file.
There is also a translation dimension, and it comes with a caveat worth reading before you commit to it. The languages line lists English as the original, with Brazilian Portuguese and Spanish marked as AI translated, and the badge in the header lists the same three. For a technical book where the exact meaning of a kernel term carries weight, a machine translation is a different reading experience from the English, and the project is upfront about which text is which.
The last push was on 2026-08-07, and the one release listed is version 2.0, described as a full draft release, dated 2026-04-25. The repository is not archived. Version 2.0 is the second major version of a document rather than a package, so there is no upgrade path in the usual sense; a reader who worked through version 1 has to judge for themselves whether the changes justify redoing the labs.
The licence is MIT, stated in the header badge and in the LICENSE file, which is permissive enough that a company can use the text internally or adapt it for training without a copyleft obligation. That is a description of what the licence grants rather than advice on your obligations.
Who should skip it, and what the labs demand of you
The project is unusually direct about its exclusions, and reading them saves time. It is not for readers looking for a quick copy and paste manual, because the book emphasises understanding over shortcuts. It is not for seasoned kernel developers who do not need the foundations, since the pace starts from the ground up. It is not for readers wanting an encyclopaedic hardware reference.
The requirement that follows from all this is hardware and patience. The labs compile and load modules on a real FreeBSD 14.x system, so reading the book without a machine to run them on gives you the narrative but not the reflexes. The book spends roughly a hundred of its two hundred hours on lab work, and the recurring patterns of attach, cleanup and locking only become automatic if you actually attach, clean up and lock things that break.
The people it fits are three, according to the project. Beginners who know little about C, UNIX or kernels but are willing to learn. Developers who are curious about how operating systems work under the hood. And professionals who already use FreeBSD or similar systems and want to deepen their knowledge by learning how drivers are built in practice.
That last group is the one most likely to finish it. The middle group is the one most likely to start and stop, which is why the total study time is stated in hours and in months rather than left vague.
Editorial conclusion
FreeBSD Device Drivers suits a developer who wants to understand how FreeBSD drivers are written and submitted, and who can commit roughly 200 hours to a structured course with labs on a real system. It does not suit someone who wants a lookup reference, since the book explicitly deprioritises encyclopaedic coverage and the project points to man 9 and the Architecture Handbook for that, and it does not suit a developer on a different FreeBSD release, since every API and lab was verified against the 14.3 source tree. Before starting, download the format that suits you, from PDF to EPUB to plain Markdown, and note that the last push was on 2026-08-07 with version 2.0 released in April 2026.
Frequently asked questions
How long does it take to work through the FreeBSD Device Drivers book?
The stated totals are about 100 hours of reading and about 100 hours of lab work, for roughly 200 hours in total, which the book estimates as about six months at five hours a week. It has 38 chapters, 6 appendices and more than 4,500 pages.
Which FreeBSD version is the book written against?
FreeBSD 14.3. Every API, example and lab is stated to have been verified against the 14.3 source tree, and 14.3 is listed as the target release.
Is the FreeBSD Device Drivers book available as a free download?
Yes, it is released under the MIT licence and published in four formats: PDF, EPUB, HTML and Markdown source, with the Markdown kept in the repository alongside the per-part example code.
Do I need prior kernel programming experience to start?
No. The book starts with UNIX fundamentals and C before any kernel code, and it is aimed at readers who are willing to learn rather than readers who are already qualified. It is explicitly not aimed at seasoned kernel developers who do not need the foundations.
What does the book not cover?
It is not a copy and paste manual, it is not for seasoned kernel developers, and it is not an encyclopaedic hardware reference. The focus is real world FreeBSD driver development rather than exhaustive bus and device specifications.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ebrandi-fdd-book)Was this useful?