openbmc / obmc-console

OpenBMC host console infrastructure
Apache License 2.0
17 stars 25 forks source link

Support for both host and bmc console on single UART port #11

Closed rlippert closed 3 years ago

rlippert commented 7 years ago

Zaius BMC has 2 hardware serial ports, ttyS4 for BMC and ttyS0 for host. But only ttyS0 is easily accessible from the front of the machine which means in practice the BMC console is not used very much.

I have a small patchset to tty-handler.c which optionally allows obmc-console-server to listen for and match a "break" sequence that when sent places a getty on ttyS0 to allow interacting with the BMC console. When the getty exits the ttyS0 returns to acting like the host serial port.

This effectively allows both the BMC and host console to exist on the single UART port (once the BMC has booted successfully and launched obmc-console-server).

I'll send out the patch soon once it is cleaned up and tested a bit more in case it is useful to other folks.

zhuysh1988 commented 5 years ago

Can you provide your patch?

pzh2386034 commented 3 years ago

hi, where can i find you patch?It is useful and interesting

rlippert commented 3 years ago

This has been effectively commited with the changes to https://github.com/openbmc/obmc-console/commits/master/console-client.c by wak-google.

The code will watch for a specified escape sequence and then exit with a return special return code. A supervising systemd unit or other script can then launch a BMC shell based on the exit value.