Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2014 14:31:40 -0700
From:      Devin Teske <devin.teske@fisglobal.com>
To:        "'Polytropon'" <freebsd@edvax.de>, "'R. Clayton'" <rclayton@monmouth.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   RE: Listing kernel models.
Message-ID:  <025701cf43ba$9f4c0090$dde401b0$@fisglobal.com>
In-Reply-To: <20140319205303.5ecbb030.freebsd@edvax.de>
References:  <878us839kt.fsf@UlanBator.myhome.westell.com> <20140319205303.5ecbb030.freebsd@edvax.de>

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


> -----Original Message-----
> From: Polytropon [mailto:freebsd@edvax.de]
> Sent: Wednesday, March 19, 2014 12:53 PM
> To: R. Clayton
> Cc: freebsd-questions@freebsd.org
> Subject: Re: Listing kernel models.
> 
> On Mon, 17 Mar 2014 15:32:18 -0400, R. Clayton wrote:
> > How do I list the modules available in the (10.0 release generic, in
> > my case) kernel?  In linux I'd use the lsmod command.
> 
> On FreeBSD you can use the "kldstat" command.
> 
> Use "kldstat -v" for more verbosity. In the section "kernel... Contains
> modules:" you can see which are already included in the kernel.
Additionally
> loaded modules will be listed afterwards.
> 
> You can find the documentation in "man kldstat".
> 
> 
> 
> > In freebsd does "ls /boot/kernel"
> > do the trick?
> 
> This command will list the modules that have been built (usually along
with
> the kernel) and can be loaded.
> 
> 
> 
> > Is it the case that /boot/kernel/*ko are included as modules?
> 
> If you want to find out which components are included in the kernel
itself,
> see /usr/src/sys/i386/conf/GENERIC resp.
> /usr/src/sys/amd64/conf/GENERIC, which is the configuration file from
which
> the kernel has been built.
> Examining "kldstat -v" will reflect this.
> 
> 
> 
> > In particular, I'm trying figure out if the instructions given in
> >
> >
> > www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-
> wireless.ht
> > ml
> >
> > to put
> >
> >   if_ath_load="YES"
> >   wlan_wep_load="YES"
> >   wlan_ccmp_load="YES"
> >   wlan_tkip_load="YES"
> >
> > in /boot/loader.conf are redundant.
> 
> If you have a setting in /boot/loader.conf to load a module which is
already
> present in the kernel, the module will not be loaded (for obvious
reasons).
> You only can load modules which are not present in the kernel. Again,
consult
> the GENERIC configuration file to see which of them are already part of
the
> kernel.
> 
> The instructions in the handbook are correct if you're running the GENERIC
> kernel. If you have a custom kernel which already contains those modules,
as
> defined in the appropriate configuration file, those settings are not
needed.
> If you still have them in /boot/loader.conf, they won't cause problems (as
> explained).
> 

"kldstat -v" will show you what's compiled-in.

"config -x `sysctl -n kern.bootfile`" will show you the configuration used
to compile the kernel (and if the kernel was compiled using "config -C -g
config"
then the config will contain comments, but usually the config extracted by
"config -x file" will not contain comments.

And as one might think, attempting to load a module for something that is
compiled-in will generate an error that it already exists.	
-- 
Devin



_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?025701cf43ba$9f4c0090$dde401b0$>