[manual index][section index]

NAME

rdbgsrv - remote debug server

SYNOPSIS

bind -b '#t' /dev

auxi/rdbgsrv [ -dn ] [ -sbaud ] [ -fdev ] mountpoint

DESCRIPTION

Rdbgsrv is intended for use with versions of sboot(10.8) that do not use styxmon(10.8), but serve Styx directly. Rdbgsrv interposes itself between dev (default: /dev/eia0) and mountpoint to convey Styx messages via the serial port to and from a Styx server program running on a board running native Inferno. The -f option specifies the serial device; the default is /dev/eia0. The -s option sets the line speed; the default is 38400 baud. The -d option selects debugging options by a bit mask: 1, print trace of Styx message types; 2, print actual Styx message contents.

The monitor program on the board must be started first. Rdbgsrv writes the two byte message go, and keeps reading the device until it sees the reply ok. It then attempts to mount the exported name space, and copies Styx messages to and from the device.

Once rdbgsrv is running, several device files provided by the program will be visible at mountpoint. The files include flash partitions, a console file, and a file representing temporary storage in the device's memory:


sbootconsole
Accepts sboot(10.8) commands. When read, it returns output from recent commands.
tmp
Temporary memory buffer that accepts data to be copied to the flash.
F!partition
Represents the flash partition with the name partition.

The following example Inferno session on the host mounts the serial device on /n/rdbg, and sends commands by writing to /n/rdbg/sbootconsole.

% bind -b '#t' /dev           # ensure /dev/eia0 is visible
% auxi/rdbgsrv /n/rdbg
% ls /n/rdbg
/n/rdbg/F!kern
/n/rdbg/F!fs
/n/rdbg/sbootconsole
/n/rdbg/tmp
% cp /os/sa1100/isword.p9.gz /n/rdbg/F!kern # copy kernel
% cp /tmp/fs.tgz /n/rdbg/tmp  # copy compressed file system
% echo c/u T! F!fs >/n/rdbg/sbootconsole
% cat /n/rdbg/sbootconsole
% echo P >/n/rdbg/sbootconsole
% echo b F!kern >/n/rdbg/sbootconsole       # boot from F!kern

Copying a file containing sboot commands to /n/rdbg/sbootconsole has the same effect as writing the individual commands to the console.

SOURCE

/appl/auxi/rdbgsrv.b

SEE ALSO

sboot(10.8), styxmon(10.8)

BUGS

No error recovery is applied, let alone error correction.

RDBGSRV(8 ) Rev:  Thu Feb 15 14:43:55 GMT 2007