I am working through Linux Device Drivers, Third Edition and while the book is released under Creative Commons Attribution-Share Alike license, I can't seem to locate the source code for the examples used in the book.
Some Amazon reviews mention that they do exist, but fail to provide a reference. In the book snippets you can see that the license is GPL, so they must exist somewhere.
My google-fu is bringing up malware infested pits of despair.
What would be a good source for those example files used in LDD book?
Turns out there are two good sources:
- Author's Alessandro Rubini ftp site ftp://ar.linux.it/pub/ldd3/
- Florida State University Linux course page http://www.cs.fsu.edu/~baker/devices/
Former is more authoritative, but latter might be better for later kernel revisions.
You can find updates LDD3 examples here https://github.com/martinezjavier/ldd3 And online book in html format here: http://www.makelinux.net/ldd3/
Here is summary of answers above:
- Book page: http://shop.oreilly.com/product/9780596005900.do
- LDD3 officail site to download book free version: http://lwn.net/Kernel/LDD3/
- LDD3 official sample code to download: ftp://ar.linux.it/pub/ldd3/ldd3-samples-1.0.0.tar.gz, http://examples.oreilly.com/9780596005900/
- LDD3 book online version: http://www.makelinux.net/ldd3/
- LDD3 sample code which keep updated and works with latest kernel: https://github.com/martinezjavier/ldd3
- Florida State University Linux Kernel & Device Driver Programming course
I'm late to the party here, but someone else has another version of updated LDD3 code, found here: https://github.com/duxing2007/ldd3-examples-3.x. The author has kept it up to date for kernels 3.0 through 3.14. There are slight differences from the martinezjavier version, such as using mutex_init instead of sema_init.
Upon further searching I found Florida State University Linux Kernel course page, which does have a version of them.
来源:https://stackoverflow.com/questions/2142598/where-can-i-find-sample-source-files-for-linux-device-drivers-third-edition