You are not logged in.

#1 2011-08-16 17:51:17

pkmatth
Member
Registered: 2011-08-16
Posts: 2

Modifying kernel to include specific modules

Hello, I hope I am posting this in the right place.
I am looking for some instructions/manual to build my kernel while including only necessary modules specific to my computer. I have tried searching many places but could find no detailed instructions. People say you can speed up your boot time by doing this, and some say you wont notice a difference on newer hardware. Either way, I would like to do it as a learning experience and understand exactly what modules I need. I would first like to try it on my macbook but do not know where to start so that I don't leave important things out or don't include anything extra. For instance, can I figure out what I need from lsmod? That seems like too many to add to the modules array though.

Excerpts from rc.conf and mkinitcpio.conf:
rc.conf:
MODULES=(coretemp uvcvideo)
DAEMONS=(syslog-ng dbus alsa pommed cupsd networkmanager slim)

mkinitcpio.conf
Modules is empty as of now.
HOOKS="base udev autodetect pata scsi sata filesystems usbinput"

I do not really know if I need pata or not. I would like to get rid of filesystems hook and put the correct ones in modules. Right now I dual boot snow leopard and arch 3.0 kernel.

Could I also go through my hwinfo output to see which modules are used by my hardware (e.g. my wlan used module ath9k)? Any help is appreciated or if anyone knows of a manual that goes through this in some detail. I have heard of the script 'localmodconfig' but really want to do this all manually so that I can learn from it. I have read a lot on the arch wiki for kernel compilation, but still do not know how to choose what I can include in the modules array in mkinitcpio.conf and take out of the hooks array.

Thanks

Offline

#2 2011-08-16 18:24:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Modifying kernel to include specific modules

Offline

#3 2011-08-16 18:49:11

pkmatth
Member
Registered: 2011-08-16
Posts: 2

Re: Modifying kernel to include specific modules

Thanks karol,
I installed that script from AUR and just ran it. Already I have 68 modules in the .db file. If I eventually run 'make localmodconfig' and compile a kernel in this way will that remove the need for hooks in mkinitcpio.conf? I also heard of 'make localyesconfig' which builds all the drivers into the kernel so that there are no modules and no initrd, therefore, if you need to add drivers later you would have to recompile them into the kernel. For me, that is too much, but I think I want to get to the point where I could remove udev, autodetect, pata, sata, scsi, and filesystems from the hooks array. I still don't really know what is possible and what really does what.
I have already read https://wiki.archlinux.org/index.php/Ke … _New_Users
and https://wiki.archlinux.org/index.php/Mkinitcpio

Offline

Board footer

Powered by FluxBB