[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    RE: [BusyBox] 'device /dev/vc/4' does not exist ...
From:       "Sauder, Vernon" <Vernon.Sauder () spirentcom ! com>
Date:       2005-06-21 17:40:49
Message-ID: A61771BC4AE2DD41B460E8D73082E6E305F5B80A () olympus ! hekimian ! com
[Download RAW message or body]

> -----Original Message-----
> From: robert koh [mailto:robert_kw@yahoo.com] 
> Sent: Tuesday, June 21, 2005 1:46 AM
> 
> Hello,
> I use busybox as the root file system in my embedded
> system. After the kernel has booted up, the busybox
> keep giving this message 
>    'device /dev/vc/4' does not exist 
> to my serial console port.
> 
> What wrong to my kernel configuration..?
> 
Probably nothing. I have no idea what /dev/vc/4 is supposed to be but I
didn't have one for my system either. I noticed that init started printing
warnings like this late in our development and found that it was after we
replaced the busybox syslogd with the GNU version (features needed). The
busybox init code assumes that if you do not compile syslogd into busybox,
that you don't have one and it wants to put status and debug data out on
/dev/vc/4 or 5. I suppose you could make that a symlink to something. But I
wanted init to use syslogd so I created a patch that does just that. Here it
is.

Vernon Sauder

diff -ur busybox.orig/init/Config.in busybox.new/init/Config.in
--- busybox.orig/init/Config.in	2004-05-26 06:28:32.000000000 -0400
+++ busybox.new/init/Config.in	2004-06-09 13:08:43.000000000 -0400
@@ -43,6 +43,15 @@
 	  Prevent init from logging some messages to the console
 	  during boot.
 
+config CONFIG_INIT_USES_SYSLOG
+	bool "  Should init use syslog?"
+	default y
+	depends on CONFIG_INIT
+	help
+	  If this options is enabled, init will use syslog (may be the
+	  built in version). If this is not enabled, it will use /dev/vc/5
+	  for logging output.
+
 config CONFIG_HALT
 	bool "halt"
 	default y
diff -ur busybox.orig/init/init.c busybox.new/init/init.c
--- busybox.orig/init/init.c	2004-04-12 15:21:54.000000000 -0400
+++ busybox.new/init/init.c	2004-06-09 13:08:22.000000000 -0400
@@ -47,8 +47,7 @@
 
 #include "init_shared.h"
 
-
-#ifdef CONFIG_SYSLOGD
+#ifdef CONFIG_INIT_USES_SYSLOG
 # include <sys/syslog.h>
 #endif
 
@@ -159,7 +158,7 @@
 static struct init_action *init_action_list = NULL;
 static char console[CONSOLE_BUFF_SIZE] = _PATH_CONSOLE;
 
-#ifndef CONFIG_SYSLOGD
+#ifndef CONFIG_INIT_USES_SYSLOG
 static char *log = VC_5;
 #endif
 static sig_atomic_t got_cont = 0;
@@ -216,7 +215,7 @@
 	va_list arguments;
 	int l;
 	char msg[1024];
-#ifndef CONFIG_SYSLOGD
+#ifndef CONFIG_INIT_USES_SYSLOG
 	static int log_fd = -1;
 #endif
 
@@ -225,7 +224,7 @@
 	l = vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments) + 1;
 		va_end(arguments);
 
-#ifdef CONFIG_SYSLOGD
+#ifdef CONFIG_INIT_USES_SYSLOG
 	/* Log the message to syslogd */
 	if (device & LOG) {
 		/* don`t out "\r\n" */
@@ -382,7 +381,7 @@
 	}
 	if (fd < 0) {
 		/* Perhaps we should panic here? */
-#ifndef CONFIG_SYSLOGD
+#ifndef CONFIG_INIT_USES_SYSLOG
 		log =
 #endif
 		safe_strncpy(console, "/dev/null", sizeof(console));
@@ -394,7 +393,7 @@
 			 * if TERM is set to linux (the default) */
 			if (s == NULL || strcmp(s, "linux") == 0)
 				putenv("TERM=vt102");
-#ifndef CONFIG_SYSLOGD
+#ifndef CONFIG_INIT_USES_SYSLOG
 			log = console;
 #endif
 		} else {


_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic