Re: [uClinux-dev] printk and serial port

From: Tonny Tzeng (tzengym@ms8.hinet.net)
Date: Tue May 21 2002 - 18:24:04 EDT


> I am trying to redirect all the messages from the printk function to the 
> serial port.

You could config the kernel with CONFIG_SERIAL_ECHO option,
the prompt of this option is "Echo console messages on /dev/ttyS0 ".

> I have initialized the serial driver inside the setup_arch function 
> prior to the first messages that appear there.
> I would like to know what are the minimum requirements from the kernel 
> side that I have to fulfill in order to have a debug console.

The printk() uses internal buffer for keeping messages to be printed.
So you only need to add two functions for serial console, one is for
initialization and the other is for printing. Grep "CONFIG_SERIAL_ECHO "
for the exactly function names.

Best regards,
Tonny

> I am asking this because I noticed that during the execution of the 
> register_console function the schedule() function is also called (from 
> the semaphore related functions). Do I have for example to initialize 
> the timer interrupt ?
> 
> Regards
> 
> Yannis
> 
> P.S: I am workng on a port of the uClinux to Infineon's TriCore. (Just 
> in case that someone is asking for the platform)


This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:21:17 EDT