How to get console output?
M. Warner Losh
imp at bsdimp.com
Mon Jun 4 17:38:18 UTC 2007
In message: <49326.2001:6f8:101e:0:20e:cff:fe6d:6adb.1180977230.squirrel at webmail.alpha-tierchen.de>
Björn_König <bkoenig at 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
More information about the freebsd-arm
mailing list