This is an old revision of the document!
Over time, the Linux kernel has grown far more featureful, but it has also grown much larger, even with all the optional features turned off. The Linux Kernel Tinification project aims to reverse that trend, making the kernel much smaller, to enable ridiculously small embedded applications and other fun uses.
See projects for a list of kernel tinification projects; please add new projects to that page.
With Linux 3.15-rc1 and newer, make allnoconfig
will produce an almost minimal kernel; however, you'll need to take a few additional steps to make it as small as possible:
CONFIG_OPTIMIZE_INLINING=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
You'll want to target the most code-size-efficient architecture supported by your target machine; for instance, on x86 systems, build a 32-bit kernel rather than a 64-bit kernel. On current kernels, make allnoconfig
should do this automatically.
When submitting a change to make the kernel smaller, use 'scripts/bloat-o-meter'' to compare the size of the old and new vmlinux, overall and broken out by symbol. Include the bloat-o-meter output in your commit message.
Most new configuration options added as part of this effort should depend on CONFIG_EMBEDDED.
If your changes affect the size of the decompression stub, you may additionally need to run bloat-o-meter on the stub.