You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/18 18:36:52 UTC
[incubator-nuttx] 03/05: ramlog: Remove all ramlog_consoleinit
related code
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch pr297
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ee7cf3a1c8775c391ec32b766758b598287a35f4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Feb 18 02:10:15 2020 +0800
ramlog: Remove all ramlog_consoleinit related code
because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
Change-Id: If1e4a8c3d8342a58015b9c7fc5422e44d5c77f9b
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
Documentation/NuttxPortingGuide.html | 7 ----
TODO | 7 ----
arch/arm/src/common/up_initialize.c | 3 --
arch/arm/src/common/up_internal.h | 6 +---
arch/avr/src/at32uc3/at32uc3_config.h | 6 +---
arch/avr/src/at90usb/at90usb_config.h | 6 +---
arch/avr/src/atmega/atmega_config.h | 6 +---
arch/avr/src/common/up_initialize.c | 12 ++-----
arch/hc/src/common/up_initialize.c | 2 --
arch/hc/src/common/up_internal.h | 14 +++-----
arch/mips/src/common/up_initialize.c | 2 --
arch/mips/src/common/up_internal.h | 12 ++-----
arch/misoc/src/lm32/lm32.h | 10 ++----
arch/misoc/src/minerva/minerva.h | 10 ++----
arch/or1k/src/common/up_initialize.c | 2 --
arch/or1k/src/common/up_internal.h | 12 ++-----
arch/renesas/src/common/up_initialize.c | 2 --
arch/renesas/src/common/up_internal.h | 12 ++-----
arch/risc-v/src/common/up_initialize.c | 6 ----
arch/risc-v/src/common/up_internal.h | 10 ++----
arch/sim/src/sim/up_initialize.c | 2 --
arch/sim/src/sim/up_internal.h | 3 +-
arch/x86/src/common/up_initialize.c | 2 --
arch/x86/src/common/up_internal.h | 12 ++-----
arch/xtensa/src/common/xtensa.h | 10 ++----
arch/xtensa/src/common/xtensa_initialize.c | 2 --
arch/z16/src/common/up_initialize.c | 2 --
arch/z16/src/common/up_internal.h | 10 ++----
arch/z80/src/common/up_initialize.c | 2 --
arch/z80/src/common/z80_internal.h | 13 +-------
boards/arm/sama5/sama5d2-xult/README.txt | 1 -
boards/arm/sama5/sama5d4-ek/README.txt | 1 -
boards/arm/samv7/samv71-xult/README.txt | 1 -
boards/arm/stm32/clicker2-stm32/README.txt | 1 -
boards/arm/stm32/stm3220g-eval/README.txt | 2 +-
boards/arm/stm32/stm3240g-eval/README.txt | 2 +-
boards/mips/pic32mx/pic32mx-starterkit/README.txt | 1 -
boards/mips/pic32mx/sure-pic32mx/README.txt | 1 -
drivers/syslog/Kconfig | 13 +-------
drivers/syslog/README.txt | 11 ++-----
drivers/syslog/ramlog.c | 28 ++--------------
include/nuttx/syslog/ramlog.h | 39 +++--------------------
42 files changed, 45 insertions(+), 261 deletions(-)
diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index e0a5d3e..ef2ffdb 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -6931,10 +6931,6 @@ int syslog_file_channel(FAR const char *devpath);
</li>
<li>
<p>
- <code>CONFIG_RAMLOG_CONSOLE</code>: Use the RAM logging device as a system console. If this feature is enabled (along with <code>CONFIG_DEV_CONSOLE</code>), then all console output will be re-directed to a circular buffer in RAM. This might be useful, for example, if the only console is a Telnet console. Then in that case, console output from non-Telnet threads will go to the circular buffer and can be viewed using the NSH <code>dmesg</code> command. This optional is not useful [...]
- </li>
- <li>
- <p>
<code>CONFIG_RAMLOG_SYSLOG</code>: Use the RAM logging device for the SYSLOG interface. If this feature is enabled, then all debug output will be re-directed to the circular buffer in RAM. This RAM log can be viewed from NSH using the <code>dmesg</code> command. NOTE: Unlike the limited, generic character driver SYSLOG device, the RAMLOG <i>can</i> be used to capture debug output from
interrupt level handlers.
</li>
@@ -6943,9 +6939,6 @@ int syslog_file_channel(FAR const char *devpath);
<code>CONFIG_RAMLOG_NPOLLWAITERS</code>: The number of threads than can be waiting for this driver on <code>poll()</code>. Default: 4
</li>
</ul>
-<p>
- If <code>CONFIG_RAMLOG_CONSOLE</code> or <code>CONFIG_RAMLOG_SYSLOG</code> is selected, then the following must also be provided:
-</p>
<ul>
<li>
<p>
diff --git a/TODO b/TODO
index 779a2be..961523d 100644
--- a/TODO
+++ b/TODO
@@ -2117,13 +2117,6 @@ o File system / Generic drivers (fs/, drivers/)
Status: Open
Priority: Medium-Low
- Title: CONFIG_RAMLOG_CONSOLE DOES NOT WORK
- Description: When I enable CONFIG_RAMLOG_CONSOLE, the system does not come up
- properly (using configuration stm3240g-eval/nsh2). The problem
- may be an assertion that is occurring before we have a console.
- Status: Open
- Priority: Medium
-
Title: UNIFIED DESCRIPTOR REPRESENTATION
Description: There are two separate ranges of descriptors for file and
socket descriptors: if a descriptor is in one range then it is
diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c
index 67d94ea..e4d63b8 100644
--- a/arch/arm/src/common/up_initialize.c
+++ b/arch/arm/src/common/up_initialize.c
@@ -50,7 +50,6 @@
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/syslog.h>
-#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>
@@ -194,8 +193,6 @@ void up_initialize(void)
lwlconsole_init();
#elif defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h
index 9c96779..71d08ab 100644
--- a/arch/arm/src/common/up_internal.h
+++ b/arch/arm/src/common/up_internal.h
@@ -60,14 +60,10 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
# if defined(CONFIG_ARM_LWL_CONSOLE)
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# elif defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
# else
# define USE_SERIALDRIVER 1
# define USE_EARLYSERIALINIT 1
@@ -87,7 +83,7 @@
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
-# define CONFIG_ARCH_INTERRUPTSTACK 0
+# define CONFIG_ARCH_INTERRUPTSTACK 0
#endif
/* Macros to handle saving and restoring interrupt state. In the current ARM
diff --git a/arch/avr/src/at32uc3/at32uc3_config.h b/arch/avr/src/at32uc3/at32uc3_config.h
index ec5e57f..2a5d1e0 100644
--- a/arch/avr/src/at32uc3/at32uc3_config.h
+++ b/arch/avr/src/at32uc3/at32uc3_config.h
@@ -152,12 +152,8 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# elif defined(HAVE_RS232_DEVICE)
+# if defined(HAVE_RS232_DEVICE)
# define USE_SERIALDRIVER 1
# define USE_EARLYSERIALINIT 1
# else
diff --git a/arch/avr/src/at90usb/at90usb_config.h b/arch/avr/src/at90usb/at90usb_config.h
index 6fa0771..91b172e 100644
--- a/arch/avr/src/at90usb/at90usb_config.h
+++ b/arch/avr/src/at90usb/at90usb_config.h
@@ -71,12 +71,8 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# elif defined(HAVE_USART_DEVICE)
+# if defined(HAVE_USART_DEVICE)
# define USE_SERIALDRIVER 1
# define USE_EARLYSERIALINIT 1
# else
diff --git a/arch/avr/src/atmega/atmega_config.h b/arch/avr/src/atmega/atmega_config.h
index 38f2e99..f764b8a 100644
--- a/arch/avr/src/atmega/atmega_config.h
+++ b/arch/avr/src/atmega/atmega_config.h
@@ -77,12 +77,8 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# elif defined(HAVE_USART_DEVICE)
+# if defined(HAVE_USART_DEVICE)
# define USE_SERIALDRIVER 1
# define USE_EARLYSERIALINIT 1
# else
diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/up_initialize.c
index 10efac3..7b4cbc1 100644
--- a/arch/avr/src/common/up_initialize.c
+++ b/arch/avr/src/common/up_initialize.c
@@ -76,15 +76,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
@@ -228,8 +222,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/up_initialize.c
index f931ede..95b7a7a 100644
--- a/arch/hc/src/common/up_initialize.c
+++ b/arch/hc/src/common/up_initialize.c
@@ -155,8 +155,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h
index 8681298..3f84559 100644
--- a/arch/hc/src/common/up_internal.h
+++ b/arch/hc/src/common/up_internal.h
@@ -60,15 +60,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
@@ -78,13 +72,13 @@
*/
#if !defined(USE_SERIALDRIVER) && defined(CONFIG_STANDARD_SERIAL)
-# define USE_SERIALDRIVER 1
+# define USE_SERIALDRIVER 1
#endif
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
-# define CONFIG_ARCH_INTERRUPTSTACK 0
+# define CONFIG_ARCH_INTERRUPTSTACK 0
#endif
/* Macros to handle saving and restore interrupt state. In the current CPU12
diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/up_initialize.c
index 559fe23..a741582 100644
--- a/arch/mips/src/common/up_initialize.c
+++ b/arch/mips/src/common/up_initialize.c
@@ -157,8 +157,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/mips/src/common/up_internal.h b/arch/mips/src/common/up_internal.h
index 9a2c8d8..5de04e5 100644
--- a/arch/mips/src/common/up_internal.h
+++ b/arch/mips/src/common/up_internal.h
@@ -57,15 +57,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
@@ -81,7 +75,7 @@
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
-# define CONFIG_ARCH_INTERRUPTSTACK 0
+# define CONFIG_ARCH_INTERRUPTSTACK 0
#endif
/* In the MIPS model, the state is copied from the stack to the TCB, but
diff --git a/arch/misoc/src/lm32/lm32.h b/arch/misoc/src/lm32/lm32.h
index 9b54bf2..fab887b 100644
--- a/arch/misoc/src/lm32/lm32.h
+++ b/arch/misoc/src/lm32/lm32.h
@@ -77,15 +77,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/****************************************************************************
diff --git a/arch/misoc/src/minerva/minerva.h b/arch/misoc/src/minerva/minerva.h
index 086183d..6c73a7b 100644
--- a/arch/misoc/src/minerva/minerva.h
+++ b/arch/misoc/src/minerva/minerva.h
@@ -77,15 +77,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/****************************************************************************
diff --git a/arch/or1k/src/common/up_initialize.c b/arch/or1k/src/common/up_initialize.c
index 47981b9..e0015f1 100644
--- a/arch/or1k/src/common/up_initialize.c
+++ b/arch/or1k/src/common/up_initialize.c
@@ -248,8 +248,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/or1k/src/common/up_internal.h b/arch/or1k/src/common/up_internal.h
index 8ba24d8..ed5cfe0 100644
--- a/arch/or1k/src/common/up_internal.h
+++ b/arch/or1k/src/common/up_internal.h
@@ -60,15 +60,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
@@ -84,7 +78,7 @@
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
-# define CONFIG_ARCH_INTERRUPTSTACK 0
+# define CONFIG_ARCH_INTERRUPTSTACK 0
#endif
#define up_savestate(regs) up_copyfullstate(regs, (uint32_t*)CURRENT_REGS)
diff --git a/arch/renesas/src/common/up_initialize.c b/arch/renesas/src/common/up_initialize.c
index 8f45916..1e04034 100644
--- a/arch/renesas/src/common/up_initialize.c
+++ b/arch/renesas/src/common/up_initialize.c
@@ -141,8 +141,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/renesas/src/common/up_internal.h b/arch/renesas/src/common/up_internal.h
index d81e5e3..03f0067 100644
--- a/arch/renesas/src/common/up_internal.h
+++ b/arch/renesas/src/common/up_internal.h
@@ -65,15 +65,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
@@ -89,7 +83,7 @@
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
-# define CONFIG_ARCH_INTERRUPTSTACK 0
+# define CONFIG_ARCH_INTERRUPTSTACK 0
#endif
/****************************************************************************
diff --git a/arch/risc-v/src/common/up_initialize.c b/arch/risc-v/src/common/up_initialize.c
index 546a21e..a6d0191 100644
--- a/arch/risc-v/src/common/up_initialize.c
+++ b/arch/risc-v/src/common/up_initialize.c
@@ -139,8 +139,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
@@ -156,9 +154,5 @@ void up_initialize(void)
syslog_initialize(SYSLOG_INIT_EARLY);
-#ifdef CONFIG_RAMLOG_SYSLOG
- ramlog_sysloginit();
-#endif
-
board_autoled_on(LED_IRQSENABLED);
}
diff --git a/arch/risc-v/src/common/up_internal.h b/arch/risc-v/src/common/up_internal.h
index 72aa1eb..50a5b36 100644
--- a/arch/risc-v/src/common/up_internal.h
+++ b/arch/risc-v/src/common/up_internal.h
@@ -85,15 +85,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/****************************************************************************
diff --git a/arch/sim/src/sim/up_initialize.c b/arch/sim/src/sim/up_initialize.c
index 0f52405..5ef6abb 100644
--- a/arch/sim/src/sim/up_initialize.c
+++ b/arch/sim/src/sim/up_initialize.c
@@ -232,8 +232,6 @@ void up_initialize(void)
up_devconsole(); /* Our private /dev/console */
#elif defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/sim/src/sim/up_internal.h b/arch/sim/src/sim/up_internal.h
index e83214f..e57538e 100644
--- a/arch/sim/src/sim/up_internal.h
+++ b/arch/sim/src/sim/up_internal.h
@@ -89,9 +89,8 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_DEVCONSOLE
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_SYSLOG_RPMSG)
+# ifdef CONFIG_SYSLOG_RPMSG
# undef USE_DEVCONSOLE
# else
# define USE_DEVCONSOLE 1
diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/up_initialize.c
index 4a4c767..efc6f73 100644
--- a/arch/x86/src/common/up_initialize.c
+++ b/arch/x86/src/common/up_initialize.c
@@ -157,8 +157,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/up_internal.h
index 729ba1a..fcd06cc 100644
--- a/arch/x86/src/common/up_internal.h
+++ b/arch/x86/src/common/up_internal.h
@@ -59,15 +59,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
@@ -83,7 +77,7 @@
/* Check if an interrupt stack size is configured */
#ifndef CONFIG_ARCH_INTERRUPTSTACK
-# define CONFIG_ARCH_INTERRUPTSTACK 0
+# define CONFIG_ARCH_INTERRUPTSTACK 0
#endif
/* Macros to handle saving and restore interrupt state. In the current
diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h
index 13f97ef..b9a4d5f 100644
--- a/arch/xtensa/src/common/xtensa.h
+++ b/arch/xtensa/src/common/xtensa.h
@@ -60,15 +60,9 @@
#ifndef CONFIG_DEV_CONSOLE
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
diff --git a/arch/xtensa/src/common/xtensa_initialize.c b/arch/xtensa/src/common/xtensa_initialize.c
index 997f676..5161468 100644
--- a/arch/xtensa/src/common/xtensa_initialize.c
+++ b/arch/xtensa/src/common/xtensa_initialize.c
@@ -165,8 +165,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/z16/src/common/up_initialize.c b/arch/z16/src/common/up_initialize.c
index 32aa687..51cd2eb 100644
--- a/arch/z16/src/common/up_initialize.c
+++ b/arch/z16/src/common/up_initialize.c
@@ -157,8 +157,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/z16/src/common/up_internal.h b/arch/z16/src/common/up_internal.h
index 2e12797..4645222 100644
--- a/arch/z16/src/common/up_internal.h
+++ b/arch/z16/src/common/up_internal.h
@@ -66,15 +66,9 @@
#elif !defined(CONFIG_DEV_CONSOLE)
# undef USE_SERIALDRIVER
# undef USE_EARLYSERIALINIT
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# undef USE_EARLYSERIALINIT
-# else
-# define USE_SERIALDRIVER 1
-# define USE_EARLYSERIALINIT 1
-# endif
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
#endif
/* If some other device is used as the console, then the serial driver may
diff --git a/arch/z80/src/common/up_initialize.c b/arch/z80/src/common/up_initialize.c
index 4942511..61556c9 100644
--- a/arch/z80/src/common/up_initialize.c
+++ b/arch/z80/src/common/up_initialize.c
@@ -156,8 +156,6 @@ void up_initialize(void)
#if defined(CONFIG_CONSOLE_SYSLOG)
syslog_console_init();
-#elif defined(CONFIG_RAMLOG_CONSOLE)
- ramlog_consoleinit();
#endif
#ifdef CONFIG_PSEUDOTERM_SUSV1
diff --git a/arch/z80/src/common/z80_internal.h b/arch/z80/src/common/z80_internal.h
index 365f8b3..4c08e3c 100644
--- a/arch/z80/src/common/z80_internal.h
+++ b/arch/z80/src/common/z80_internal.h
@@ -59,11 +59,8 @@
#if !defined(CONFIG_DEV_CONSOLE)
# undef USE_SERIALDRIVER
-# undef CONFIG_RAMLOG_CONSOLE
#else
-# if defined(CONFIG_RAMLOG_CONSOLE)
-# undef USE_SERIALDRIVER
-# elif defined(CONFIG_CONSOLE_SYSLOG)
+# if defined(CONFIG_CONSOLE_SYSLOG)
# undef USE_SERIALDRIVER
# else
# define USE_SERIALDRIVER 1
@@ -126,14 +123,6 @@ void syslog_console_init();
# define syslog_console_init()
#endif
-/* Defined in drivers/ramlog.c */
-
-#ifdef CONFIG_RAMLOG_CONSOLE
-void ramlog_consoleinit(void);
-#else
-# define ramlog_consoleinit()
-#endif
-
/* Low level string output */
void up_puts(const char *str);
diff --git a/boards/arm/sama5/sama5d2-xult/README.txt b/boards/arm/sama5/sama5d2-xult/README.txt
index f0e3b99..8b85937 100644
--- a/boards/arm/sama5/sama5d2-xult/README.txt
+++ b/boards/arm/sama5/sama5d2-xult/README.txt
@@ -834,7 +834,6 @@ Configurations
Device Drivers:
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
system logger.
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
diff --git a/boards/arm/sama5/sama5d4-ek/README.txt b/boards/arm/sama5/sama5d4-ek/README.txt
index 0056998..c409a96 100644
--- a/boards/arm/sama5/sama5d4-ek/README.txt
+++ b/boards/arm/sama5/sama5d4-ek/README.txt
@@ -4300,7 +4300,6 @@ Configurations
Device Drivers:
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
system logger.
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
diff --git a/boards/arm/samv7/samv71-xult/README.txt b/boards/arm/samv7/samv71-xult/README.txt
index fc55bbd..21b3b10 100644
--- a/boards/arm/samv7/samv71-xult/README.txt
+++ b/boards/arm/samv7/samv71-xult/README.txt
@@ -1877,7 +1877,6 @@ Configuration sub-directories
Device Drivers:
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
system logger.
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
diff --git a/boards/arm/stm32/clicker2-stm32/README.txt b/boards/arm/stm32/clicker2-stm32/README.txt
index c104640..c39ff41 100644
--- a/boards/arm/stm32/clicker2-stm32/README.txt
+++ b/boards/arm/stm32/clicker2-stm32/README.txt
@@ -406,7 +406,6 @@ Configurations
Device Drivers:
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
system logger.
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
diff --git a/boards/arm/stm32/stm3220g-eval/README.txt b/boards/arm/stm32/stm3220g-eval/README.txt
index a7f0a9e..3776b61 100644
--- a/boards/arm/stm32/stm3220g-eval/README.txt
+++ b/boards/arm/stm32/stm3220g-eval/README.txt
@@ -734,7 +734,7 @@ Where <subdir> is one of the following:
There are some special settings to make life with only a Telnet
CONFIG_RAMLOG=y - Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console.
+ CONFIG_CONSOLE_SYSLOG=y - Use the RAM logger as the default console.
This means that any console output from non-Telnet threads will
go into the circular buffer in RAM.
CONFIG_RAMLOG_SYSLOG - This enables the RAM-based logger as the
diff --git a/boards/arm/stm32/stm3240g-eval/README.txt b/boards/arm/stm32/stm3240g-eval/README.txt
index 05efcc0..6590785 100644
--- a/boards/arm/stm32/stm3240g-eval/README.txt
+++ b/boards/arm/stm32/stm3240g-eval/README.txt
@@ -1104,7 +1104,7 @@ Where <subdir> is one of the following:
There are some special settings to make life with only a Telnet
CONFIG_RAMLOG=y - Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console.
+ CONFIG_CONSOLE_SYSLOG=y - Use the RAM logger as the default console.
This means that any console output from non-Telnet threads will
go into the circular buffer in RAM.
CONFIG_RAMLOG_SYSLOG - This enables the RAM-based logger as the
diff --git a/boards/mips/pic32mx/pic32mx-starterkit/README.txt b/boards/mips/pic32mx/pic32mx-starterkit/README.txt
index 8078d72..5b45a8a 100644
--- a/boards/mips/pic32mx/pic32mx-starterkit/README.txt
+++ b/boards/mips/pic32mx/pic32mx-starterkit/README.txt
@@ -1111,7 +1111,6 @@ Where <subdir> is one of the following:
3. The RAM log is enabled"
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=n : (there is no default console device)
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
system logger.
diff --git a/boards/mips/pic32mx/sure-pic32mx/README.txt b/boards/mips/pic32mx/sure-pic32mx/README.txt
index 6fba1bc..88edf86 100644
--- a/boards/mips/pic32mx/sure-pic32mx/README.txt
+++ b/boards/mips/pic32mx/sure-pic32mx/README.txt
@@ -893,7 +893,6 @@ Where <subdir> is one of the following:
Device Drivers -> System Logging Device Options:
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
- CONFIG_RAMLOG_CONSOLE=n : (there is no default console device)
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
system logger.
diff --git a/drivers/syslog/Kconfig b/drivers/syslog/Kconfig
index 6739939..181c209 100644
--- a/drivers/syslog/Kconfig
+++ b/drivers/syslog/Kconfig
@@ -32,21 +32,10 @@ config RAMLOG
details as needed to support logging.
if RAMLOG
-config RAMLOG_CONSOLE
- bool "Use RAMLOG for /dev/console"
- default n
- depends on DEV_CONSOLE
- ---help---
- Use the RAM logging device as a system console. If this feature is enabled (along
- with DEV_CONSOLE), then all console output will be re-directed to a circular
- buffer in RAM. This is useful, for example, if the only console is a Telnet
- console. Then in that case, console output from non-Telnet threads will go to
- the circular buffer and can be viewed using the NSH 'dmesg' command.
-
config RAMLOG_BUFSIZE
int "RAMLOG buffer size"
default 1024
- depends on RAMLOG_SYSLOG || RAMLOG_CONSOLE
+ depends on RAMLOG_SYSLOG
---help---
Size of the console RAM log. Default: 1024
diff --git a/drivers/syslog/README.txt b/drivers/syslog/README.txt
index 962524c..dbc46df 100644
--- a/drivers/syslog/README.txt
+++ b/drivers/syslog/README.txt
@@ -469,13 +469,6 @@ RAM Logging Device
----------------------------
* CONFIG_RAMLOG - Enables the RAM logging feature
- * CONFIG_RAMLOG_CONSOLE - Use the RAM logging device as a system
- console. If this feature is enabled (along with CONFIG_DEV_CONSOLE),
- then all console output will be re-directed to a circular buffer in
- RAM. This might be useful, for example, if the only console is a
- Telnet console. Then in that case, console output from non-Telnet
- threads will go to the circular buffer and can be viewed using the NSH
- dmesg command. This optional is not useful in other scenarios.
* CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging
interface. If this feature is enabled, then all debug output (only)
will be re-directed to the circular buffer in RAM. This RAM log can
@@ -485,8 +478,8 @@ RAM Logging Device
* CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting
for this driver on poll(). Default: 4
- If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the
- following must also be provided:
+ If CONFIG_RAMLOG_SYSLOG is selected, then the following must also be
+ provided:
* CONFIG_RAMLOG_BUFSIZE - The size of the circular buffer to use.
Default: 1024 bytes.
diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c
index 3605e14..bbb7670 100644
--- a/drivers/syslog/ramlog.c
+++ b/drivers/syslog/ramlog.c
@@ -152,7 +152,7 @@ static const struct file_operations g_ramlogfops =
* for the syslogging function.
*/
-#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
+#ifdef CONFIG_RAMLOG_SYSLOG
static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE];
/* This is the device structure for the console or syslogging function. It
@@ -677,7 +677,6 @@ errout:
*
****************************************************************************/
-#if !defined(CONFIG_RAMLOG_CONSOLE) && !defined(CONFIG_RAMLOG_SYSLOG)
int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
{
FAR struct ramlog_dev_s *priv;
@@ -719,26 +718,6 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
return ret;
}
-#endif
-
-/****************************************************************************
- * Name: ramlog_consoleinit
- *
- * Description:
- * Use a pre-allocated RAM logging device and register it at /dev/console
- *
- ****************************************************************************/
-
-#ifdef CONFIG_RAMLOG_CONSOLE
-int ramlog_consoleinit(void)
-{
- FAR struct ramlog_dev_s *priv = &g_sysdev;
-
- /* Register the console character driver */
-
- return register_driver("/dev/console", &g_ramlogfops, 0666, priv);
-}
-#endif
/****************************************************************************
* Name: ramlog_syslog_channel
@@ -747,9 +726,6 @@ int ramlog_consoleinit(void)
* Use a pre-allocated RAM logging device and register it at the path
* specified by CONFIG_RAMLOG_SYSLOG
*
- * If CONFIG_RAMLOG_CONSOLE is also defined, then this functionality is
- * performed when ramlog_consoleinit() is called.
- *
****************************************************************************/
#ifdef CONFIG_RAMLOG_SYSLOG
@@ -779,7 +755,7 @@ int ramlog_syslog_channel(void)
*
****************************************************************************/
-#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
+#ifdef CONFIG_RAMLOG_SYSLOG
int ramlog_putc(int ch)
{
FAR struct ramlog_dev_s *priv = &g_sysdev;
diff --git a/include/nuttx/syslog/ramlog.h b/include/nuttx/syslog/ramlog.h
index 48ca3ac..c25471e 100644
--- a/include/nuttx/syslog/ramlog.h
+++ b/include/nuttx/syslog/ramlog.h
@@ -66,12 +66,6 @@
/* Configuration ************************************************************/
/* CONFIG_RAMLOG - Enables the RAM logging feature
- * CONFIG_RAMLOG_CONSOLE - Use the RAM logging device as a system console.
- * If this feature is enabled (along with CONFIG_DEV_CONSOLE), then all
- * console output will be re-directed to a circular buffer in RAM. This
- * is useful, for example, if the only console is a Telnet console. Then
- * in that case, console output from non-Telnet threads will go to the
- * circular buffer and can be viewed using the NSH 'dmesg' command.
* CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging
* interface. If this feature is enabled then all debug output (only)
* will be re-directed to the circular buffer in RAM. This RAM log can
@@ -81,16 +75,12 @@
* CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting
* for this driver on poll(). Default: 4
*
- * If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the
- * following may also be provided:
+ * If CONFIG_RAMLOG_SYSLOG is selected, then the following may also be
+ * provided:
*
* CONFIG_RAMLOG_BUFSIZE - Size of the console RAM log. Default: 1024
*/
-#ifndef CONFIG_DEV_CONSOLE
-# undef CONFIG_RAMLOG_CONSOLE
-#endif
-
#if defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_SYSLOG_DEVPATH)
# define CONFIG_SYSLOG_DEVPATH "/dev/ramlog"
#endif
@@ -130,32 +120,14 @@ extern "C"
*
* This interface is not normally used but can be made available is
* someone just wants to tinker with the RAM log as a generic character
- * device. Normally both CONFIG_RAMLOG_CONSOLE and CONFIG_RAMLOG_SYSLOG
+ * device. Normally both CONFIG_CONSOLE_SYSLOG and CONFIG_RAMLOG_SYSLOG
* would be set (to capture all output in the log) -OR- just
* CONFIG_RAMLOG_SYSLOG would be set to capture debug output only
* in the log.
*
****************************************************************************/
-#if !defined(CONFIG_RAMLOG_CONSOLE) && !defined(CONFIG_RAMLOG_SYSLOG)
int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen);
-#endif
-
-/****************************************************************************
- * Name: ramlog_consoleinit
- *
- * Description:
- * Create the RAM logging device and register it at the specified path.
- * Mostly likely this path will be /dev/console.
- *
- * If CONFIG_RAMLOG_SYSLOG is also defined, then the same RAM logging
- * device is also registered at CONFIG_SYSLOG_DEVPATH
- *
- ****************************************************************************/
-
-#ifdef CONFIG_RAMLOG_CONSOLE
-int ramlog_consoleinit(void);
-#endif
/****************************************************************************
* Name: ramlog_syslog_channel
@@ -164,9 +136,6 @@ int ramlog_consoleinit(void);
* Create the RAM logging device and register it at the specified path.
* Mostly likely this path will be CONFIG_SYSLOG_DEVPATH
*
- * If CONFIG_RAMLOG_CONSOLE is also defined, then this functionality is
- * performed when ramlog_consoleinit() is called.
- *
****************************************************************************/
#ifdef CONFIG_RAMLOG_SYSLOG
@@ -181,7 +150,7 @@ int ramlog_syslog_channel(void);
*
****************************************************************************/
-#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
+#ifdef CONFIG_RAMLOG_SYSLOG
int ramlog_putc(int ch);
#endif