首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Linux内核解压缩未在UART上打印的Linux消息

问Linux内核解压缩未在UART上打印的Linux消息
EN

Stack Overflow用户
提问于 2016-06-28 07:06:37
回答 1查看 1.4K关注 0票数 1

我正在使用Minnowboard开发一个嵌入式项目,并使用u引导定制Linux内核。

内核命令行参数:

代码语言:javascript
复制
initcall_debug=1 video=HDMI-A-1:1920x1200MR@60D console=ttyS0,115200 console=tty0

我看到在misc.c文件中定义的任何debug_pustr消息都没有被打印在串行端口中。

代码语言:javascript
复制
debug_putstr("\nDecompressing Linux... ");

我还在内核menuconfig中启用了CONFIG_X86_VERBOSE_BOOTUP =y。

在串口中有看到这些消息的方法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-28 08:43:49

在串口中有看到这些消息的方法吗?

突出信息是处理器的体系结构。

例如,在ARM引导中,解压缩程序代码使用自己的串口配置,这与earlyprintk不同。一些ARM机器有配置对话框来指定这个早期的串口;有些机器可能使用机器ID (请参阅How do I find ARM Linux entry point when it fails to uncompress?)。在ARM上,earlyprintk直到(init/main.c) init_kernel()例程启动后才有效。

对于x86,所有早期的串口配置& I/O都合并到了earlyprintk特性中。使用内核命令行参数定义串口(默认为0x3F8的设备)和波特率(默认值为9600)。

代码语言:javascript
复制
1081         earlyprintk=    [X86,SH,BLACKFIN,ARM,M68k]
1082                         earlyprintk=vga
1083                         earlyprintk=efi
1084                         earlyprintk=xen
1085                         earlyprintk=serial[,ttySn[,baudrate]]
1086                         earlyprintk=serial[,0x...[,baudrate]]
1087                         earlyprintk=ttySn[,baudrate]
1088                         earlyprintk=dbgp[debugController#]
1089                         earlyprintk=pciserial,bus:device.function[,baudrate]
1090 
1091                         earlyprintk is useful when the kernel crashes before
1092                         the normal console is initialized. It is not enabled by
1093                         default because it has some cosmetic problems.
1094 
1095                         Append ",keep" to not disable it when the real console
1096                         takes over.
1097 
1098                         Only one of vga, efi, serial, or usb debug port can
1099                         be used at a time.
1100 
1101                         Currently only ttyS0 and ttyS1 may be specified by
1102                         name.  Other I/O ports may be explicitly specified
1103                         on some architectures (x86 and arm at least) by
1104                         replacing ttySn with an I/O port address, like this:
1105                                 earlyprintk=serial,0x1008,115200
1106                         You can find the port for a given device in
1107                         /proc/tty/driver/serial:
1108                                 2: uart:ST16650V2 port:00001008 irq:18 ...
1109 
1110                         Interaction with the standard serial driver is not
1111                         very good.
1112 
1113                         The VGA and EFI output is eventually overwritten by
1114                         the real console.
1115 
1116                         The xen output can only be used by Xen PV guests.
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38069301

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档