From 04f5bbd64768f959d8ef524c0cdb8f4bddf6eaba Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 15 Sep 2004 06:38:55 +0000 Subject: [PATCH] Add Solaris serial support. --- src/misc/bochs-2.1.1.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/misc/bochs-2.1.1.patch b/src/misc/bochs-2.1.1.patch index beaf71e..3433724 100644 --- a/src/misc/bochs-2.1.1.patch +++ b/src/misc/bochs-2.1.1.patch @@ -7,6 +7,11 @@ implicit int return type is forbidden in C++. The third patch makes the gdb stubs work on Solaris/Sparc, by doing proper byteswapping. +The fourth patch enables the serial device under Solaris and disables +tty setup at the same time. Tty setup is a pain when you want to +connect a serial port to stdout and it doesn't work under Solaris +anyway. + diff -urp orig/bochs-2.1.1/Makefile.in bochs-2.1.1/Makefile.in --- orig/bochs-2.1.1/Makefile.in 2004-02-11 14:28:02.000000000 -0800 +++ bochs-2.1.1/Makefile.in 2004-09-13 15:05:26.281550000 -0700 @@ -113,3 +118,30 @@ diff -urp orig/bochs-2.1.1/gdbstub.cc bochs-2.1.1/gdbstub.cc mem2hex((char *)registers, obuf, NUMREGSBYTES); put_reply(obuf); break; +--- tmp/bochs-2.1.1/iodev/serial.cc 2004-02-11 14:28:54.000001000 -0800 ++++ bochs-2.1.1/iodev/serial.cc 2004-09-14 23:02:04.000001000 -0700 +@@ -53,7 +53,7 @@ + #endif + #endif + +-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || defined(__GNU__) || defined(__APPLE__) ++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || defined(__GNU__) || defined(__APPLE__) || defined(__sun__) + #define SERIAL_ENABLE + #endif + +@@ -122,6 +122,7 @@ + if (tty_id < 0) + BX_PANIC(("open of %s (%s) failed\n", + "com1", bx_options.com[0].Odev->getptr ())); ++#if 0 + BX_DEBUG(("tty_id: %d",tty_id)); + tcgetattr(tty_id, &term_orig); + bcopy((caddr_t) &term_orig, (caddr_t) &term_new, sizeof(struct termios)); +@@ -145,6 +146,7 @@ + term_new.c_cc[VTIME] = 0; + //term_new.c_iflag |= IXOFF; + tcsetattr(tty_id, TCSAFLUSH, &term_new); ++#endif + } + #endif /* def SERIAL_ENABLE */ + // nothing for now -- 2.30.2