Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2007 00:49:29 +0100
From:      Roland Smith <rsmith@xs4all.nl>
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:  <20071127234929.GA66703@slackbox.xs4all.nl>
In-Reply-To: <539c60b90711271428m31a95a64na985e003e6dc0024@mail.gmail.com>
References:  <539c60b90711271248o6eb0b9fw757e40fbcdfdb3c2@mail.gmail.com> <20071127221142.GA64385@slackbox.xs4all.nl> <539c60b90711271428m31a95a64na985e003e6dc0024@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 27, 2007 at 03:28:53PM -0700, Steve Franks wrote:
> > The 'make kernel' command will install the module automagically.
> > On the next boot, you should be able to load the ucp driver module with
> > kldload(8).
> >
>=20
> So is the kernel the collection of all .ko modules then?=20

A lot (but not all) of the device drivers and sybsystems are available
as modules. If you look into the example kernel configuration files
(GENERIC, NOTES), everything that starts with 'options' has to be
compiled into the kernel. Lines starting with 'device' in GENERIC are
built into the kernel. All other drivers are by default available as
modules. (but you can disable them from building, if you want)

> I always
> thought it was some monolithic binary somewhere.=20

That depends on your definition of monolithic. The FreeBSD kernel is
modular but not a microkernel.

> If not, is it
> possible to build just usbdevs alone?

Yes, it should be possible. But I've never done it. It is not advised
to build stuff in the source tree. The 'make kernel' process builds a
shadow tree for the object files under /usr/obj, but I don't know how to
do that for a single module.

> I'm a little skittish about fubaring the kernel on my family's main
> server.=20

Well, if you're using the GENERIC kernel now, and you build a new
GENERIC kernel, it should Just Work. Life can get interesting when you
start building your own kernel config. :-)

But when I switched from 6-STABLE to 7-BETA, I got decent warnings to
adapt my kernel config instead of a broken kernel, so that's ok.

And FYI, the previous kernel is saved in /boot/kernel.old/kernel. So you can
always boot that.

> My name will be mud if I bring it down for a significant
> period, and it's my only BSD box at the moment - our data is backed
> up, but I don't have a tape drive I can just pull / and /usr off in 5
> minutes if I kill it.=20

First and foremost: get level 0 dumps of all important partitions before
you start your adventure! I cannot stress this enough! USB external
harddisks are great for that purpose.=20

> I know this is not relavant to the discussion,
> but my point is, I don't know enough to know what's relatively safe
> and what isn't.

Read the Handbook and /usr/src/UPDATING. Ask around here if there's
something you don't get.

> > > 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.
> >
> > If it works, submit a PR.
>=20
> A url/handbook page for that, perhaps?  I understand the concept of a
> PR, but not fbsd's specific system (or where to find it).

man send-pr
=20
Roland
--=20
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

--J/dobhs11T7y2rNN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD4DBQFHTK0JEnfvsMMhpyURAiGaAJ94AzglE5STOkNTmP7Di6gp2IhjGgCXWiKp
B2nXQYzmN8jKVY4WzNPNfA==
=CmvA
-----END PGP SIGNATURE-----

--J/dobhs11T7y2rNN--



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