Hi all,
Iam trying to debug kernel .So I want to know how kernel get the information about the kernel loadable modules information while booting..
If kernel uses any data structure to store this information ,tell me how can i acess thta data structure.
Thanks in advance
files
information about modules is stored in /etc/modules, /etc/modprobe.conf, /etc/modprobe.d/, /lib/modules/‘uname -r‘, but none of them but the modules itself are read by the kernel, they are config files of modprobe and the modules-init-tools init script. you need a file system (disk or initramfs) to load modules.
the kernel doesn't know
the kernel doesn't know about any loadable module before letting the init finish the init in the user space. Unless the module is compiled inside the kernel, the kernel itself doesn't need to know anything about the future module loaded by user/application or init.
The module that you see in the kernel at boot up are the module compiled in. The kernel look at the init section that has all the driver module init function (those are the one declared with the __init directive in your driver module code).