Arrange for all kernel printks to be no-ops. Only available if CONFIG_EMBEDDED. This patch saves about 375k on my laptop config and nearly 100k on minimal configs.
Showing the changes to init (1 of 4 files). Show all
Unified · Split
| @@ -275,6 +275,17 @@ config KALLSYMS_EXTRA_PASS · 274 unmodified lines | |||
| 275 | reported. KALLSYMS_EXTRA_PASS is only a temporary workaround while | 275 | reported. KALLSYMS_EXTRA_PASS is only a temporary workaround while |
| 276 | you wait for kallsyms to be fixed. | 276 | you wait for kallsyms to be fixed. |
| 277 | 277 | ||
| 278 | |||
| 279 | config PRINTK | ||
| 280 | default y | ||
| 281 | bool "Enable support for printk" if EMBEDDED | ||
| 282 | help | ||
| 283 | This option enables normal printk support. Removing it | ||
| 284 | eliminates most of the message strings from the kernel image | ||
| 285 | and makes the kernel more or less silent. As this makes it | ||
| 286 | very difficult to diagnose system problems, saying N here is | ||
| 287 | strongly discouraged. | ||
| 288 | |||
| 278 | config BUG | 289 | config BUG |
| 279 | bool "BUG() support" if EMBEDDED | 290 | bool "BUG() support" if EMBEDDED |
| 280 | default y | 291 | default y |