LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Module loading (https://www.linuxquestions.org/questions/linux-general-1/module-loading-4194/)

Cbomb 07-11-2001 09:33 PM

Module loading
 
How does the kernel decide which module is appropriate to load for detected hardware..etc?

Thanks

jharris 07-12-2001 03:52 AM

There are defaults associated with a lot of the devices in /dev but you can make associations yourself by editing /etc/modules.conf. I'm not sure exactly where these are defined but if you look at the man page for modprobe you'll see there's an option to list all the know modules and I think their association. Don't quote me on this one though!

cheers, sorry its more than a bit sketchy...

Jamie...

Cbomb 07-12-2001 01:40 PM

Ok.
 
Thank you, for a while there I though no one had any ideas :)

isajera 07-12-2001 01:54 PM

ok... i think i can give a basic explanation here.

in linux, like unix, all the hardware devices are represented as files, in the /dev directory. the /etc/modules.conf file is mostly for determining aliases for the modules that are used on a system. so, if a program calls for the "sound" module or the "alsa-sound" module to be inserted, the system knows to call the correct driver; on my system, this happens to be "es1371" - and modules.conf sets the aliases so that not each individual program needs to know what hardware you have, just the kernel.

most installations will auto-detect the settings, and write them to the /etc/modules.conf file, but the kernel will use whatever module is indicated in the file, whether it's the right module or not. the kernel itself doesn't really decide which module is appropriate, the setup and installation programs do, and the kernel just follow orders.:)


All times are GMT -5. The time now is 03:42 AM.