server: allow setting baud rate on host tty

The Nuvoton NPCM7xx series BMCs have a real UART which receives output
from the host serial console, rather than a virtual UART as on Aspeed
parts. This means we have to set the baud rate of the tty to match the
host console.

This change adds the "baud" config option. If it is present in the
config file and has a valid value, the host console tty's baud rate will
be set to that value.

Change-Id: If2156c2032e7527709713f13654ce8bca9bf4c1d
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
2 files changed
tree: 4aa384fd9f0c0b1d76121c1bc8b9ae43dfac255e
  1. test/
  2. .travis.yml
  3. bootstrap.sh
  4. config.c
  5. configure.ac
  6. console-client.c
  7. console-server.c
  8. console-server.h
  9. console-socket.c
  10. LICENSE
  11. log-handler.c
  12. MAINTAINERS
  13. Makefile.am
  14. obmc-console.conf.sample
  15. README.md
  16. ringbuffer.c
  17. socket-handler.c
  18. tty-handler.c
  19. util.c
README.md

To Build

Note: In addition to a toolchain and autoconf tools, this requires autotools-archive to be installed.

To build this project, run the following shell commands:

./bootstrap.sh
./configure ${CONFIGURE_FLAGS}
make

To fully clean the repository, run:

./bootstrap.sh clean

To Run Server

Running the server requires a serial port (e.g. /dev/ttyS0):

touch obmc-console.conf
./obmc-console-server --config obmc-console.conf ttyS0

To Connect Client

To connect to the server, simply run the client:

./obmc-console-client

To disconnect the client, use the standard ~. combination.