diff --git a/drivers/syslog/Kconfig b/drivers/syslog/Kconfig index 263e05671b..b7c0ac1342 100644 --- a/drivers/syslog/Kconfig +++ b/drivers/syslog/Kconfig @@ -34,6 +34,14 @@ config RAMLOG details as needed to support logging. if RAMLOG +config RAMLOG_BUFFER_SECTION + string "The section where ramlog buffer is located" + default ".bss" + depends on RAMLOG_SYSLOG + ---help--- + The section where ramlog buffer is located, this section cannot + be initialized each time when the system boot. + config RAMLOG_BUFSIZE int "RAMLOG buffer size" default 1024 diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index a35b3bb28d..7c20eb8ec7 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -120,7 +120,8 @@ static const struct file_operations g_ramlogfops = */ #ifdef CONFIG_RAMLOG_SYSLOG -static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]; +static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE] + locate_data(CONFIG_RAMLOG_BUFFER_SECTION); /* This is the device structure for the console or syslogging function. It * must be statically initialized because the RAMLOG ramlog_putc function