Kernel minification
Perfection is reached not when there’s nothing left to add, but rather when there’s nothing left to take away…
By this point the chances are you’ve already had a look around the config menu and have noticed there’s an awful lot of stuff in there you don’t need. This is probably true, and a lot of people are interested in making the kernel smaller.
People building for embedded systems, where storage space and memory are scarce, naturally will want to pull as much stuff as possible out of the kernel. We’ve mentioned that there isn’t really a performance or memory hit from having so many unused drivers compiled as modules. However, there is a disk space hit, although perhaps not as large as you might think (see box, below).
At first glance, there’s a lot of superfluous drivers in the kernel. But you never know when you’ll need tape access…
Another reason for removing things is demonstrated by the Linux-libre kernel. Here, drivers that require proprietary firmware or microcode have all been removed. As has firmware and microcode itself, which if you take a look at your /lib/firmware directory (ours was over 700MB) adds up to a substantial saving. Of course, removing firmware files should be done carefully, since any device depending on them will cease to function. There’s also the annoyance of carefully removing unneeded files, only for a new linux-firmware package to appear and not only replace them, but add yet more unnecessary cruft.