Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do you send the kernel console on an embedded system?

Tags:

linux

embedded

I'm developing an embedded system which currently boots linux with console output on serial port 1 (using the console boot param from the boot loader). However, eventually we will be using this serial port. What is the best solution for the kernel console output? /dev/null? Can it be put on a pty somehow so that we could potentially get access to it?

like image 891
Matthew Smith Avatar asked Sep 30 '08 03:09

Matthew Smith


1 Answers

If you just want to read kernel printk messages from the console, and not actually run getty or a shell on it, you can use netconsole. You can supply the following to your bootloader kernel options (or to modprobe netconsole):

[email protected]/eth1,[email protected]/12:34:56:78:9a:bc

where 4444 is the local port, 10.0.0.1 is the local ip, eth1 is the local interface to send the messages out of. 9353 is the remote port, 10.0.0.2 is the remote ip to send the messages to, and the final argument is your remote (eg: your desktop) system's mac address.

Then to view the messages run:

netcat -u -l -p 9353

You can read more about this in Documentation/networking/netconsole.txt

like image 143
bmdhacks Avatar answered Oct 21 '22 07:10

bmdhacks