Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2007 15:33:55 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Steve Franks <stevefranks@ieee.org>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: how to compile and install a new driver
Message-ID:  <20071127151259.H27150@wonkity.com>
In-Reply-To: <539c60b90711271248o6eb0b9fw757e40fbcdfdb3c2@mail.gmail.com>
References:  <539c60b90711271248o6eb0b9fw757e40fbcdfdb3c2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071127151259.H27150>