3 ms·
Grab a copy of Linux Device Drivers by Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman: https://lwn.net/Kernel/LDD3/ https://lwn.net/Kernel/LDD3/ Don'
by antegamisou 4y ago
Grab a copy of Linux Device Drivers by Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman:
https://lwn.net/Kernel/LDD3/ https://lwn.net/Kernel/LDD3/
Don't mind the document's age, the principles have largely remained unchanged. Besides, it's probably a better fit since you're targeting a device from 2007
I understand this may be kind of non-specific to what you were expecting, but it's the most rewarding way of achieving what you want and coming up much faster with a driver for an obscure device next time.
- fuckstick 4y agoUnfortunately, it’s completely irrelevant to the question asked as printers are typically not driven by kernel mode device drivers.
- deleted 4y ago[deleted]
- antegamisou 4y agoThe book covers the user space as well iirc. And who says you can't write a kernel driver for a printer? It's certainly overkill but if you're into low level programming it's a very fascinating way to dive deeper into it, as I assumed is the case going by the last sentence of the OP.
- fuckstick 4y ago> The book covers the user space as well iirc. No it does not. It’s easy enough to scan the USB chapter and see that it is entirely targeting the kernel interface. > And who says you can't write a kernel driver for a printer Well there already is one - usblp. If you’re trying to grok the esoterica of Linux USB kernel mode interfaces - a printer class driver is not the worst exercise - but this is to me very far removed from the task at hand - driving the hardware.
- antegamisou 4y agoHmm you're right, now I'm sure I have to be misremembering the book I intended to link, there certainly was a chapter on user space drivers which was of course more digestible compared to LDD. > a printer class driver is not the worst exercise Maybe that's why it's a good introductory to kernel drivers programming? Some friends back in school were tasked the exact same thing (implement usblp 'from scratch').
- sireat 4y agoA quality book, recommended. I do remember having a bit of trouble finding the most recent source code for the book at the time (which was 12 years ago).