From 5821ad0dea8ab0c667a3a7839eba0c2c58ea21e5 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Tue, 3 Jul 2012 15:04:38 -0600 Subject: [PATCH] modify eggsh to always open /dev/REG which can be symlinked to the actual device, so that we can use USB serial ports, etc --- debian/README.debian | 20 +++++++++++++------- debian/changelog | 3 +++ hw_pear.c | 2 +- reg_orion.c | 2 +- reg_pear.c | 2 +- sample.eggrc | 3 +++ 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/debian/README.debian b/debian/README.debian index 1dd777c..ee8d99d 100644 --- a/debian/README.debian +++ b/debian/README.debian @@ -1,3 +1,16 @@ +The upstream source assumes you will use a traditional hard-wired serial +port, but those are getting rare. Rather than refactor the code, I've just +made the Debian package always open the device /dev/REG. All you need to +do is symlink this to whatever your actual serial port is with something like: + + cd /dev + ln -s ttyUSB0 REG + +The 'port' field in the REG line of the eggrc file will be ignored, so just +leave it set to '0'. + + - - - - - + If the EGG computer is behind a firewall, it must be programmed to allow UDP packets on port 2510 outgoing packet and UDP port 1105 for an incoming connection. @@ -8,10 +21,3 @@ to be transmitted. What happens is that your program sends an responds with a "data request" packet, and then the EGG program will send the data. - - - - - - - -This package is known to compile but not run successfully on at -least the amd64 architecture. The only architecture it has really -been tested on is i386... If anyone is sufficiently motivated -to chase down and fix whatever the problem is, patches would be -welcomed! diff --git a/debian/changelog b/debian/changelog index 0d8dabe..d074e77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,11 @@ gcpegg (5.1-12.64) UNRELEASED; urgency=low * merge 64-bit fixes from Fernando Lucas Rodriguez , closes: #680014 + * fix additional 64-bit isms in the UI code * revise dependency to be kbd | console-tools to ease backport support * unqualify openvt path in init.d to tolerate /bin vs /usr/bin + * enable the use of USB serial ports, etc, by making eggsh always open + /dev/REG, which is now assumed to be a symlink to the actual device -- Bdale Garbee Mon, 02 Jul 2012 14:59:55 -0600 diff --git a/hw_pear.c b/hw_pear.c index 401d307..f7d4e99 100644 --- a/hw_pear.c +++ b/hw_pear.c @@ -87,7 +87,7 @@ int32 OpenDev(DevOpts *opts) { designating /dev/term/a. */ sprintf(ttydev, "/dev/term/%c", 'a' + (opts->port - 1)); #else - sprintf(ttydev, "/dev/ttyS%d", opts->port); + sprintf(ttydev, "/dev/REG", opts->port); #endif switch(opts->baud) { diff --git a/reg_orion.c b/reg_orion.c index c88ac38..b3985b8 100644 --- a/reg_orion.c +++ b/reg_orion.c @@ -97,7 +97,7 @@ static int32 OpenDev(DevOpts *opts) { sprintf(ttydev, "/dev/term/%c", 'a' + (opts->port - 1)); #endif #else - sprintf(ttydev, "/dev/ttyS%d", opts->port); + sprintf(ttydev, "/dev/REG", opts->port); #endif switch(opts->baud) { diff --git a/reg_pear.c b/reg_pear.c index 7bb7c5c..0ff3299 100644 --- a/reg_pear.c +++ b/reg_pear.c @@ -77,7 +77,7 @@ static int32 OpenDev(DevOpts *opts) { sprintf(ttydev, "/dev/term/%c", 'a' + (opts->port - 1)); #endif #else - sprintf(ttydev, "/dev/ttyS%d", opts->port); + sprintf(ttydev, "/dev/REG", opts->port); #endif switch(opts->baud) { diff --git a/sample.eggrc b/sample.eggrc index 3fd961d..4ce300c 100644 --- a/sample.eggrc +++ b/sample.eggrc @@ -38,6 +38,9 @@ # this time. Port is serial port number (e.g. 1 for /dev/ttyS1); # is baud rate. # +# NOTE: in Debian, the device opened is always /dev/REG! +# Symlink that to whatever your actual serial device is. +# # NETUP