How to enable the console in upstream Linux kernel 6.1

Hi,

I have a RockPi 4 Plus V1.72. How do I enable the console to consequently reach the login prompt?

I am able to boot it in OpenWrt with the upstream Linux kernel 6.1. I get kernel output through a USB <-> Serial port adapter connected to GPIO pins 6/8/10.

This is the inittab configuration:

root@OpenWrt:/# cat /etc/inittab                                                                                               
::sysinit:/etc/init.d/rcS S boot                                                                                               
::shutdown:/etc/init.d/rcS K shutdown                                                                                          
ttyAMA0::askfirst:/usr/libexec/login.sh                                                                                        
ttyS0::askfirst:/usr/libexec/login.sh                                                                                          
tty0::askfirst:/usr/libexec/login.sh                                                                                           
hvc0::askfirst:/usr/libexec/login.sh                                                                                           
ttymxc0::askfirst:/usr/libexec/login.sh                                                                                        
ttymxc1::askfirst:/usr/libexec/login.sh                                                                                        
ttymxc2::askfirst:/usr/libexec/login.sh                                                                                        
ttyPS1::askfirst:/usr/libexec/login.sh                                                                                         
ttyFIQ0::askfirst:/usr/libexec/login.sh

Sharing the kernel output and kernel configuration at

I would have submitted the files here, but I am not allowed as I am a new user.

I am replying to myself for future reference. To enable the console in a Rock Pi 4 serial port, it’s required to add CONFIG_KGDB to the kernel config, which enables CONFIG_KGDB_SERIAL_CONSOLE and then add ttyS2::askfirst:/usr/libexec/login.sh.