Harry Putnam schreef:
> Peter <[EMAIL PROTECTED]> writes:
> 
>> That is correct. Unless you alter bzImage, modprobe newmodule 
>> should work just fine. If your new module is built in, you will 
>> need to reload the kernel (reboot).
> 
> Ok, this is confusing to me... What do you mean by `built in'.  I'm 
> thinking the very nature of a module is that it isn't built in.
> 
> Or do you just mean I'd chose `*' instead of `m' and move bzImage 
> into place in /boot?
> 
(Most) kernel modules can be either built into the kernel, or separately
from the kernel. Only a very few can only be builtin or only loadable. But
whichever they are, they're really all modules-- the kernel is a modular
framework, after all, which is why you have to configure it-- to say
which kernel modules you want to build, and how you want them built (as
builtin to the kernel, or as separate loadable modules).

If they're built into the kernel "body" ("*"), they're called
"built-in", in which case they are an integral part of the bzImage, and
increase the size of the kernel. Builtins will also always be loaded by
the kernel just because they're part of the kernel; this is why you must
build certain modules (like for filesystems) as builtins and not as
modules, so the kernel has them loaded before it needs them to read the
relevant filesystem.

If the modules built as dynamically loadable modules ("M". which
produces little chunks of code-- *.ko files, I think-- in
/usr/lib/modules/<kernel_version> when you run make modules_install),
they are called "modules" (or loadable modules, or dynamic modules). In
this case, they 1) do not increase the size of the kernel (because
they're not in the bzImage that is the kernel), 2) they are dynamically
loadable (modprobe) and removeable (modprobe -r), and may or may not
exist at all (because you have the ability to pick and choose which
loadable modules you actually want to build in your kernel config).

So what Peter meant was that if you add the modules as loadable modules
(by choosing "M"), you wouldn't have to do anything other than make and
make modules_install to install the new module (you need to do a make so
that the kernel config knows that there's a new module *to* make), but
because the body of the kernel has not actually changed (since loadable
modules are not compiled into the bzImage like the builtin * modules
are), you don't actually have to install the new bzImage, because it's
exactly the same as the one you had previously installed. You should be
able to modprobe the new module and go right on without rebooting.

However, if you compiled the new modules directly into the kernel (by
choosing "*", or compiling a module that has a sub-function that
requires a *), then you would have to install the new bzImage and
reboot, because the bzImage (the kernel) has actually changed.

Hope this helps explain things,
Holly
-- 
gentoo-user@gentoo.org mailing list

Reply via email to