LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel customization: What should be modules and built-in? (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-customization-what-should-be-modules-and-built-in-922698/)

ukernel 01-08-2012 04:04 AM

Kernel customization: What should be modules and built-in?
 
Hello,

I'm compiling a custom kernel for my laptop but isn't it a bad idea to build in everything I regularly use (gpu, wireless, filesystems etc.)?

What would you advise?

druuna 01-08-2012 04:23 AM

Hi,

It is up to you to decide what to use (there might be one or 2 exceptions).

I like my kernels as lean and static as possible. The only thing that is not static in my setup (one of the exceptions): Alsa This is due to the fact that software that uses alsa looks specifically for a module. This might change in the future and if it does I'll switch to a static entry.

Using modules might also mean that you need to add to/edit your initrd file to make sure the module is available during boot.

My advise would be: Build as static as possible (but that is a personal opinion).

Hope this helps.

ukernel 01-08-2012 06:03 AM

Thanks for your answer. I have already disabled unnecessary gpu and wlan drivers and will disable ethernet too (no ethernet on laptop). What would make the biggest difference (performance-wise and kernel size-wise) to disable? Suggestions are welcome.

druuna 01-08-2012 06:36 AM

Hi,

A kernel that is configured to only use what you need/want is the best. Telling you which options to enable/disable is hardly doable without knowing the hardware details of your setup, I can however give you some general information on how to make you kernel mean and lean:

- Check your hardware and only enable that what you have. Use tools like lspci, lshal, dmesg and manuals (etc) to determine your hardware. Example: If you have an intel based machine disable the amd specific stuff (or vice versa).

- Only enable laptop specific entries that are relevant for your specific laptop.

- Ask yourself which filesystem(s) you want to use (on your laptop and which you might need to mount from an external source): Disable all others (do you actually need ntfs, reiserfs, xfs, btrfs, etc).

- Initially disable deprecated options.

In general I would advise you to check all the options. Sometimes the help tab will help you in deciding.

BTW: Do make sure you have a fall-back option, disabling an option that you do need might make your system unresponsive!

Hope this helps.

ukernel 01-08-2012 08:52 AM

It was very helpful, thanks. My MacBook Air loads the joydev module in the stock kernel, but it seems to be for joysticks and I don't have any.

druuna 01-08-2012 09:13 AM

Hi,

If you have an apple, do have a look at the apple specific entries that are present. These I know of:

- Device Drivers -> Graphics support -> Backlight & LCD device support -> Apple Backlight Driver
- Device Drivers -> Input device support -> Mice -> Apple USB xyz
- Device Drivers -> Macintosh device drivers

There might be more.

Do check first if you actually need them!

BTW: You're welcome :)


All times are GMT -5. The time now is 01:59 AM.