You are not logged in.
Recently I had need to compile and install a custom kernel, and I was mightily impressed by the number of files involved, more than 115,000, most of which were drivers. I appreciate that all these drivers must be made available to ensure functionality on any computer one may wish to install it on. But in any single instance, probably not more than a few dozen drivers will actually be required for one specific system.
So, does the kernel compile process automatically include only the modules necessary for the specific system on which the compile takes place, or are all modules included in every such compile, regardless of system architecture?
Offline
There are a couple things to consider. I would certainly build in the things you need to run your computer that are invariant. Wifi, Ethernet, Northbridge, Southbridge, LPC, sata controllers, video drivers, USB hubs, and the like. But, then there are the things you might or might not need. Consider, which file systems are you going to want? Do you want to build them in now, or make them modular?
Then, there is the magic of USB. What type of device are you going to attach? You really don't want to build them in because there is no way more than a couple can be in use at any time. Do you want to compile the modules (maybe) someday in the future when you plug in a device that needs it? Or do you want to compile it now. It is a matter of preference.
To get a baseline for your system, don't plug in any removable devices and reboot. Look at the output of lsmod. You should probably ensure that all those modules are built in. When I run a custom kernel targeted at my hardware, that lsmod output is empty until I plug in something external.
Last edited by ewaller (2014-08-15 15:32:03)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Look in the AUR for modprobed-db and on the wiki as well. Been using it since I built it some 4 years ago with no ill effects... just be sure you have all the needed modules in your db. This only comes with time and use.
https://wiki.archlinux.org/index.php/Modprobed-db
https://aur.archlinux.org/packages/modprobed-db
Last edited by graysky (2014-08-14 18:59:15)
Offline
Many thanks to both 'ewaller' and 'graysky' for your advice.
Offline
Interesting... modprobed-db sounds like a better version of diet-kconfig. Another AUR package that might be worth a look is autokernconf.
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline
Look at the output of lsmod. You should probably ensure that all those modules are built in. When I run a custom kernel targeted at my hardware, that lsmod output is empty until I plug in something external.
I went to edit the 'config.x86-64' file provided by the linux package. But changing 'm' for 'y' manually in this file seems messy and just not the right way to do it. Additionnaly, the names output by 'lsmod' do not always match those in the file. What is your way of doing it cleanly?
Offline
I went to edit the 'config.x86-64' file provided by the linux package. But changing 'm' for 'y' manually in this file seems messy and just not the right way to do it. Additionally, the names output by 'lsmod' do not always match those in the file. What is your way of doing it cleanly?
The kernel make file has a make menuconfig option that provides a curses interactive menu. There is also an X gui version that I dislike. If you are using makepkg, then you need to edit the PKGBUILD file to enable make menuconfig. It will stop at the appropriate point and allow you to configure the kernel.
I am a huge advocate of always using makepkg and pacman -- except in the case of the kernel. I build the kernel using make. Install the modules with make modules_install, and copy the kernel by hand to my boot partition. My peers may disagree with me. If you want a really good reference on how to build a kernel, see The Gentoo Handbook. The section on kernel configuration (except the genkernel part) is directly applicable to Arch.
Last edited by ewaller (2014-08-17 23:51:29)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline