You are not logged in.

#1 2007-09-01 21:39:27

dante
Member
Registered: 2007-06-08
Posts: 38

Removing all unused modules from the kernel config file

Hi,

I'm building my own kernel including some patches with abs. But I do not want to compile every module at every time. Is there an easy way to remove all modules from the config file, which I don't need? Probably I could use the lsmod output in a bash script, but I'm not used to it sad

It would be a very nice way to save time and slim down the kernel.

dante


"Lasciate ogni speranza, voi ch' entrate"
- Laßt jede Hoffnung hinter euch, ihr, die ihr eintretet -

Dante Alighieri

Offline

#2 2007-09-02 11:10:40

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Removing all unused modules from the kernel config file

hi,

you said it! boot the arch-kernel, watch which modules are needed (through lsmod) and then compile them into your new kernel. because arch uses
an initrd-kernel you should rather build a modular than a monolithic kernel (build almost everything needed as modules).
and i guess no, there is no easy way to get rid of the unused modules. you have to run

make menuconfig

and walk through each subtree. you can use the default arch .config file (run "make oldconfig", then all modules are enabled) or delete the .config file in the /usr/src/linux directory  and than you have an "empty" .config file (no modules enabled at all).

vlad

Last edited by DonVla (2007-09-02 11:12:21)

Offline

#3 2007-09-02 21:51:58

dante
Member
Registered: 2007-06-08
Posts: 38

Re: Removing all unused modules from the kernel config file

OK, but I think that the advantage isn't that high compared to the huge working input in doing it manually hmm It was only a idea to tweak the compiling process.

dante


"Lasciate ogni speranza, voi ch' entrate"
- Laßt jede Hoffnung hinter euch, ihr, die ihr eintretet -

Dante Alighieri

Offline

#4 2007-09-02 22:19:32

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Removing all unused modules from the kernel config file

I'm wondering if there aren't tools for doing that. Maybe in Gentoo ?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2007-09-03 08:12:25

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Removing all unused modules from the kernel config file

hi,

ok it's a huge working input, but you do this only once.
"I'm wondering if there aren't tools for doing that. Maybe in Gentoo ?"
hey it's a computer not a fortune telling machine...

vlad

Offline

Board footer

Powered by FluxBB