Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Jun 2007 11:37:50 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        bkoenig@alpha-tierchen.de
Cc:        arm@freebsd.org
Subject:   Re: How to get console output?
Message-ID:  <20070604.113750.-1540390883.imp@bsdimp.com>
In-Reply-To: <49326.2001:6f8:101e:0:20e:cff:fe6d:6adb.1180977230.squirrel@webmail.alpha-tierchen.de>

index | next in thread | previous in thread | raw e-mail

In message: <49326.2001:6f8:101e:0:20e:cff:fe6d:6adb.1180977230.squirrel@webmail.alpha-tierchen.de>
            Björn_König <bkoenig@alpha-tierchen.de> writes:
: Hello once again,
: 
: I'm sitting here for hours and still reading source code, but I can't get
: the kernel to talk. Actually the kernel starts initialising, probing
: devices and so on. I wrote my own "puts" methods to get some output on the
: debug console, but I want it the proper way.
: 
: As far as I understood it correctly the function "cninit()" in
: sys/arm/at91/kb920x_machdep.c should initialise a console. The code in
: kern/tty_cons.c iterates with two devices without success:
: 
:  * uart_consdev which is "dead" (cn_pri == CN_DEAD)
:  * cons_consdev that has no probe function (cn_probe == NULL)
: 
: Now I'm looking for the piece of code where I can hint the kernel to use
: the debug unit as output device. The files src/arm/at91/uart_* implement a
: driver module for uart(4) and I want the kernel to use this code somehow.
: 
: Does anybody has a hint for me? :)

I have the following sitting in my tree:

Index: uart_cpu_at91rm9200usart.c
===================================================================
RCS file: /cache/ncvs/src/sys/arm/at91/uart_cpu_at91rm9200usart.c,v
retrieving revision 1.3
diff -u -r1.3 uart_cpu_at91rm9200usart.c
--- uart_cpu_at91rm9200usart.c	2 Apr 2007 22:00:21 -0000	1.3
+++ uart_cpu_at91rm9200usart.c	4 Jun 2007 17:37:20 -0000
@@ -80,5 +80,6 @@
 	uart_bus_space_io = &at91_bs_tag;
 	uart_bus_space_mem = NULL;
 	/* Check the environment for overrides */
-	return (uart_getenv(devtype, di, class));
+	uart_getenv(devtype, di, class);
+	return 0;
 }

waiting to find some time to test it.

Warner


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070604.113750.-1540390883.imp>