public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Collins <ben.collins@canonical.com>
To: kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Config option to disable info from decompression of the kernel
Date: Wed, 18 Jun 2008 14:04:35 -0400	[thread overview]
Message-ID: <1213812275.6575.25.camel@cunning> (raw)

I submitted a similar patch some time ago, but rightfully it didn't get
accepted, as it just disabled all output from the decompress stage
(without a boot time option to enable it).

This patch just disables the information output from this stage, but not
the error output.

Signed-off-by: Ben Collins <ben.collins@canonical.com>

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 1836337..94c818f 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -20,6 +20,14 @@ config NONPROMISC_DEVMEM
 
 	  If in doubt, say Y.
 
+config NO_BZ_CHATTER
+	bool "Disable decompress info messages"
+	default n
+	help
+	  Disables just the informational output from the decompression stage
+	  (e.g. bzImage) of the boot. You will still see errors. Do this if you
+	  want to cleanup the bootup process.
+
 config EARLY_PRINTK
 	bool "Early printk" if EMBEDDED
 	default y
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 90456ce..67cf205 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -206,7 +206,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
@@ -270,11 +271,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;
 
+#ifdef CONFIG_NO_BZ_CHATTER
+	if (!error)
+		return;
+#endif
+
 #ifdef CONFIG_X86_32
 	if (RM_SCREEN_INFO.orig_video_mode == 0 && lines == 0 && cols == 0)
 		return;
@@ -366,9 +372,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");



             reply	other threads:[~2008-06-18 18:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 18:04 Ben Collins [this message]
2008-07-03 12:36 ` [PATCH] Config option to disable info from decompression of the kernel Ingo Molnar
2008-07-03 14:46   ` Ben Collins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1213812275.6575.25.camel@cunning \
    --to=ben.collins@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox