分享

What's the best way to learn device driver develop...

 永恒jkvtcazslw 2018-08-02
I second you that Linux is the best choice to learn device driver development since you have plenty of examples (the Linux core represents only a small percentage of the total source code, most are device drivers), lots of devices supported by Linux, documentation and a well established global community.

To learn device driver development, like any other new knowledge, the best approach for me is to learn first the theory and then to do some practice.

If you don't know about operating systems, I recommend 'Willam Stalling's OS book' [1]. This book has a more hardware oriented approach unlike other OS books that focused more on the algorithms and data structures used in operating systems.

After having a high level overview of operating systems, you have to learn about Linux kernel development. Robert Love's book [2] is for me the best one on the subject. You can learn not only about Linux kernel development, but also the motivations behind the technical decisions that lead to the design.

Then you have to learn about device drivers development on Linux, two books that are very good are 'Linux Device Drivers' [3] and 'Essential Linux Device Drivers' [4]. This two books are complementary. The former teaches how to write virtual device drivers for memory based devices, so you can try the examples without the need of special hardware. While the latter shows you how device drives for real devices are actually written. I maintain an up-to-date repository with all LDD3 examples so you can compile and test on recent kernels [5].

Once you have the theory you can begin with the practice by writing real device drivers. You need a hardware that still is not supported on Linux. The good news is that you probably already have one of these devices. With the popularity of the Android platform, is very likely that you own an Android device.

Even when Android is a Linux-based operating system, Google by a design decision forked the Linux kernel and added some APIs [6] that don't exist on the Linux kernel. These APIs are used by device drivers and for that reason, a developer has to choose whether to write a device driver for Android or Linux.

So, porting Android device drivers to Linux is an excellent opportunity to learn device driver development skills, the Linux kernel development process and how to work with the Linux community while doing something useful.

[1]: http:///OS/
[2]: http://blog./2010/07/li...
[3]: http:///Kernel/LDD3/
[4]: http:///
[5]: https://github.com/martinezjavie...
[6]: http:///Articles/416690/

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多