Re: modules load

From: Matthew Seaman (m.seaman_at_infracaninophile.co.uk)
Date: 07/28/04

  • Next message: Vulpes Velox: "Re: Are you truly a M$ desktop alternative?"
    Date: Wed, 28 Jul 2004 19:00:41 +0100
    To: Cleyton Agapito <cra@kftec.com.br>
    
    
    

    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

    -- 
    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
    
    



  • Next message: Vulpes Velox: "Re: Are you truly a M$ desktop alternative?"

    Relevant Pages

    • Compiling the drivers for a ADSL Modem (IceData500)
      ... My modem model is IceData500 and the vendor says it is compatible with RH ... The unicorn driver is a standard Linux ... PPPoE, PPPoA or RFC2684 protocols, the kernel may need to be patched. ... To compile the drivers, ...
      (Fedora)
    • Re: Problems with kernel: no sound, printer, cdwriter
      ... Compile them, install them and then load the module. ... kernel, not as module. ... > Journalled Block Device driver loaded ...
      (Debian-User)
    • Re: Back to ubuntu
      ... but not in regular ubuntu 6.06 or any other version of ubuntu? ... so i attempted to compile the drivers on ubuntu 7.04, ... that under kubuntu 6.06 you were using a compatible kernel, ... unless you figure out how to get the driver to compile. ...
      (Ubuntu)
    • Re: kernel? 2.4.x vs 2.6.x
      ... Sorry about the contractions. ... > compile a new kernel and then compile the driverfrom ... this fails w.o custom kernel and I couldn't get syskonnects ... > driver to compile at all which googling suggested) This was all a good ...
      (Debian-User)
    • Re: 2.6.30-rc4 kernel
      ... I think there may be a problem with the 2.6.30 kernel that is ... # Generic Driver Options ... # PCI IDE chipsets support ... # Other IDE chipsets support ...
      (Linux-Kernel)