LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   how can I know whether a module is a loadable module or compiled-in module? (https://www.linuxquestions.org/questions/linux-kernel-70/how-can-i-know-whether-a-module-is-a-loadable-module-or-compiled-in-module-4175526046/)

hahacc 11-20-2014 09:14 PM

how can I know whether a module is a loadable module or compiled-in module?
 
Hi Gurus,
Could anyone tell how can I know whether a module is a loadable module or compiled-in module? As seems lsmod will list all modules of both loadable & compiled-in.

Thanks.

syg00 11-20-2014 09:46 PM

Where did you get that idea ?. lsmod lists the currently loaded modules. Potentially loadable modules are in /lib/modules/$(uname -r)

The definitive list is the kernel config used to create the kernel.

hahacc 11-21-2014 12:59 AM

Quote:

Originally Posted by syg00 (Post 5272712)
Where did you get that idea ?. lsmod lists the currently loaded modules. Potentially loadable modules are in /lib/modules/$(uname -r)

The definitive list is the kernel config used to create the kernel.

Thanks! Then could you suggest the way to get modules compiled into kernel? Maybe only check the configuration files when compiling the kernel(make config/make menuconfig etc)?

Teufel 11-21-2014 01:43 AM

Checking .config doesn't give you modules list, you can get "options", not modules names.
For example: "NVidia NForce ethernet controller driver" option gives you "forcedeth" module.

You can get built-in modules list by running
Code:

cat /lib/modules/$(uname -r)/modules.builtin


All times are GMT -5. The time now is 04:54 PM.