The kernel for my device includes so many files for other devices and situations that my device cannot use. The kernel carries around the files for everything and is much bigger than just the files for my device.

Whats the reason for this? Why not remove the unnecessary files and have a much smaller kernel?

  • because the complexity in distribution would be atrocious, and everyone would have to compile their own kernel every time they needed an update, causing a serious support problem. for embedded devices which get upgrades rarely, compiling your own with only the components you want becomes worthwhile. Oct 6, 2013 at 7:22
  • Wouldn't this be better for unix.SE?
    – user193478
    Jul 29, 2014 at 14:14

2 Answers 2


You could actually build a kernel to your specific hardware if you wanted to. I think a good distribution to illustrate this is gentoo - you can run kernels tuned to your hardware or run genkernel.

You could use a generic kernel, which is bigger, or build a kernel to your needs. Forget something that can't be loaded as a module, and you rebuild the whole kernel.

There's of course kernel modules (which is how many third party drivers are packaged), but the point of having a default sane set of kernel modules is to be able to know that your system is reasonably likely to work. Imagine needing to spend a few hours compiling your kernel because you forgot to enable X (this happened to me, the last time I tried to install gentoo)!

You do not, however have the drivers for all devices - you often end up installing drivers yourself - for example, nvidia has seperate drivers outside the noveau packages many distros have (and this is outside the kernel) and the same is true of many network cards. There's also mechanisms that just load necessary modules as needed

If you want a minimal set of drivers, on a slim kernel, built to the specifications of your own system, do it. Just remember its a lot of work, and the generic kernel is usually a sane set of tradeoffs the distro developers chose cause its reliable.

  • The android kernels are in the order of 5mb, about how big would a kernel be if it were pared down for a single device, and no extras added? How much memory space would be saved? Would it be worth the effort?
    – codingtent
    Oct 7, 2013 at 9:02
  • ubuntu's kernel package is somewhere between 90-120 mb packages.ubuntu.com/lucid/linux-image-2.6.32-22-generic so, in some cases worth it.
    – Journeyman Geek
    Oct 7, 2013 at 10:12
  • I've been quite lazy when it comes to updating my kernel, but the kernels I have built for my x86_64 are about 3.5MB (vmlinuz) + 1.8MB (System.map) (from kernel versions in the range 2.6.37-3.2.1). Most drivers are built-in. I see that my /lib/modules is 44MB though... (Yes, I use Gentoo :) )
    – thomasa88
    Dec 7, 2013 at 18:27

Because, Developers never know which hardware YOU are going to use it for your linux. And yes you can customize your files according to your Hardware.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .