LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 10-31-2011, 08:30 PM   #1
JohnV2
Member
 
Registered: Oct 2011
Distribution: Slackware
Posts: 66

Rep: Reputation: Disabled
Question 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

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
 
Old 10-31-2011, 11:51 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,580
Blog Entries: 2

Rep: Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037
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).
 
1 members found this post helpful.
Old 11-01-2011, 12:40 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,229

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

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.
 
Old 11-01-2011, 06:23 PM   #4
JohnV2
Member
 
Registered: Oct 2011
Distribution: Slackware
Posts: 66

Original Poster
Rep: Reputation: Disabled
Red face

Quote:
Originally Posted by TobiSGD View Post
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 View Post
Actually you have plenty of options - those happen to be two of the better ones ....

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 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
 
Old 11-01-2011, 07:53 PM   #5
JohnV2
Member
 
Registered: Oct 2011
Distribution: Slackware
Posts: 66

Original Poster
Rep: Reputation: Disabled
[edited] I had not realized haha oops

regards,
John

Last edited by JohnV2; 11-02-2011 at 04:45 PM. Reason: silly question xD
 
  


Reply

Tags
kernel, module, recompile, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Security Modules Sans Modules LXer Syndicated Linux News 0 10-20-2007 11:01 PM
Inserting driver modules into usermod linux vmniza Linux - General 0 01-03-2006 05:06 AM
driver or modules sir_undertow Linux - Newbie 2 12-27-2003 06:39 AM
writing driver modules unicorn21 Programming 1 12-15-2003 01:01 PM
Driver Modules StudioDog Debian 1 10-09-2003 04:43 AM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration