All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: add CONFIG_ARM_VERBOSE_BOOTUP
@ 2015-05-18 15:50 ` Olaf Mandel
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Mandel @ 2015-05-18 15:50 UTC (permalink / raw)
  To: linux; +Cc: linux-arm-kernel, linux-kernel, Olaf Mandel, Marek Vasut

The new option copies the behaviour of CONFIG_X86_VERBOSE_BOOTUP
to the arm architecture, allowing to completely silence the
serial port. The default value is y, which is the original
behaviour.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
CC: Marek Vasut <marex@denx.de>
---
 arch/arm/Kconfig.debug          |  9 +++++++++
 arch/arm/boot/compressed/misc.c | 16 +++++++++++-----
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0c12ffb..644f585 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1565,6 +1565,15 @@ config UNCOMPRESS_INCLUDE
 					ARCH_SHMOBILE_LEGACY
 	default "mach/uncompress.h"
 
+config ARM_VERBOSE_BOOTUP
+        bool "Enable verbose arm bootup info messages"
+        default y
+        ---help---
+          Enables the informational output from the decompression stage
+          (e.g. bzImage) of the boot. Disable this if you want silent
+          bootup. Error messages from the compression stage are shown
+          even if this option is disabled.
+
 config EARLY_PRINTK
 	bool "Early printk"
 	depends on DEBUG_LL
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index d4f891f..4873708 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -22,7 +22,13 @@ unsigned int __machine_arch_type;
 #include <linux/types.h>
 #include <linux/linkage.h>
 
-static void putstr(const char *ptr);
+static void __putstr(const char *ptr);
+#ifdef CONFIG_ARM_VERBOSE_BOOTUP
+#define putstr(__x)	__putstr(__x)
+#else
+static inline void putstr(const char *ptr)
+{ }
+#endif
 extern void error(char *x);
 
 #include CONFIG_UNCOMPRESS_INCLUDE
@@ -83,7 +89,7 @@ static void icedcc_putc(int ch)
 #define putc(ch)	icedcc_putc(ch)
 #endif
 
-static void putstr(const char *ptr)
+static void __putstr(const char *ptr)
 {
 	char c;
 
@@ -115,9 +121,9 @@ void error(char *x)
 {
 	arch_error(x);
 
-	putstr("\n\n");
-	putstr(x);
-	putstr("\n\n -- System halted");
+	__putstr("\n\n");
+	__putstr(x);
+	__putstr("\n\n -- System halted");
 
 	while(1);	/* Halt */
 }
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] arm: add CONFIG_ARM_VERBOSE_BOOTUP
@ 2015-05-18 15:50 ` Olaf Mandel
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Mandel @ 2015-05-18 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

The new option copies the behaviour of CONFIG_X86_VERBOSE_BOOTUP
to the arm architecture, allowing to completely silence the
serial port. The default value is y, which is the original
behaviour.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
CC: Marek Vasut <marex@denx.de>
---
 arch/arm/Kconfig.debug          |  9 +++++++++
 arch/arm/boot/compressed/misc.c | 16 +++++++++++-----
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0c12ffb..644f585 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1565,6 +1565,15 @@ config UNCOMPRESS_INCLUDE
 					ARCH_SHMOBILE_LEGACY
 	default "mach/uncompress.h"
 
+config ARM_VERBOSE_BOOTUP
+        bool "Enable verbose arm bootup info messages"
+        default y
+        ---help---
+          Enables the informational output from the decompression stage
+          (e.g. bzImage) of the boot. Disable this if you want silent
+          bootup. Error messages from the compression stage are shown
+          even if this option is disabled.
+
 config EARLY_PRINTK
 	bool "Early printk"
 	depends on DEBUG_LL
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index d4f891f..4873708 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -22,7 +22,13 @@ unsigned int __machine_arch_type;
 #include <linux/types.h>
 #include <linux/linkage.h>
 
-static void putstr(const char *ptr);
+static void __putstr(const char *ptr);
+#ifdef CONFIG_ARM_VERBOSE_BOOTUP
+#define putstr(__x)	__putstr(__x)
+#else
+static inline void putstr(const char *ptr)
+{ }
+#endif
 extern void error(char *x);
 
 #include CONFIG_UNCOMPRESS_INCLUDE
@@ -83,7 +89,7 @@ static void icedcc_putc(int ch)
 #define putc(ch)	icedcc_putc(ch)
 #endif
 
-static void putstr(const char *ptr)
+static void __putstr(const char *ptr)
 {
 	char c;
 
@@ -115,9 +121,9 @@ void error(char *x)
 {
 	arch_error(x);
 
-	putstr("\n\n");
-	putstr(x);
-	putstr("\n\n -- System halted");
+	__putstr("\n\n");
+	__putstr(x);
+	__putstr("\n\n -- System halted");
 
 	while(1);	/* Halt */
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-18 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 15:50 [PATCH] arm: add CONFIG_ARM_VERBOSE_BOOTUP Olaf Mandel
2015-05-18 15:50 ` Olaf Mandel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.