Hi experts,
On Lx2160ardb Rev2.0 board, there are two UART ports on the front panel named UART1 and UART2,
and stdout uses UART1 by default.
And I want to know how to verify the UART2.
Thanks,
Zhantao
Hello Zhantao,
You could specify Linux Kernel bootargs as "console=ttyAMA1,115200" to boot up Linux Kernel from UART2.
Thanks,
Yiping
Hi Yiping,
Glad to recieve your reply.
I have test what you suggested, but UART2 can not show anything, like the following:
=> env edit bootargs
edit: console=ttyAMA1,115200 earlycon=pl011,mmio32,0x21d0000 root=/dev/mmcblk0p2 rw no_console_suspend ip=dhcp crashkernel=512M selinux=0 enforcing=0
=> env save
Saving Environment to SPI Flash... Erasing SPI flash...Writing to SPI flash...done
OK
=> boot
SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB
device 0 offset 0x6c0000, size 0x40000
SF: 262144 bytes @ 0x6c0000 Read: OK
device 0 offset 0xd00000, size 0x100000
SF: 1048576 bytes @ 0xd00000 Read: OK
18008576 bytes read in 889 ms (19.3 MiB/s)
32500 bytes read in 21 ms (1.5 MiB/s)
## Flattened Device Tree blob at 90000000
Booting using the fdt blob at 0x90000000
Loading Device Tree to 000000009fff5000, end 000000009ffffef3 ... OK
fsl-mc: Deploying data path layout ... SUCCESS
Starting kernel ...
After Starting Kernel ... statement, there is nothing comes out for UART2.
Thanks
(1)Linux boot log comes on UART1 console
(2)On linux prompt,Type following command to switch UART2 console
sh -c "getty 115200 /dev/ttyAMA1;true"
(3)Following prompt on UART2 console
QorIQ SDK (FSL Reference Distro) 2.4.2 lx2160ardb /dev/ttyAMA1
lx2160ardb login: root
Last login: Thu May 31 08:40:06 UTC 2018 on ttyAMA0
root@lx2160ardb:~#
Thanks Yiping.
I just test the steps you give.
1. boot the board on UART1,
2. in Linux prompt, type the following command:
sh -c "getty 115200 /dev/ttyAMA1;true"
but there is nothing in console neither on UART1 nor UART2
root@nxp-lx2xxx:~# sh -c "getty 115200 /dev/ttyAMA1;true"
The steps above are right?
Thanks,
Zhantao
Please modify Linux Kernel dts file as the following.
chosen {
stdout-path = "serial0:115200n8";
};
=>
chosen {
stdout-path = "serial1:115200n8";
};
Hi Yiping,
Thanks for your reply.
You mean set the lx2160ardb board dts to be like the following in fsl-lx2160a-rdb.dts?
aliases {
crypto = &crypto;
serial0 = &uart0;
};
=>
aliases {
crypto = &crypto;
serial0 = &uart1;
};
I tested that, but still failed.
Thanks,
Zhantao
After modifying the dts file as mentioned above.
Please configure bootargs as the following "console=ttyAMA1,115200 earlycon=pl011,mmio32,0x21d0000".
Hi Yiping,
I will try again as you suggested.
Thanks,
Zhantao