Date: Wed, 28 Jul 2004 19:00:41 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Cleyton Agapito <cra@kftec.com.br> Cc: FreeBSD <freebsd-questions@freebsd.org> Subject: Re: modules load Message-ID: <20040728180041.GB77702@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <4107BBEA.30456FF7@kftec.com.br> References: <4107BBEA.30456FF7@kftec.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
--hYooF8G/hrfVAmum Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 28, 2004 at 11:44:58AM -0300, Cleyton Agapito wrote: > Sorry if this sound stupid, but i can?t understand yet how FBSD work > with > modules. The Handbook is not so clear about what you must compile > statically in > kernel (like so difference between make and buildkernel procedures), i > suppose > that if you don?t use a feature every time it will be a module (right?), > but i?m a > little disapointed because i must load in loader.conf and they stay > there all the time > or else i can?t find the device on /dev (like fdc.ko), i thought to > unload all unused with > kldunload but it must be done one by one. > I have many others questions bsd-related like that but maybe this > is not the right place, the > FAQs are not enough to learn system and others hacker-like are so > difficult! Where can I find > a median list to ask commons operational questions? > I wonder with FBSD, it?s not so easy like linux but is very much > better (my opinion) :-) No -- it's not a stupid question at all. Some drivers have to be compiled into the kernel, others may either be compiled in or loaded as modules and there are a few proprietary drivers /only/ available as modules (the nVidia graphics driver is a good example of the latter). Some of those modules must be loaded early in the boot process -- hence you need to make an entry in loader.conf to get them loaded before the kernel really starts to boot. Others the kernel will load as it probes the hardware, and finds devices it needs to drive. Yet others can be loaded later on, even after the system has completely booted up -- in fact where this is the case you'll often find that the module will be loaded automatically for you. And just to be more confusing, the capabilities of the various drivers are being refined and extended over time, so a module in 4.x which has to be compiled in might be dynamically loadable in 5.x. Usually there will be a man page for each driver in section 4 of the manual -- eg. fdc(4) is the driver for the floppy disk controller. That, or one of the pages referenced from it, should explain how devices can be loaded: generally if it doesn't say anything along those lines, the driver may well be compiled-in only, but there's no surefire way of telling. Of course, if you are familiar with the system sources, you can just look at the source code for each driver and tell pretty quickly in what ways it can be used. The usual strategies with FreeBSD are either: 1) create your own custom kernel image, where you include the drivers you have hardware for, and exclude the rest. In this case, you wouldn't generally use loadable modules at all. 2) run using the GENERIC kernel, which has support for most common devices, and can load modules to support anything else you're likely to encounter. I've never heard of anyone trying to make a 'maximally dynamically loaded' kernel. Might be an interesting thing to try at some point. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --hYooF8G/hrfVAmum Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBB+nJiD657aJF7eIRAjnoAKC1VKFaZ8f72UOuFH8Hul1iGRGqOwCghgug OP2FyyqfAHZl7CLdbt2CBvU= =+bK0 -----END PGP SIGNATURE----- --hYooF8G/hrfVAmum--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040728180041.GB77702>