aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.hgignore1
-rw-r--r--config/Tools.mk.in1
-rwxr-xr-xtools/configure26
-rw-r--r--tools/configure.ac1
-rw-r--r--tools/misc/Makefile1
-rw-r--r--tools/misc/miniterm/Makefile22
-rw-r--r--tools/misc/miniterm/README13
-rw-r--r--tools/misc/miniterm/miniterm.c195
9 files changed, 0 insertions, 261 deletions
diff --git a/.gitignore b/.gitignore
index 62462b4b1f..0828f6b25a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -216,7 +216,6 @@ tools/misc/mbootpack/bootsect
tools/misc/mbootpack/bzimage_header.c
tools/misc/mbootpack/mbootpack
tools/misc/mbootpack/setup
-tools/misc/miniterm/miniterm
tools/misc/xc_shadow
tools/misc/xen_cpuperf
tools/misc/xen-detect
diff --git a/.hgignore b/.hgignore
index 9822a8d069..2abf39816a 100644
--- a/.hgignore
+++ b/.hgignore
@@ -209,7 +209,6 @@
^tools/misc/mbootpack/bzimage_header\.c$
^tools/misc/mbootpack/mbootpack$
^tools/misc/mbootpack/setup$
-^tools/misc/miniterm/miniterm$
^tools/misc/xc_shadow$
^tools/misc/xen_cpuperf$
^tools/misc/xen-detect$
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index bb3acbd515..7a0845ac0e 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -47,7 +47,6 @@ XENSTAT_XENTOP := @monitors@
LIBXENAPI_BINDINGS := @xenapi@
OCAML_TOOLS := @ocamltools@
FLASK_POLICY := @xsmpolicy@
-CONFIG_MINITERM := @miniterm@
CONFIG_LOMOUNT := @lomount@
CONFIG_OVMF := @ovmf@
CONFIG_ROMBIOS := @rombios@
diff --git a/tools/configure b/tools/configure
index b52dd2a528..9d66568265 100755
--- a/tools/configure
+++ b/tools/configure
@@ -660,7 +660,6 @@ seabios
rombios
ovmf
lomount
-miniterm
xsmpolicy
ocamltools
xenapi
@@ -729,7 +728,6 @@ enable_monitors
enable_xenapi
enable_ocamltools
enable_xsmpolicy
-enable_miniterm
enable_lomount
enable_ovmf
enable_rombios
@@ -1390,7 +1388,6 @@ Optional Features:
--enable-xenapi Enable Xen API Bindings (default is DISABLED)
--disable-ocamltools Disable Ocaml tools (default is ENABLED)
--disable-xsmpolicy Disable XSM policy compilation (default is ENABLED)
- --enable-miniterm Enable miniterm (default is DISABLED)
--enable-lomount Enable lomount (default is DISABLED)
--enable-ovmf Enable OVMF (default is DISABLED)
--disable-rombios Disable ROM BIOS (default is ENABLED)
@@ -3519,29 +3516,6 @@ xsmpolicy=$ax_cv_xsmpolicy
-# Check whether --enable-miniterm was given.
-if test "${enable_miniterm+set}" = set; then :
- enableval=$enable_miniterm;
-fi
-
-
-if test "x$enable_miniterm" = "xno"; then :
-
- ax_cv_miniterm="n"
-
-elif test "x$enable_miniterm" = "xyes"; then :
-
- ax_cv_miniterm="y"
-
-elif test -z $ax_cv_miniterm; then :
-
- ax_cv_miniterm="n"
-
-fi
-miniterm=$ax_cv_miniterm
-
-
-
# Check whether --enable-lomount was given.
if test "${enable_lomount+set}" = set; then :
enableval=$enable_lomount;
diff --git a/tools/configure.ac b/tools/configure.ac
index f629318d44..5425740609 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -53,7 +53,6 @@ AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
AX_ARG_DEFAULT_DISABLE([xenapi], [Enable Xen API Bindings])
AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
-AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 9c69e0d0f2..2bb3710092 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -15,7 +15,6 @@ TARGETS-$(CONFIG_MIGRATE) += xen-hptool
TARGETS := $(TARGETS-y)
SUBDIRS-$(CONFIG_LOMOUNT) += lomount
-SUBDIRS-$(CONFIG_MINITERM) += miniterm
SUBDIRS := $(SUBDIRS-y)
INSTALL_BIN-y := xencons xencov_split
diff --git a/tools/misc/miniterm/Makefile b/tools/misc/miniterm/Makefile
deleted file mode 100644
index 5c5f561393..0000000000
--- a/tools/misc/miniterm/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-XEN_ROOT:=$(CURDIR)/../../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-TARGET = miniterm
-
-.PHONY: all
-all: $(TARGET)
-
-.PHONY: install
-install: all
- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
- $(INSTALL_PROG) $(TARGET) $(DESTDIR)$(BINDIR)
-
-.PHONY: install-recurse
- : No sense in installing miniterm on the Xen box.
-
-.PHONY: clean
-clean:
- $(RM) *.o $(TARGET) *~
-
-$(TARGET): $(TARGET).c
- $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
diff --git a/tools/misc/miniterm/README b/tools/misc/miniterm/README
deleted file mode 100644
index 2ca4501e9f..0000000000
--- a/tools/misc/miniterm/README
+++ /dev/null
@@ -1,13 +0,0 @@
-This is a modified version of the miniterm program distributed as part
-of the Linux Programmer's Guide (LPG) by Sven Goldt.
-
-It is intended to be used as a dumb raw terminal for debugging Xen
-machines over the serial line.
-
-By default it will connect to COM1 (/dev/ttyS0) at 115200 baud.
-These options can be modified as follows:
- miniterm [-b<baudrate>] [-d<devicename>]
-
-'ctrl-b' quits miniterm.
-
- -- Keir Fraser (21/9/2003) \ No newline at end of file
diff --git a/tools/misc/miniterm/miniterm.c b/tools/misc/miniterm/miniterm.c
deleted file mode 100644
index 3f8043da0b..0000000000
--- a/tools/misc/miniterm/miniterm.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/******************************************************************************
- * miniterm.c
- *
- * Adapted from the example program distributed with the Linux Programmer's
- * Guide (LPG). This has been robustified and tweaked to work as a debugging
- * terminal for Xen-based machines.
- *
- * Modifications are released under GPL and copyright (c) 2003, K A Fraser
- * The original copyright message and license is fully intact below.
- */
-
-/*
- * AUTHOR: Sven Goldt (goldt@math.tu-berlin.de)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#include <termios.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <string.h>
-
-#define DEFAULT_BAUDRATE 115200
-#define DEFAULT_SERDEVICE "/dev/ttyS0"
-#define ENDMINITERM 0x1d
-
-volatile int stop = 0;
-
-void child_handler(int s)
-{
- stop = 1;
-}
-
-int cook_baud(int baud)
-{
- int cooked_baud = 0;
- switch ( baud )
- {
- case 50: cooked_baud = B50; break;
- case 75: cooked_baud = B75; break;
- case 110: cooked_baud = B110; break;
- case 134: cooked_baud = B134; break;
- case 150: cooked_baud = B150; break;
- case 200: cooked_baud = B200; break;
- case 300: cooked_baud = B300; break;
- case 600: cooked_baud = B600; break;
- case 1200: cooked_baud = B1200; break;
- case 1800: cooked_baud = B1800; break;
- case 2400: cooked_baud = B2400; break;
- case 4800: cooked_baud = B4800; break;
- case 9600: cooked_baud = B9600; break;
- case 19200: cooked_baud = B19200; break;
- case 38400: cooked_baud = B38400; break;
- case 57600: cooked_baud = B57600; break;
- case 115200: cooked_baud = B115200; break;
- }
- return cooked_baud;
-}
-
-int main(int argc, char **argv)
-{
- int fd, c, cooked_baud = cook_baud(DEFAULT_BAUDRATE);
- char *sername = DEFAULT_SERDEVICE;
- struct termios oldsertio, newsertio, oldstdtio, newstdtio;
- struct sigaction sa;
- static char start_str[] =
- "************ REMOTE CONSOLE: CTRL-] TO QUIT ********\r\n";
- static char end_str[] =
- "\n************ REMOTE CONSOLE EXITED *****************\n";
-
- while ( --argc != 0 )
- {
- char *p = argv[argc];
- if ( *p++ != '-' )
- goto usage;
- if ( *p == 'b' )
- {
- p++;
- if ( (cooked_baud = cook_baud(atoi(p))) == 0 )
- {
- fprintf(stderr, "Bad baud rate '%d'\n", atoi(p));
- goto usage;
- }
- }
- else if ( *p == 'd' )
- {
- sername = ++p;
- if ( *sername == '\0' )
- goto usage;
- }
- else
- goto usage;
- }
-
- /* Not a controlling tty: CTRL-C shouldn't kill us. */
- fd = open(sername, O_RDWR | O_NOCTTY);
- if ( fd < 0 )
- {
- perror(sername);
- exit(-1);
- }
-
- tcgetattr(fd, &oldsertio); /* save current modem settings */
-
- /*
- * 8 data, no parity, 1 stop bit. Ignore modem control lines. Enable
- * receive. Set appropriate baud rate. NO HARDWARE FLOW CONTROL!
- */
- newsertio.c_cflag = cooked_baud | CS8 | CLOCAL | CREAD;
-
- /* Raw input. Ignore errors and breaks. */
- newsertio.c_iflag = IGNBRK | IGNPAR;
-
- /* Raw output. */
- newsertio.c_oflag = OPOST;
-
- /* No echo and no signals. */
- newsertio.c_lflag = 0;
-
- /* blocking read until 1 char arrives */
- newsertio.c_cc[VMIN]=1;
- newsertio.c_cc[VTIME]=0;
-
- /* now clean the modem line and activate the settings for modem */
- tcflush(fd, TCIFLUSH);
- tcsetattr(fd,TCSANOW,&newsertio);
-
- /* next stop echo and buffering for stdin */
- tcgetattr(0,&oldstdtio);
- tcgetattr(0,&newstdtio); /* get working stdtio */
- newstdtio.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
- newstdtio.c_oflag &= ~OPOST;
- newstdtio.c_cflag &= ~(CSIZE | PARENB);
- newstdtio.c_cflag |= CS8;
- newstdtio.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
- newstdtio.c_cc[VMIN]=1;
- newstdtio.c_cc[VTIME]=0;
- tcsetattr(0,TCSANOW,&newstdtio);
-
- /* Terminal settings done: now enter the main I/O loops. */
- switch ( fork() )
- {
- case 0:
- close(1); /* stdout not needed */
- for ( c = (char)getchar(); c != ENDMINITERM; c = (char)getchar() )
- write(fd,&c,1);
- tcsetattr(fd,TCSANOW,&oldsertio);
- tcsetattr(0,TCSANOW,&oldstdtio);
- close(fd);
- exit(0); /* will send a SIGCHLD to the parent */
- break;
- case -1:
- perror("fork");
- tcsetattr(fd,TCSANOW,&oldsertio);
- close(fd);
- exit(-1);
- default:
- write(1, start_str, strlen(start_str));
- close(0); /* stdin not needed */
- sa.sa_handler = child_handler;
- sa.sa_flags = 0;
- sigaction(SIGCHLD,&sa,NULL); /* handle dying child */
- while ( !stop )
- {
- read(fd,&c,1); /* modem */
- c = (char)c;
- write(1,&c,1); /* stdout */
- }
- wait(NULL); /* wait for child to die or it will become a zombie */
- write(1, end_str, strlen(end_str));
- break;
- }
-
- return 0;
-
- usage:
- printf("miniterm [-b<baudrate>] [-d<devicename>]\n");
- printf("Default baud rate: %d\n", DEFAULT_BAUDRATE);
- printf("Default device: %s\n", DEFAULT_SERDEVICE);
- return 1;
-}