Embedded Linux | Make Linux boot information displayed on the LCD & set the LCD screen as a terminal console

The startup information of linux is only displayed on the HyperTerminal at first, and the displayed information can be displayed on the LCD through the following steps. (The premise is that the LCD driver has been ported to the kernel) It is necessary to modify the startup parameter information in the bootloader.

1. The default serial port display

setenv bootargs 'console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw'
saveenv

2. Display on LCD

setenv bootargs 'console=tty0,115200 root=/dev/mmcblk1p2 rootwait rw'
saveenv

3. Simultaneous display on LCD and serial port

setenv bootargs 'console=tty0 console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw'
saveenv

Set tty0 as the console (LCD screen) for the first time, and set tttymxc0 as the console (serial port) for the second time. The two can display the terminal at the same time, but the LCD screen terminal cannot interact at this time.

Start the kernel to see the effect:

4. Set the LCD screen as the terminal console

Modify the /etc/inittab file and add a line:

tty0::askfirst:-/bin/sh

After the modification, save /etc/inittab and exit, then restart the development board. After restarting, the last line of the LCD screen of the development board will display the following line:

Please press Enter to activate this console.

Press the Enter key to enter the terminal, and use the USB external keyboard to interact normally.

Guess you like

Origin blog.csdn.net/qq_39400113/article/details/128424290