LinuxQuestions.org
Review your favorite Linux distribution.
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 01-28-2008, 11:14 PM   #1
sauce
Member
 
Registered: Oct 2005
Distribution: Slackware, Ubuntu
Posts: 52

Rep: Reputation: 15
Compiling a custom kernel, automatically remove unused modules ?


Is there any way to automatically remove all the kernels that you don't need from .config? For example, a script that does "lsmod" and anything that is set to [M] that is not listed can be set to [N]. That would be great when compiling your own kernel

This is assuming you are running a distro that runs a bloated kernel in the first place that sets [M] to everything
 
Old 01-29-2008, 12:20 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,118

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
You *really* don't want to be dicking with the config file with an editor. Too many options have dependencies - that's why the Kconfig is so convoluted.

Better to go the other way - do a lsmod to find out what's needed, then add them selectively to a "make defconfig" generated config.
 
  


Reply


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
custom compiled kernel 2.6.21.1 and rc.modules matters Slackware 14 05-18-2007 08:56 AM
Remove custom kernel Aerolinux Linux - Hardware 4 02-21-2007 04:13 PM
trouble compiling modules against custom fedora core 4 kernel blahJake Linux - Software 6 12-16-2006 06:54 AM
Unused kernel modules : How to NOT load? _UnPrEdictAbLe_ Linux - Software 0 08-19-2004 01:19 AM
Removing unused kernel modules / autoclean MadCactus Linux - General 4 12-23-2003 09:05 AM


All times are GMT -5. The time now is 10:28 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