最近发现uboot下一个很有意思也很实用的功能:netconsole,uboot下的netconsole类似于kernel下的telnet等网络终端功能,将网络作为输入输出的终端,这样就便于我们在PC端通过网络登录设备uboot中运行命令(更准确的说是通过网络向uboot发送命令和接收uboot的反馈信息,netconsole没有登录检查)。
kernel下也有netconsole机制,不过由于内核下的console只有write功能(因为内核启动是没有交互的,只有输出信息),因此kernel下netconsole机制其实就是向内核注册提供网络发送数据功能的console_device,具体实现代码在drivers/net/netconsole.c中。
关于内核console的实现可以查看我之前一篇解析内核下console机制的文章,链接如下:
http://blog.csdn.net/skyflying2012/article/details/41078349
uboot下的netconsole实现类似于内核,也是向uboot下的console子系统注册新的设备,关于uboot下的console系统可以查我之前分析uboot启动流程的一篇文章,在最后分析了uboot下console机制,链接如下:
http://blog.csdn.net/skyflying2012/article/details/25804209
uboot下netconsole的实现在drivers/net/netconsole.c中&#x
uboot下netconsole的原理及使用方法
最新推荐文章于 2024-05-04 08:44:31 发布