Re: Writing to serial port at kernel start-up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Simon Talbot" <simont@nse.co.uk> writes:

> Hi All,
>  
> I am trying to modify the kernel in such a way as to be able to write to
> a serial port at a very early stage of kernel start-up (as early in
> main.c kernel_startup as possible). This is obviously well before
> /dev/ttyS0 etc are available.
>  
> The reason for wanting to do this is to talk to a Serially addressed LCD
> display on a headless embedded Linux machine I am experimenting with. 
>  
> I still want to maintain full serial console on Serial port 1 but would
> like to be able to write small amounts of arbitrary character data to
> Serial Port 2 (Such as 'Kernel Booting', 'Starting devices' etc. so that
> the boot status can be observed on the LCD which is attached to Serial
> Port 2.
>  
> The display is only 2 x 16 Characters so obviously a full printk is not
> appropriate.
>  
> Can anyone please point me in the direction of some relevant information
> or sample code as I am not getting very far and having spent a few days
> on this am starting to pull my hair out.

I don't find the kgdb patch to be easy reading, but it does what you
want to do, namely writing (also reading) a serial port very early in
the boot process.

There are several kgdb patches, but I'm thinking of the George
Anzinger patch that's in Andrew Morton's mm patchset.  

  http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test9/2.6.0-test9-mm1/broken-out/kgdb-ga.patch

-- 
--Ed L Cashin            |   PGP public key:
  ecashin@uga.edu        |   http://noserose.net/e/pgp/

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux