linux-mips
[Top] [All Lists]

Re: printk

To: "John D. Davis" <johnd@stanford.edu>
Subject: Re: printk
From: Jun Sun <jsun@mvista.com>
Date: Fri, 3 Aug 2001 14:41:43 -0700
Cc: linux-mips@oss.sgi.com
In-reply-to: <Pine.GSO.4.31.0108031412450.675-100000@myth1.Stanford.EDU>; from johnd@stanford.edu on Fri, Aug 03, 2001 at 02:15:54PM -0700
References: <Pine.GSO.4.31.0108031412450.675-100000@myth1.Stanford.EDU>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Fri, Aug 03, 2001 at 02:15:54PM -0700, John D. Davis wrote:
> Does anyone know off hand, the earlies point that I can use printk?  I
> added some printk statements to driver/char/console.c and the resulting
> kernel hangs with only the logo showing and no text.  Is prom_printf
> something that I should use instead. I put some printk statements in
> tty_io.c and kernel/printk.c and those compiled kernels work.
> 
> thanks,
> john davis
>

Like other folks from this list have pointed out, you can use
it as early as the first C line.  The output is stored in a memory
buffer and later displayed on your screen when your serial console
is registered.

When porting to a new machine, I often use dev-only patch (i.e.,
not meant to be checked in) to enable seeing printk immediately, *if*
it is a standard UART port.  See the attache patch below.

I don't recommand use or implement prom_printf.

Jun

Attachment: early-printk.patch
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>