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

Linux内核解压缩Linux消息未在UART上打印,linux,linux-kernel,x86,embedded-linux,Linux,Linux Kernel,X86,Embedded Linux,我正在使用Minnowboard Max开发一个嵌入式项目,并使用u-boot定制Linux内核 内核命令行参数: initcall_debug=1 video=HDMI-A-1:1920x1200MR@60D console=ttyS0,115200 console=tty0 我发现在misc.c文件中定义的调试pustr消息都没有打印到串行端口中 debug_putstr("\nDecompressing Linux... "); 我还启用了 内核菜单配置中的CONFIG\u X86\u

我正在使用Minnowboard Max开发一个嵌入式项目,并使用u-boot定制Linux内核

内核命令行参数:

initcall_debug=1 video=HDMI-A-1:1920x1200MR@60D console=ttyS0,115200 console=tty0
我发现在misc.c文件中定义的调试pustr消息都没有打印到串行端口中

debug_putstr("\nDecompressing Linux... ");
我还启用了 内核菜单配置中的CONFIG\u X86\u VERBOSE\u BOOTUP=y

有没有办法在串行端口中查看这些消息

有没有办法在串行端口中查看这些消息

重要信息是处理器架构。
例如,在ARM引导中,解压缩程序代码使用自己的串行端口配置,这与earlyprintk不同。一些ARM机器有配置对话框来指定这个早期的串行端口;有些可能使用机器ID(请参阅)。在ARM上,只有在(init/main.c)init_kernel()例程启动之后,earlyprintk才会生效

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


initcall\u debug
参数不接受赋值。你正在加载什么图像文件?您是否为解压器定义了串行端口?端口配置设置是什么?是bzimage和gzip压缩。我应该在哪里为解压器定义串行端口?我不确定x86 U-Boot和内核使用什么(例如,ARM使用映像或zImage文件而不是vmlinux),但只有自解压内核才会执行您提到的代码。其他拱门/机器允许指定调试串行端口。对于x86,它看起来默认为端口0x3f8处的UART;请参阅arch/x86/boot/early_serial__console.c。检查SoC和电路板规格;您是否连接到了正确的引脚,或者您必须破解该模块?“这是带有gzip压缩的bzimage”-makefile说它是bzimage。看起来x86与ARM在早期打印方面有很大不同。显然,您需要指定命令行参数
earlyprintk=/dev/tty…
,以获取解压缩消息。在ARM上,这是由一个单独的串行端口配置来处理的,并且earlyprintk直到init_kernel()启动后才生效。不幸的是,如果没有COM1/COM2(传统ttyS0/ttyS1)端口,这在x86上不起作用。例如,关于英特尔爱迪生。我在我的本地树中有一些黑客,将在稍后有时间时提供支持。顺便说一句,
earlyprintk
是一个遗留的东西,我们需要支持
earlycon
@AndyShevchenko-“在缺少COM1/COM2的情况下,这在x86上不起作用…”-您可以在参数参数中指定任何串行端口。“earlyprintk是一个遗留的东西”--我仍然在Linux内核(当前)版本4.6的x86引导代码中看到
\if CONFIG_EARLY_PRINTK
,因此它没有被弃用。不,您只能指定这两个:。是的,因为缺少对earlycon的支持。
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.