*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I know this might be pure rudimentary, although I'm pretty interested. I was wondering what the steps were for creating hardware support for a certain operating system (in this case OpenBSD). Am I going to need the schematics of the device? Obtain any of the white paper information from the hardware creator (edit: vendor) itself?
Thanks ahead of time guys.
I was also wondering if OpenBSD would support my driver? I'm only 15 years old, I'm not sure if there would be an age restriction or as to why there would be. Oh and also with them accepting my work... should I go through and audit twice for potential problems and faults? I realize how picky they are about their source so would this help them out? (I'm just wondering before I go ahead and start on something =))
The easiest way to learn how a piece of hardware work IMO is to reverse engineer existing drivers. As far as I'm aware this is legal as long as you don't actually modify the drivers or use code from them. I'm currently coding a linux driver for a certain Smartcard reader which uses the serial port, as an example. I am using PortMon (on Windows) to monitor how the Windows driver interacts with the card reader.
Ah, is this normally how others do so? I currently have nothing planned at the moment, although I intend on doing this in a bit. Well... only if I find some hardware that needs (to) / can be ported that is.
I see that you were using Windows to watch the card... anyway to evade having to use Windows?
Well most of the time hardware vendors are reluctant to give out details and white papers, so this is the only way possible. For example, ATI hasn't released data on their Radeon cards so no open source 3D drivers can be made unless someone reverses their Linux binary drivers.
I had to use Windows to monitor the card because they were the only drivers available for the card. Most of the time, you will find that drivers are only available for Windows or maybe DOS. Seeing as Windoze is on most typical users PC's, I don't think any hardware vendor would make hardware that doesn't have Windoze drivers. Also, if there are drivers for other platforms they are often outdated and/or incomplete.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Usually it's nearly impossible to create a driver without documentation. Most of the card left that don't have drivers are that way because the vendor doesn't provide documentation (ATI, HiFn, etc). Most Open Source drivers are imported to a particular OS by copying and modifying the driver from another OS. The BSDs do this frequently. Occasionally a driver will be created by referencing a driver from Linux.
Writing drivers is a pretty arcane persuit. You need to be intimately familiar with hardware--stuff like registers, timing, etc... Things like NICs often do some processing on the card itself, such as doing TCP checksums. You need to know how to enable that through your driver rather than have it passed off to the CPU.
If you're not already an excellent programmer, I wouldn't start by trying to write drivers. That being said, there's no real age limit on contributing to Open Source projects. If your code is really well done and it does something that's necessary (e.g. adds support for a previously unsupported device), then chances are it will be accepted. If you write sloppy code, it doesn't matter how old you are or how much education you have, it's going to get rejected (at least in OpenBSD--they're really, really picky about quality).