how to compile and install a new driver
Warren Block
wblock at wonkity.com
Tue Nov 27 14:33:57 PST 2007
On Tue, 27 Nov 2007, Steve Franks wrote:
> I found this thread
> http://lists.freebsd.org/pipermail/freebsd-stable/2006-August/027445.html
> to a driver I need for my system.
>
> (1) The file extension
> (http://www.dons.net.au/~darius/ucp-0.01.diff.gz) is .diff, not .c, so
> what exactly do I do with it to compile it?
It's a file produced by diff(1), which shows the differences between
files. Normally, the difference is between the old files and what
someone has changed or added. Also called a patch file, since you use
patch(1) to apply it. patch(1) goes through the diff file and makes all
the changes shown.
In this case, the diff file has changes to several files.
Looks like it applies to /usr/src/sys. After untarring the file, and as
root:
# cd /usr/src/sys
# patch < ucp-0.01.diff
*If* the patch applies successfully, then you can compile. Easiest
would probably be to just rebuild the kernel. Slow, but you know it'll
get everything.
> (2) Assuming I can get it to compile, which I've never done, what do I
> do with the object/driver file?
Probably like other ucom(4) devices:
kldload ucp
and then access the serial port through /dev/cuaU0.
> This driver is long overdue, the part has been in usb devices for
> several years, and support is in OpenBSD and Linux already (so I'm
> told by google). I'll happily document the process if someone holds
> my hand.
That is a good case for a PR. Particularly when you've got a patch, at
least as a starting point.
-Warren Block * Rapid City, South Dakota USA
More information about the freebsd-questions
mailing list