old-www/HOWTO/Kerneld/introduction.html

329 lines
6.1 KiB
HTML

<HTML
><HEAD
><TITLE
>What is kerneld?</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Linux kerneld mini-HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Linux kerneld mini-HOWTO"
HREF="index.html"><LINK
REL="NEXT"
TITLE="How do I set it up?"
HREF="setup.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux kerneld mini-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="index.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="setup.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="INTRODUCTION"
>What is kerneld?</A
></H1
><P
>The kerneld feature was introduced during the 1.3
development kernels by Bjorn Ekwall. It allows kernel modules
such as device drivers, network drivers and filesystems to be
loaded automatically when they are needed, rather than having to
do it manually with <B
CLASS="COMMAND"
>modprobe</B
> or
<B
CLASS="COMMAND"
>insmod</B
>. </P
><P
>And for the more amusing aspects, although these are not
(yet ?) integrated with the standard kernel: </P
><P
></P
><UL
><LI
><P
>It can be setup to run a user-program instead
of the default screen blanker, thus letting you use any
program as a screen-saver. </P
></LI
><LI
><P
>Similar to the screen-blanker support, you can
also change the standard console beep into something
completely different. </P
></LI
></UL
><P
>kerneld consists of two components: </P
><P
></P
><UL
><LI
><P
>Support in the Linux kernel for sending
requests to a daemon requesting a module for a certain
task. </P
></LI
><LI
><P
>A user-space daemon that can figure out what
modules must be loaded to fulfill the request from the
kernel. </P
></LI
></UL
><P
>Both components must be working for the kerneld support to
function; it is not enough that only one or the other has been
setup. </P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="WHY"
>Why do I want to use it ?</A
></H2
><P
>There are some good reasons for using kerneld. The ones I
will mention are mine, others have other reasons. </P
><P
></P
><UL
><LI
><P
>If you have to build kernels for several
systems that only differ slightly - different kind of network
card, for instance - then you can build a single kernel and
some modules, instead of having to build individual kernels
for each system. </P
></LI
><LI
><P
>Modules are easier for developers to test.
You don't need to reboot the system to load and unload the
driver; this applies to all modules, not just kerneld-loaded
ones. </P
></LI
><LI
><P
>It cuts down on the kernel memory usage
leaving more memory available for applications. Memory used by
the kernel is <I
CLASS="EMPHASIS"
>never</I
> swapped out, so if
you have 100Kb worth of unused drivers compiled into your
kernel, they are simply wasting RAM. </P
></LI
><LI
><P
>Some of the things I use, the ftape
floppy-tape driver, for instance, or iBCS, are only available
as modules, but I don't want to bother with loading and
unloading them whenever I need them. </P
></LI
><LI
><P
>People making Linux distributions don't have
to build 284 different boot images: Each user loads the
drivers he needs for just his hardware. Most modern Linux
distributions will detect your hardware and will only load
those modules actually required.</P
></LI
></UL
><P
>Of course, there are also reasons why you may not want to
use it. If you prefer to have just one kernel image file with
all of your drivers built in, you are reading the wrong
document.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="WHERE"
>Where can I pick up the necessary pieces
?</A
></H2
><P
>The support in the Linux kernel was introduced with Linux
1.3.57. If you have an earlier kernel version, you will need to
upgrade if you want the kerneld support. The current Linux
kernel sources can be found at most Linux FTP archive sites
including:</P
><P
></P
><UL
><LI
><P
><A
HREF="ftp://ftp.kernel.org/pub/linux/kernel/"
TARGET="_top"
>Kernel.Org
Archive</A
></P
></LI
><LI
><P
><A
HREF="ftp://metalab.unc.edu/pub/Linux/kernel/"
TARGET="_top"
>Metalab Linux
Archive</A
></P
></LI
><LI
><P
><A
HREF="ftp://tsx-11.mit.edu/pub/linux/sources/system/"
TARGET="_top"
>TSX-11
at MIT</A
></P
></LI
></UL
><P
>The user-space daemon is included with the
<SPAN
CLASS="PRODUCTNAME"
>modules</SPAN
> package. These are normally
available from the same place as the kernel sources
</P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>If you want to try module-loading with the latest
<I
CLASS="EMPHASIS"
>development</I
> kernels, you should use the
newer <SPAN
CLASS="PRODUCTNAME"
>modutils</SPAN
> package and not the
<SPAN
CLASS="PRODUCTNAME"
>modules</SPAN
>. Always check the
<TT
CLASS="FILENAME"
>Documentation/Changes</TT
> file in the kernel
sources for the minimum required version number for your kernel
image. Also see about the problems with modules
and 2.1 kernels.</P
></BLOCKQUOTE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="index.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="setup.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Linux kerneld mini-HOWTO</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>How do I set it up?</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>