Contributing back to OpenBSD

Nov 02, 2007 14:59

http://kurt.mosiejczuk.net/2007/11/02/contributing-back-to-openbsd/

So today, I finished making a patch to OpenBSD that allows the serial card I bought to work properly.

Basically, it was a new version of the card by this vendor. Except they changed how it worked. Really, this card is a PCI bridge with 2 4-port serial “cards” behind it. The existing driver recognized the chips used, however, the card didn’t work. It took a bit of investigation to find out that some newer cards (like this one) use a timing crystal that is ten times faster than what is usually used. So the existing driver would put garbage out the serial port. (I’m not sure if it was basically running at 96000 baud instead of 9600, or more confused). Easy way to deal with that, it’s just that the driver didn’t know this revision needed that tweak, because it just saw it as generic versions of this card.

Into the world of PCI I went. I ended up needing to get the PCI vendor and subsystem numbers using lspci. Which isn’t in a base OpenBSD install by default. And it’s not on the 4.2 install media I bought (only the most useful subset makes it onto the CD). And since this was before 4.2’s official release, no package available for download. Then I had some fun with getting it to compile, since apparently the expat library moved into the base x packages instead of being a port, but the ports tree didn’t realize this. So I got that resolved. I get my numbers.

Not I dive into the kernel source code of OpenBSD. I found that I needed to change the pcidevs and pucdata.c files. But how? It took a bit of bashing my head against the code, and some mistakes that caused the machine in question to just freeze, but I got it going.

So today, after that, I created diffs for those files and submitted them to the appropriate OpenBSD mailing list. Just got back to my desk a few minutes ago, and there was a response to the list from one of the main developers saying it was a bit garbled, and he had to apply it manually, but that my contribution has been committed.

So I’m feeling all proud because I have submitted code to my favorite software project and had it accepted. It’s really not like it’s a big contribution, but I actually took the effort to learn and do it myself.
Previous post Next post
Up