UART console is being disabled when kernel boots

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART console is being disabled when kernel boots

Jump to solution
8,581 Views
brandensherrell
Contributor III

When successfully booting the kernel it seems to switch output consoles. A truncated (tail) version of the kernel boot logs:

...

[ 0.000003] sched_clock: 56 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns
[ 0.008312] Console: colour dummy device 80x25
[ 0.012772] console [tty0] enabled
[ 0.016185] bootconsole [uart0] disabled

I was expecting the first serial object to enumerate as the first uart (i.e. ttyS0 -> uart0). It seems I am either making incorrect assumptions or improperly passing parameters to the kernel. This bootargs string was taken directly from the SDK documentation. The bootscript I am using is as follows: 

setenv bootargs “console=ttyS0,115200, root=/dev/ram0 earlycon=uart8250,0x21C0500”;
setenv fdt_high 0xFFFFFFFFFFFFFFFF
setenv initrd_high 0xFFFFFFFFFFFFFFFF
cp.b 0x60A00000 0x81000000 0x3500000
esbc_validate 0x63F40000
bootm $img_addr

Documentation for the `console` kernel parameter indicate that the first virtual terminal (tty0) will be used as the kernel's console by default if not otherwise given. The second to last kernel print seems to exhibit this behavior indicating it has switched to a virtual console by default. 

[ 0.012772] console [tty0] enabled

However, the kernel printed its parameters earlier in the boot log and they are as expected

...

[ 0.000000] PERCPU: Embedded 18 pages/cpu @ffff80007fd84000 s33856 r8192 d31680 u73728
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 515592
[ 0.000000] Kernel command line: “console=ttyS0,115200, root=/dev/ram0 earlycon=uart8250,0x21C0500”
[ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[ 0.000000] log_buf_len total cpu_extra contributions: 12288 bytes

...

Labels (1)
0 Kudos
1 Solution
5,648 Views
brandensherrell
Contributor III

Well, it turns out that the kernel does not like quotations in its parameter list. That said, the solution was to simply remove them. I also removed an extraneous trailing comma after the console baud rate. Consider the new, working bootscript. 

setenv bootargs console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,0x21C0500
setenv fdt_high 0xFFFFFFFFFFFFFFFF
setenv initrd_high 0xFFFFFFFFFFFFFFFF
cp.b 0x60A00000 0x81000000 0x3500000
esbc_validate 0x63F40000
bootm $img_addr

View solution in original post

0 Kudos
1 Reply
5,649 Views
brandensherrell
Contributor III

Well, it turns out that the kernel does not like quotations in its parameter list. That said, the solution was to simply remove them. I also removed an extraneous trailing comma after the console baud rate. Consider the new, working bootscript. 

setenv bootargs console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,0x21C0500
setenv fdt_high 0xFFFFFFFFFFFFFFFF
setenv initrd_high 0xFFFFFFFFFFFFFFFF
cp.b 0x60A00000 0x81000000 0x3500000
esbc_validate 0x63F40000
bootm $img_addr

0 Kudos