* modules as drivers and the order of loading
@ 2001-02-01 0:28 Alan Chandler
2001-02-01 0:46 ` Mathieu Chouquet-Stringer
2001-02-01 14:05 ` Helge Hafting
0 siblings, 2 replies; 3+ messages in thread
From: Alan Chandler @ 2001-02-01 0:28 UTC (permalink / raw)
To: linux-kernel
As I was building 2.4.1 afresh I took the opportunity to build some of
the device drivers as modules. In particular I have a SCSI cdrom
device (it actually is a cd writer) and I had made that and its
controller (Adaptec AIC-7xxx driver) modules.
However, during boot they fail to load because at the time they are
brought up VFS had not mounted the root filesystem
I am not sure why they can be built as modules if they then can't be
loaded?
OR have I completely misunderstood the approach here.
Alan
alan@chandlerfamily.org.uk
http://www.chandler.u-net.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: modules as drivers and the order of loading
2001-02-01 0:28 modules as drivers and the order of loading Alan Chandler
@ 2001-02-01 0:46 ` Mathieu Chouquet-Stringer
2001-02-01 14:05 ` Helge Hafting
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Chouquet-Stringer @ 2001-02-01 0:46 UTC (permalink / raw)
To: linux-kernel
alan@chandlerfamily.org.uk (Alan Chandler) writes:
> As I was building 2.4.1 afresh I took the opportunity to build some of
> the device drivers as modules. In particular I have a SCSI cdrom
> device (it actually is a cd writer) and I had made that and its
> controller (Adaptec AIC-7xxx driver) modules.
>
> However, during boot they fail to load because at the time they are
> brought up VFS had not mounted the root filesystem
>
> I am not sure why they can be built as modules if they then can't be
> loaded?
>
> OR have I completely misunderstood the approach here.
Well you got it right and wrong at the same time: if you want to use
modules which are used during the boot process, you have to use an initrd
image (which will be loaded before the kernel and stores all your
modules).
--
Mathieu CHOUQUET-STRINGER E-Mail : mchouque@e-steel.com
Learning French is trivial: the word for horse is cheval, and
everything else follows in the same way.
-- Alan J. Perlis
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: modules as drivers and the order of loading
2001-02-01 0:28 modules as drivers and the order of loading Alan Chandler
2001-02-01 0:46 ` Mathieu Chouquet-Stringer
@ 2001-02-01 14:05 ` Helge Hafting
1 sibling, 0 replies; 3+ messages in thread
From: Helge Hafting @ 2001-02-01 14:05 UTC (permalink / raw)
To: Alan Chandler, linux-kernel
Alan Chandler wrote:
>
> As I was building 2.4.1 afresh I took the opportunity to build some of
> the device drivers as modules. In particular I have a SCSI cdrom
> device (it actually is a cd writer) and I had made that and its
> controller (Adaptec AIC-7xxx driver) modules.
>
> However, during boot they fail to load because at the time they are
> brought up VFS had not mounted the root filesystem
>
Is your root disk also connected to that adaptec controller?
If so, compile the adapter into the kernel and let the scsi-CD support
be a module.
> I am not sure why they can be built as modules if they then can't be
> loaded?
It is usually not worth the trouble making modules of something
you need before the root fs is mounted. (There are special cases,
but generally - don't do it!)
About the only thing you need to mount root is harddisk support
and a driver for whatever kind of adapter (scsi, ide,...) that the
root fs disk is connected to.
If it isn't connected to the adaptec (perhaps you have an IDE disk?)
then something else is wrong. Maybe the root device isn't set
right in the kernel image you are booting. Check your lilo.conf
(or whatever kernel loader you use)
The general rules for modules:
Stuff you need almost all the time is compiled in. Stuff you use
only occationally makes sense as modules. Developers often
use modules for drivers they work on - so they can recompile
and reload without a reboot. Modules also makes sense for
buggy drivers - you can force re-initialization by
unloading and reloading the module.
There are a couple of reasons for not modularizing everything. First,
you get a complicated setup for loading the right modules.
Second, there is a memory overhead of half a page per module. (But of
course you save memory for modules when they aren't loaded.)
Third, compiled-in stuff goes in the single big "kernel page" for
those systems that support big pages. Pentiums do. This
gives a performance enhancement as the cpu looks up less
page table entries. That could be important if the driver is
a high-performance thing like a network or disk controller.
Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-02-01 14:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-01 0:28 modules as drivers and the order of loading Alan Chandler
2001-02-01 0:46 ` Mathieu Chouquet-Stringer
2001-02-01 14:05 ` Helge Hafting
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®