epidose icon indicating copy to clipboard operation
epidose copied to clipboard

Enable serial console on boot

Open konasimakopoulos opened this issue 4 years ago • 10 comments

The RPi serial port is user accessible on the final PCB. If the Ansible script was modified to enable it and thus allow shell access, it would significantly help with debugging.

konasimakopoulos avatar Dec 10 '20 10:12 konasimakopoulos

@stefanos1316 please make it happen.

dspinellis avatar Dec 14 '20 17:12 dspinellis

@konasimakopoulos I find that adding this variable from /boot/config.txt will enable it enable_uart=1. I guess this is what you need, right?

stefanos1316 avatar Dec 14 '20 17:12 stefanos1316

@stefanos1316 : Please work on each on a separate branch, so that multiple PRs can be open together.

dspinellis avatar Dec 14 '20 17:12 dspinellis

@stefanos1316: Yes, that should be all that is needed (but please also check the cmdline.txt file to make sure that the kernel is configured to output console messages on the serial port).

konasimakopoulos avatar Dec 14 '20 17:12 konasimakopoulos

@dspinellis ok, I have submitted a PR on a different branch.

stefanos1316 avatar Dec 14 '20 17:12 stefanos1316

@konasimakopoulos according to this document there are two serial ports for RPi Zero. I guess I should enable/configure the primary (PL011), right?

stefanos1316 avatar Dec 14 '20 17:12 stefanos1316

Yes, that is correct!

konasimakopoulos avatar Dec 14 '20 17:12 konasimakopoulos

@konasimakopoulos according to some guides that I read (1) by just adding the mentioned line will do the magic. Also, what you need in cmdline.txt is this "console=serial0,115200 console=tty1". I have checked RPi3 and RPi Zero, and both of them has it enabled. Unfortunately, I do not have a port to test it out. Any idea if I can do it in a different way?

stefanos1316 avatar Dec 14 '20 18:12 stefanos1316

Just checked on a RPi Zero (SD with 2020-12-02-raspios-buster-armhf-lite). Just appending "enable_uart=1" to /boot/config.txt will enable the serial port after a reboot.

konasimakopoulos avatar Dec 14 '20 18:12 konasimakopoulos

Great, thanks @konasimakopoulos . I have submitted a PR addressing this issue.

stefanos1316 avatar Dec 14 '20 18:12 stefanos1316