*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Edit:
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.
Edit:
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
Posts: 3,660
Rep:
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.