LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How I can use only the necessary modules/driver for Linux? (https://www.linuxquestions.org/questions/linux-kernel-70/how-i-can-use-only-the-necessary-modules-driver-for-linux-911172/)

JohnV2 10-31-2011 08:30 PM

How I can use only the necessary modules/driver for Linux?
 
Hi,

Like title say, how I can use only the necessary modules? I mean, I know what modules/drivers is running Linux using lsmod, lspci -k right? but exist a way when I recompile a linux, tell some how to use only the modules I use right now? and cut the process to select manually?

By the way I am new on recompiling kernel, just use the generic kernel in Slackware, and some little tweaks but that's it :D

So this is how I "do", when I do makeconfig, I just select manually the drivers and stuff, then save the .config.

But when I need to do the same thing again and again is frustrating... :(

What is the good way to do this? (maybe a tutorial?) because I have differents hardware (servers) and some of the server never change. I only want recompile only with the modules used right now.

I use Slackware if it makes a difference...

Thanks in advance,

John

TobiSGD 10-31-2011 11:51 PM

You have two options:
1. Use
Code:

make localmodconfig
This will configure the kernel to be compiled with all currently loaded modules.
2. Use
Code:

make localyesconfig
This will configure the kernel to be compiled with all currently loaded modules into the kernel (not as modules).

syg00 11-01-2011 12:40 AM

Actually you have plenty of options - those happen to be two of the better ones .... :p

An implication you may have missed (as a new person compiling kernel(s)), is that you'd probably be better off without modules at all, as per 2. above.

JohnV2 11-01-2011 06:23 PM

Quote:

Originally Posted by TobiSGD (Post 4512971)
You have two options:
1. Use
Code:

make localmodconfig
This will configure the kernel to be compiled with all currently loaded modules.
2. Use
Code:

make localyesconfig
This will configure the kernel to be compiled with all currently loaded modules into the kernel (not as modules).

Quote:

Originally Posted by syg00 (Post 4512978)
Actually you have plenty of options - those happen to be two of the better ones .... :p

An implication you may have missed (as a new person compiling kernel(s)), is that you'd probably be better off without modules at all, as per 2. above.

Thanks both of you :) the compile time was less but no much...

Have a doubt :D I see a lot of modules when compile, it is normal? I mean if I use "make localyesconfig" should not build a few modules?

Because I see for example a lot of unnecessary modules like radeon, nouveau and others :S and when compiled don't load the mouse (I tested in my workstation). Why? if I use "localyesconfig".

John

JohnV2 11-01-2011 07:53 PM

[edited] I had not realized haha oops :D

regards,
John


All times are GMT -5. The time now is 05:37 PM.