diff options
author | Ben Collins <ben.collins@canonical.com> | 2008-06-18 14:04:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-03 08:34:02 -0400 |
commit | 6bcb13b35a2ea39be6c7cc0292b8ad1191b1a748 (patch) | |
tree | 6c8238b6ef74c3606a987b62e9e53466afb67fd4 | |
parent | 2ee2394b682c0ee99b0f083abe6c57727e6edb69 (diff) |
x86: config option to disable info from decompression of the kernel
This patch allows the disabling of decompression messages during
x86 bootup.
Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/Kconfig.debug | 8 | ||||
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 16 |
2 files changed, 19 insertions, 5 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index ac1e31ba4795..14abaa519221 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -16,6 +16,14 @@ config NONPROMISC_DEVMEM | |||
16 | obviously disasterous, but specific access can be used by people | 16 | obviously disasterous, but specific access can be used by people |
17 | debugging the kernel. | 17 | debugging the kernel. |
18 | 18 | ||
19 | config X86_VERBOSE_BOOTUP | ||
20 | bool "Enable verbose x86 bootup info messages" | ||
21 | default y | ||
22 | help | ||
23 | Enables the informational output from the decompression stage | ||
24 | (e.g. bzImage) of the boot. If you disable this you will still | ||
25 | see errors. Disable this if you want silent bootup. | ||
26 | |||
19 | config EARLY_PRINTK | 27 | config EARLY_PRINTK |
20 | bool "Early printk" if EMBEDDED | 28 | bool "Early printk" if EMBEDDED |
21 | default y | 29 | default y |
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index d10e7274e1fc..11629e903aa5 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -202,7 +202,8 @@ static void free(void *where); | |||
202 | static void *memset(void *s, int c, unsigned n); | 202 | static void *memset(void *s, int c, unsigned n); |
203 | static void *memcpy(void *dest, const void *src, unsigned n); | 203 | static void *memcpy(void *dest, const void *src, unsigned n); |
204 | 204 | ||
205 | static void putstr(const char *); | 205 | static void __putstr(int, const char *); |
206 | #define putstr(__x) __putstr(0, __x) | ||
206 | 207 | ||
207 | #ifdef CONFIG_X86_64 | 208 | #ifdef CONFIG_X86_64 |
208 | #define memptr long | 209 | #define memptr long |
@@ -266,11 +267,16 @@ static void scroll(void) | |||
266 | vidmem[i] = ' '; | 267 | vidmem[i] = ' '; |
267 | } | 268 | } |
268 | 269 | ||
269 | static void putstr(const char *s) | 270 | static void __putstr(int error, const char *s) |
270 | { | 271 | { |
271 | int x, y, pos; | 272 | int x, y, pos; |
272 | char c; | 273 | char c; |
273 | 274 | ||
275 | #ifndef CONFIG_X86_VERBOSE_BOOTUP | ||
276 | if (!error) | ||
277 | return; | ||
278 | #endif | ||
279 | |||
274 | #ifdef CONFIG_X86_32 | 280 | #ifdef CONFIG_X86_32 |
275 | if (real_mode->screen_info.orig_video_mode == 0 && | 281 | if (real_mode->screen_info.orig_video_mode == 0 && |
276 | lines == 0 && cols == 0) | 282 | lines == 0 && cols == 0) |
@@ -363,9 +369,9 @@ static void flush_window(void) | |||
363 | 369 | ||
364 | static void error(char *x) | 370 | static void error(char *x) |
365 | { | 371 | { |
366 | putstr("\n\n"); | 372 | __putstr(1, "\n\n"); |
367 | putstr(x); | 373 | __putstr(1, x); |
368 | putstr("\n\n -- System halted"); | 374 | __putstr(1, "\n\n -- System halted"); |
369 | 375 | ||
370 | while (1) | 376 | while (1) |
371 | asm("hlt"); | 377 | asm("hlt"); |