]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: config option to disable info from decompression of the kernel
authorBen Collins <ben.collins@canonical.com>
Wed, 18 Jun 2008 18:04:35 +0000 (14:04 -0400)
committerIngo Molnar <mingo@elte.hu>
Thu, 3 Jul 2008 12:34:02 +0000 (14:34 +0200)
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>
arch/x86/Kconfig.debug
arch/x86/boot/compressed/misc.c

index ac1e31ba4795cb0f067a280826da257432f93f33..14abaa51922157b6c2ec0a932e9d7edd6184d85c 100644 (file)
@@ -16,6 +16,14 @@ config NONPROMISC_DEVMEM
          obviously disasterous, but specific access can be used by people
          debugging the kernel.
 
+config X86_VERBOSE_BOOTUP
+       bool "Enable verbose x86 bootup info messages"
+       default y
+       help
+         Enables the informational output from the decompression stage
+         (e.g. bzImage) of the boot. If you disable this you will still
+         see errors. Disable this if you want silent bootup.
+
 config EARLY_PRINTK
        bool "Early printk" if EMBEDDED
        default y
index d10e7274e1fc22facf9fcc044532c5c29b92efd1..11629e903aa5cb715b65382a68e7df4a19d5b5ce 100644 (file)
@@ -202,7 +202,8 @@ static void free(void *where);
 static void *memset(void *s, int c, unsigned n);
 static void *memcpy(void *dest, const void *src, unsigned n);
 
-static void putstr(const char *);
+static void __putstr(int, const char *);
+#define putstr(__x)  __putstr(0, __x)
 
 #ifdef CONFIG_X86_64
 #define memptr long
@@ -266,11 +267,16 @@ static void scroll(void)
                vidmem[i] = ' ';
 }
 
-static void putstr(const char *s)
+static void __putstr(int error, const char *s)
 {
        int x, y, pos;
        char c;
 
+#ifndef CONFIG_X86_VERBOSE_BOOTUP
+       if (!error)
+               return;
+#endif
+
 #ifdef CONFIG_X86_32
        if (real_mode->screen_info.orig_video_mode == 0 &&
            lines == 0 && cols == 0)
@@ -363,9 +369,9 @@ static void flush_window(void)
 
 static void error(char *x)
 {
-       putstr("\n\n");
-       putstr(x);
-       putstr("\n\n -- System halted");
+       __putstr(1, "\n\n");
+       __putstr(1, x);
+       __putstr(1, "\n\n -- System halted");
 
        while (1)
                asm("hlt");