Date: Tue, 26 Nov 1996 00:08:22 GMT Server: NCSA/1.5.2 Last-modified: Mon, 29 Jan 1996 15:38:25 GMT Content-type: text/html Content-length: 21535
To telnet to hushpuppy you can also just click
here.
SunOS has many of the commands found on other campus machines such as aza,
the Eos workstations, and garfield, some of which are running Digital
Equipment's ULTRIX. Familiarity with any of these systems will allow you
to quickly become comfortable using SunOS. Help is available via the
on-line manuals commonly called man pages. The following is an example
to show how to display man pages for the SunOS command ls, which will
list the contents of a directory.
sun4-%man ls
Hushpuppy responds with:
and continues with the remaining information on the ls command.
reformatting page. Wait... done
LS(1V) USER COMMANDS LS(1V)
NAME ls - list the contents of a directory
SYNOPSIS ls [-aAcCdfFgilLqrRstu1 ] filename ...
SYSTEM V SYNOPSIS /usr/5bin/ls [-abcCdfFgilLmnopqrRstux] filename ...
Suffix File Type .c C source code .s MC680xx assembly source .o object file .a object file libraryFor example, xcc would assume the files main.c, io.c, and control.c to be C source code and the file lowlevel.s to be an assembly module. It is recommended that you use xcc to assemble routines written in assembly language.
Switch Purpose -c To suppress the loading(linking) phase of the compilation, and force xcc to stop after producing '.o' files from source programs. -o output To name the final output file output. -v Verbose output narrating each step of the A compile. -Dname Define name to the preprocessor, as if by the #define directive. -E Run only the macro preprocessor on the named C programs, and send the result to standard output. -Idir #include files whose names do not begin with 'I' are always sought first in the directory of the file argument, the in directories named in the -I options, then in directories on a standard list. -O Invoke the object-code improver as part of the C compilation. -P Run only the macro preprocessor on the named C programs, and send the result to corresponding files suffixed with .i. -S Compile the named C programs into assembly language, and leave the asembly-language output in corresponding files suffixed with .s, without assembling or loading the result. -L Include the standalone startup routine to allow downloading without Xinu. The xcc command can be used to generate modules for downloading that do not contain the Xinu operating system. The -L switch is used to create this standalone object file. When a standalone module is mode, the linker uses the libsa.a library of functions instead of the usual libx.a and libc.a.For example, to compile a C source file named main.c, an assembly listing named lowlevel.s, and the object io.o into an executable named prog1 use xcc in the following way:
xcc -o prog1 main.c lowlevel.s io.oFor more information about the above options, consult the man pages on the Sun C compiler (cc command).
xcc setup.s
download -mfishstick prog1will download the file prog1 to fishstick. If no client is available (all are reserved by other users) then download will display an error message.
sun4-%download prog1 using front end 'hushpuppy': Using backend 'fishstick' downloading file: prog1 Sent Xk bytes download completedNote: The X in the line Sent Xk bytes will be some number.
sun4-%odt using front end 'hushpuppy': Using backend 'fishstick' Using /dev/ttyXNote: The X in the line Using /dev/ttyX will be a device name such as m00.
>b EEPROM boot device...Boot: le(0,0,0) Using IP Address 152.1.58.32 = 98013A20 Booting from tftp server at 152.1.58.33 = 98013A21 Downloaded X bytes from tftp server.Note: The X in the above line will be some number.
>g 4000At this point Xinu will start and your program will begin execution. To return to hushpuppy press <Control-C>. This ends the odt session and causes the connection between the front-end (hushpuppy) and a 3/60 to be broken. Pressing <Control-C> does not cause the Xinu client to stop executing your program, it may continue executing after odt has been exited.
<Control-C>Machine released sun4-%If a target machine begins behaving strangely it may need to be reset. To reset a 3/60, connect to it using the odt command as shown above. At the odt prompt enter k 2 (the letter k followed by a space and then the number 2) and press
Switch Purpose -mMachine Name causes odt to connect the user terminal to Sun named Machine Name (an odt following a download will automatically use the same 3/60 selected by the download if the -m switch is not used) -h allows this 3/60 to remain reserved while another is also being used.For example, odt -mfishstick -h will access fishstick and keep the reservation for those computers which have already reserved. Normally, downloading and using odt to connect with one Xinu client releases any other reservations.
sun-4% busers fishstick idle time = 0 mins class = SUN reserved by ershanno frenchfry idly time = 2 mins class = SUN reserved by wjhicksContents
#include <conf.h> main () { char c; while ((c=getc(CONSOLE))!= 'A') printf("%c\n",c); } /* end of sample program */The program is compiled using xcc.
sun-4%>xcc prog1.c prog1.c: a.out: 596+0 records in 37+1 records out sun-4%>The output file a.out is the absolute object image for the 3/60.
sun-4%> download a.out sun-4%>odt Using fishstick > b EEPROM boot device...Boot: le(0,0,0) Using IP Address 152.1.58.32 = 98013A20 Booting from tftp server at 152.1.58.33 = 98013A21 Downloaded 5432 bytes from tftp server. >g 4000The program executes until the letter 'A' is typed. Press <Control-C> to release the target machine and return to hushpuppy. Remember, ending an odt session will not halt any programs that may be executing on a target machine.
USEROFIL = usercmds/ascdate.o usercmds/x_cat.o usercmds/x_cp.o \ usercmds/x_date.o usercmds/x_echo.o usercmds/x_mount.o \ usercmds/x_mv.o usercmds/x_rls.o usercmds/x_rm.o \ usercmds/x_sleep.o usercmds/x_unmou.o \ usercmds/x_close.o usercmds/x_kill.o \ usercmds/my_commands.o
extern int x_bpool(), x_cat(), x_close(), x_conf(), x_cp(), x_creat(), x_date(), x_devs(), x_dg(), x_echo(), x_exit(), x_help(), x_kill(), x_mem(), x_mount(), x_mv(), x_net(), x_ps(), x_reboot(), x_rf(), x_rls(), x_rm(), x_routes(), x_sleep(), x_snap(), x_unmou(), x_uptime(), x_who(), x_fmdump(), x_run(), x_pgstats(), x_printpgtbl(), x_vmem(), my_command();
#define CMDS "bpool", FALSE, x_bpool, \ "cat", FALSE, x_cat, \ "close", FALSE, x_close, \ "conf", FALSE, x_conf, \ "cp", FALSE, x_cp, \ "create", FALSE, x_creat, \ . . . "ruptime", FALSE, x_uptime, \ "sleep", FALSE, x_sleep, \ "snap", FALSE, x_snap, \ "time", FALSE, x_date, \ "unmount", FALSE, x_unmou, \ "uptime", FALSE, x_uptime, \ "who", FALSE, x_who, \ "vmem", FALSE, x_vmem, \ "?", FALSE, x_help \ "command", FALSE, my_command
COMMAND my_command(stdin, stdout, stderr, nargs, args) int stdin, stdout, stderr, nargs; char *args[];
{home}/xinu/src/sysTo execute it you will probably have to tell the shell where the script is located since this directory is not in your path. If your are in the directory where Makeall is located the line to execute it would be:
Sun-4%>./Makeall
Sun-4%> uncompress xinu8.tar.Z
Sun-4%> tar xvf xinu8.tar
Earl Shannon ershanno@hushpuppy.csc.ncsu.edu
Bill Hicks wjhicks@hushpuppy.csc.ncsu.edu
last-update: 1/29/96
version: 1.0