2002-07-04 15:13:14

by Lee Chin

[permalink] [raw]
Subject: writing to serial console

Hi,
I'm trying to write status messages to the serial console as the kernel boots up. I tried writing to ttyS0 in main.c, but the kernel crashes with a paging violation. Is there an easy way to do this?

Thanks
Lee
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Save up to $160 by signing up for NetZero Platinum Internet service.
http://www.netzero.net/?refcd=N2P0602NEP8


2002-07-04 15:19:33

by Jan-Benedict Glaw

[permalink] [raw]
Subject: Re: writing to serial console

On Thu, 2002-07-04 10:14:50 -0500, Lee Chin <[email protected]>
wrote in message <[email protected]>:
> Hi,
> I'm trying to write status messages to the serial console as the kernel boots up. I tried writing to ttyS0 in main.c, but the kernel crashes with a paging violation. Is there an easy way to do this?

Simply use printk() and boot up your kernel with "console=ttyS0" or like
that. See ./linux/Documentation/serial-console.txt .

MfG, JBG

--
Jan-Benedict Glaw . [email protected] . +49-172-7608481
-- New APT-Proxy written in shell script --
http://lug-owl.de/~jbglaw/software/ap2/


Attachments:
(No filename) (624.00 B)
(No filename) (189.00 B)
Download all attachments

2002-07-04 22:29:55

by Keith Owens

[permalink] [raw]
Subject: Re: writing to serial console

On Thu, 04 Jul 2002 10:14:50 -0500,
"Lee Chin" <[email protected]> wrote:
>I'm trying to write status messages to the serial console as the kernel boots up. I tried writing to ttyS0 in main.c, but the kernel crashes with a paging violation. Is there an easy way to do this?

printk() and a serial console. Console output does not occur until
console_init(). To debug problems that occur before console_init(),
see these patches.

http://marc.theaimsgroup.com/?l=linux-kernel&m=101072840225142&w=2
http://marc.theaimsgroup.com/?l=linux-kernel&m=102386369913669&w=2