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 the FAQ.
See projects for a list of kernel tinification projects; please add new projects to that page.
With Linux 3.17-rc1 and newer,
make tinyconfig will produce a minimal kernel. You can then turn on the minimal set of options you need.
On previous kernels, you'll need to take a few additional steps to make the kernel as small as possible:
make allnoconfigdid not turn off options behind CONFIG_EXPERT or CONFIG_EMBEDDED, so you'll have to do so manually.
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 or CONFIG_EXPERT.
If your changes affect the size of the decompression stub, you may additionally need to run bloat-o-meter on the stub.
When adding a new Kconfig symbol, to confirm that you've added any necessary dependencies on that symbol, build an "allyesconfig" kernel with only your new symbol (and anything depending on it) turned off. Build failures related to the bits your new symbol compiles out will identify additional dependencies you need.
You can find the latest tinification changes in Josh Triplett's tree at https://git.kernel.org/cgit/linux/kernel/git/josh/linux.git/ , in the tiny/* branches. Note that tiny/next gets reset for each new merge window, and other tiny/* branches may be recreated or rebased.
See the Use Cases page.