I enabled the serial console on a pi3 by adding to /boot/config.txt
further, in /boot/cmdline.txt I modified
console=serial0,115200 to console=ttyAMA0,115200
This gives me a serial console on pin6 = GND pin8 = TXD pin10 = RXD
The login prompt only appears when rc.local has finished.
The purpose of the setup is to debug a read only system. Occasionally such a pi can not be accessed using a ssh client. After a power cycle, things start to work normally.
I had hoped to use the serial console on such a system to log in and check the logfiles. The system uses busybox syslogd so it's logging is using a ram buffer. Upon a reboot or power cycle, the loggings are gone.
There are approx 20 systems running like that, and one not starting up is happening randomly. So, changing the setup to a "logging 2 usb" is an option I would prefer 2 avoid.
So, the question. How can I get a serial console login prompt as early as possible in the boot process?
Some custom programs are started in rc.local. If they cause rc.local to hang, I won't be able to login serially to find out what goes wrong.