我应该如何开始编写设备驱动程序? [英] How should I get started on writing device drivers?

查看:178
本文介绍了我应该如何开始编写设备驱动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想学习如何编写设备驱动程序,因为我认为这会很有趣。我使用的是Mac OS X的MacBook,但我也有一个Ubuntu机(在Mac上运行的闽)。我是pretty熟悉C,目前正在读这本书。我已经发现了一些网上的链接,如<一个href=\"http://developer.apple.com/mac/library/referencelibrary/GettingStarted/GS_HardwareDrivers/index.html\">Mac开发中心。我这样做,因为这会很有趣。我认为会有真正的满足感看到,因为软件我写的硬件上运行。

I would like to learn how to write device drivers because I think it would be fun. I use a Mac OS X Macbook, but I also have an Ubuntu machine (running on a Mac Min). I am pretty familiar with C and currently am reading this book. I have found some links online such as Mac Dev Center. I am doing this because it would be fun. I think there would be real gratification to see hardware operate because of software I wrote.

我想什么,我想是一些提示或建议和指导,没有人知道,没有司机或者我可以写一个已经支持的东西驱动器设备的列表(将preFER的前者,所以我实际提供的价值)。什么是开始使用一个良好的设备?我是不是贪多我嚼不烂?我不怕低层次的编程或组装或一切必要的努力量。我想一个挑战是真的!

I guess what I would like is some tips or advice and guidance, and does anyone know of a list of devices that don't have drivers or can I write a driver for something that's already supported (would prefer the former so I'm actually providing value). What's a good device to get started with? Am I biting off more than I can chew? I'm not afraid of low level programming or assembly or whatever amount of effort is required. I'd like a challenge really!

推荐答案

对于Linux,你可能会考虑拿起O'Reilly出版的 Linux设备驱动程序本书或阅读 PDF文件在线。在我看来,这是关于这一主题围绕着更好的文本之一。

For Linux, you might look into picking up the O'Reilly Linux Device Drivers book or reading PDFs online. In my opinion, it is one of the better texts around on the subject.

Linux内核模块编程指南是另一个很好的资源。

The Linux Kernel Module Programming Guide is another good resource.

您可能还需要专门拿起一本书上的Linux内核。我拿起罗伯特·爱的 Linux内核开发(第2版)的副本用于此目的(的3rd版的在路上)。

You may also want to pick up a book specifically on the Linux Kernel. I picked up a copy of Robert Love's Linux Kernel Development (2nd Edition) for this purpose (3rd Edition on the way).

这篇关于我应该如何开始编写设备驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆