I am unable to get a terminal on the serial port (pins 6-10). Following the solution in [1], I activated the /dev/tty2 overlay:
Retrieving file: /hw_intfc.conf
reading /hw_intfc.conf
1152 bytes read in 2 ms (562.5 KiB/s)
dtoverlay number: 0, name:/overlays/console-on-ttyS2.dtbo
Using anything but /dev/ttyS2 in the kernel command line results in output stopping after “Starting kernel …”, so I assume that ttyS2 is the right value, even if the kernel log shows only ttyS0.
Finally, /etc/inittab contains a line for a terminal on /dev/ttyS2, but a console is never opened.
I am running out of ideas, so would be grateful for pointers in the right direction.
Some background information: I managed to integrate the Radxa kernel, u-boot and arm firmware into a Buildroot project. The root file system is not derived from Debian, but Buildroot generated. Init system is handled by BusyBox.
Hi Jim, my kernel output is essentially OK; using the overlay it continues even after kernel startup. I just cannot get a login prompt after /sbin/init finishes (sorry for being unclear).
My current extlinux.conf says [1]:
append console=ttyS2,1500000n8 quiet
and /etc/inittab:
# Put a getty on the serial port
ttyS2::respawn:/sbin/getty -L ttyS2 0 vt100 # GENERIC_SERIAL
But I will definitely try your suggestion to to use ttyS2 without the overlay, it sounds promising.
I tried some variations of overlays, kernel parameters and serial lines, with the following results:
ttyS2 must be enabled, either via overlay or directly in the dtb
Kernel parameter has to be /dev/ttyS2, I was not able to get other settings to work
Within the RockPi4b, only ttyFIQ0 and ttyS0 are connected
Output to /dev/ttyFIQ0 shows up on the other end of the serial connection
I can start an interactive shell from the RockPi4b to the connected host by executing [1]
sh --login < /dev/ttyFIQ0 > /dev/ttyFIQ0
Using getty does not open a terminal over any of the serial devices and only a getty for /dev/tty0 shows up in ps (waiting for a login). All other invocations do not spawn and terminate without message
su daemon -c "getty -L 0 ttyS0"
So it is probably a problem with getty from BusyBox. I will see if I can find anything within this context
…
OK, Problem found.
My build process overwrites inittab with Buildroot configuration values. I now have the serial port configured in Buildroot .config and finally there is a login prompt on the serial console.
# Put a getty on the serial port
ttyFIQ0::respawn:/sbin/getty -L ttyFIQ0 0 vt100 # GENERIC_SERIAL
I know this doesn’t solve the issue with minicom, but screen seems to work pretty well. I tried it with Rock Pi S under Debian. With minicom I had the same no login prompt issue.