您将内核控制台发送到嵌入式系统的哪里? [英] Where do you send the kernel console on an embedded system?

查看:72
本文介绍了您将内核控制台发送到嵌入式系统的哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个嵌入式系统,该系统当前通过串行端口1(使用引导加载程序中的控制台引导参数)引导带有控制台输出的linux.但是,最终我们将使用此串行端口.内核控制台输出的最佳解决方案是什么?/dev/空吗?可以以某种方式摆上它,以便我们有可能使用它吗?

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?

推荐答案

如果您只想从控制台读取内核printk消息,而不实际在其上运行getty或shell,则可以使用netconsole.您可以为引导加载程序内核选项(或modprobe netconsole)提供以下内容:

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):

netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc

其中4444是本地端口,10.0.0.1是本地ip,eth1是用于发送消息的本地接口.9353是远程端口,10.0.0.2是将消息发送到的远程ip,最后一个参数是您的远程(例如:台式机)系统的mac地址.

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.

然后查看运行的消息:

netcat -u -l -p 9353

您可以在 Documentation/networking/netconsole.txt <中详细了解/a>

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

这篇关于您将内核控制台发送到嵌入式系统的哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆