Getting Started, Documentation, Tips & Tricks

some misc environment questions, and some n64 board errors..

Getting a r5k-180 indy all up and running with my n64 dev board.

My preferred shell is csh, and there is indeed a csh included with Irix 5.3, but it is a really bad csh ... no autocomplete, no up-arrow history ... nothing. What's the fastest, easiest way for me to get a more modern (say ... freebsd circa 2001 ?) csh on this 5.3 system ?

Second, what is a 'find' syntax that I can memorize and easily use ? I tried to piece together a good syntax from the man page, but when I search for files I know exist, I come up empty. On modern systems I do things like:

find / | grep myfile

fine /usr/local | grep myfile

what's a good syntax for irix 5.3 ?

Finally, there is a n64-development specific command "dbgif" whose function is described as:

"It establishes a link between the host workstation and the game target. Specifically, it provides a link between gvd, the debugger running on the host development workstation, and the game system development board. Note that the dbgif program must be running in order to use the gvd debugger (GameShop)."

Ok, fine ... but when I run the dbgif command, it fails with a very short gethostbyname error. My indy has a hostname set (not a FQDN, but a simple hostname) and that hostname is tied to the fixed IP in /etc/hosts. Further, dns resolution with external nameserver is functioning (I can nslookup external hosts, etc.).

So, while I am sure very few people have ever seen this 'dbgif' application, it seems to be a pretty general client/server operation, where dbgif is presenting a resource for the gvd debugger to hook to ... any ideas why it would fail with a gethostbyname error ?

Thanks.
Sorry, I've never seen the N64 development stuff. TGCware has many packages for IRIX 5.3, but I don't see tcsh there - sorry. But given that gcc *is* there, you could have tcsh...

For find(1), you ought to be able to use something like this:
Code:
find / -name '*myfile*' -print
to speed things up a little bit, or better still skip everything that isn't a normal file:
Code:
find / -type f -name '*myfile*' -print
There are other type specs you can use, most common might be "d" for directories. You can also prefix an option with a "!" to negate it. So to search for anything other than a normal file:
Code:
find / ! -type f -name '*myfile*' -print
find(1) is a great tool to be familiar with, especially when you use the "-exec" option to do things to the files once you've made sure your search spec is good. Like when you want to make sure files owned by an old UID are owned by a sensible user and group:
Code:
find /target/dir -type f -uid 8001 -exec chown newuser:newgroup {} \;
Much cleaner than just blindly using "chown -R" ...

Good luck!

_________________
Then? :IRIS3130: ... Now? :O3x02L: :1600SW: +MLA :Fuel: :Octane2: :Octane: :Indigo2IMP: ... Other: DEC :BA213: :BA123: Sun , DG AViiON , NeXT :Cube:
Thanks - I guess I'll just use bash from TGCware - that will at least get me up arrow history and so on ...

Then I can just create a sane find alias and use that - thanks for your examples.
Irix 5.3 includes both AT&T csh(1) and tcsh(1). Only tcsh(1) has line editing and arrow keys.
ksh(1) also has line editing, but with the vi command set only. So you would use ESC k instead of up arrow.
[Linux, BSD, and Darwin don't have a real csh; if you check you'll see that csh is hardlinked to tcsh on these systems, and it mostly acts like tcsh.]

_________________
:PI: :O2: :Indigo2IMP: :Indigo2IMP:
I have never gotten my Ultra64 to work, because I don't have usable IRIX 5.2 media, so I can't provide any specific help. To check what dbgif is even trying, run
Code:
par -i dbgif
It may be trying something like
Code:
open("/ns/.local/hosts.byname/localhost", O_RDONLY, 072)
or sending something to to UDP port 53 of your DNS. I'd guess it's trying to resolve localhost or something equally silly. Have you verified that your /etc/nsswitch.conf (if it exists in 5.3...) lists "files" first for hosts?
Ok, here is what I got from 'par'


0mS par( 536): was sent signal SIGUSR1
1mS par( 536): END-pause() errno = 4 (Interrupted system call)
1mS par( 536): received signal SIGUSR1
1mS par( 536): sigreturn(0x7fff2aa8) OK
1mS dbgif( 536): execve(/usr/sbin/dbgif, 0x7fff2f50, 0x7fff2f58) OK
4mS dbgif( 536): open(/lib/rld, O_RDONLY, 04) = 3
4mS dbgif( 536): read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 52) = 52
4mS dbgif( 536): lseek(3, 52, SEEK_SET) = 52
5mS dbgif( 536): read(3, <70 00 00 00 00 00 00 a0 0f b6 00 a0 0f b6 00 a0>..., 96) = 96
5mS dbgif( 536): elfmap(3, 0x7fff225c, 2) = 0xfb60000
5mS dbgif( 536): close(3) OK
5mS dbgif( 536): getpagesize() = 4096
7mS dbgif( 536): getpid() = 536 ppid=535
7mS dbgif( 536): syssgi(SGI_TOSSTSAVE) OK
8mS dbgif( 536): open(/dev/u64_debug, O_RDWR, 02000004764) = 3
8mS dbgif( 536): socket(PF_INET, SOCK_STREAM, 0) = 4
8mS dbgif( 536): gethostname(indy64, 64) OK
8mS dbgif( 536): open(/etc/resolv.conf, O_RDONLY, 0666) = 5
8mS dbgif( 536): fstat(5, 0x7fff1c90) OK
8mS dbgif( 536): getpagesize() = 4096
8mS dbgif( 536): brk(0x10137000) OK
9mS dbgif( 536): ioctl(5, TCGETA, 0x7fff1c38) errno = 25 (Not a typewriter)
9mS dbgif( 536): read(5, "nameserver\t192.168.1.1\n", 4096) = 23
9mS dbgif( 536): read(5, 0x10134b18, 4096) = 0
9mS dbgif( 536): close(5) OK
9mS dbgif( 536): gethostname(indy64, 256) OK
9mS dbgif( 536): getpid() = 536 ppid=535
10mS dbgif( 536): getpid() = 536 ppid=535
10mS dbgif( 536): time() = 1355791715
10mS dbgif( 536): getdomainname((null), 256) OK
10mS dbgif( 536): socket(PF_INET, SOCK_DGRAM, 0) = 5
10mS dbgif( 536): connect(5, <00 02 00 35 c0 a8 01 01 00 00 00 00 00 00 00 00>, 16) OK
10mS dbgif( 536): send(5, <00 01 01 00 00 01 00 00 00 00 00 00 06 69 6e 64>..., 24, 0) = 24
11mS dbgif( 536): select(6, IN:set=5 OUT:set=5, 0, 0, sec=5 usec=0) = 1
27mS dbgif( 536): recv(5, <00 01 81 83 00 01 00 00 00 01 00 00 06 69 6e 64>..., 1024, 0) = 99
28mS dbgif( 536): close(5) OK
28mS dbgif( 536): open(/usr/lib/locale/C/LC_MESSAGES/uxsyserr, O_RDONLY, 01752601414) errno = 2 (No such file or directory)
28mS dbgif( 536): write(2, "gethostbyname call failed", 25) = 25
29mS dbgif( 536): write(2, ": ", 2) = 2
29mS dbgif( 536): write(2, "Error 0", 7) = 7
29mS dbgif( 536): write(2, "\n", 1) = 1
29mS dbgif( 536): prctl(PR_GETNSHARE) = 0
29mS dbgif( 536): exit(0)


So it finds hostname just fine, and then correctly returns null for domainname, since there is none.

But it seems to fail on:

open(/usr/lib/locale/C/LC_MESSAGES/uxsyserr, O_RDONLY, 01752601414) errno = 2 (No such file or directory)

and indeed, I do not have a:

/usr/lib/locale/C/LC_MESSAGES

directory at all ... should I ?
robespierre wrote:
Irix 5.3 includes both AT&T csh(1) and tcsh(1). Only tcsh(1) has line editing and arrow keys.
ksh(1) also has line editing, but with the vi command set only. So you would use ESC k instead of up arrow.
[Linux, BSD, and Darwin don't have a real csh; if you check you'll see that csh is hardlinked to tcsh on these systems, and it mostly acts like tcsh.]



Is it safe to change roots shell to /usr/bin/tcsh ?

My /usr is a different filesystem, so I don't want to do something dumb...
jsloan wrote:
Is it safe to change roots shell to /usr/bin/tcsh ?

Mine is, and it hasn't seemed to cause any problems.
hamei wrote:
jsloan wrote:
Is it safe to change roots shell to /usr/bin/tcsh ?

Mine is, and it hasn't seemed to cause any problems.


That's only an issue on systems with separate root and /usr filesystems (Solaris/SunOS are the most common). The problem was that a failed mount of /usr would leave root with an unusable shell. Even on those systems you can get around it by putting your preferred shell in your login scripts.

IRIX has crammed everything on one partition for a long time now.

_________________
Damn the torpedoes, full speed ahead!

Systems available for remote access on request.

:Indigo: :Octane: :Indigo2: :Indigo2IMP: :Indy: :PI: :O200: :ChallengeL: :O2000R: (single-CM)
jsloan wrote:
Ok, here is what I got from 'par'

9mS dbgif( 536): read(5, "nameserver\t192.168.1.1\n", 4096) = 23
9mS dbgif( 536): read(5, 0x10134b18, 4096) = 0
9mS dbgif( 536): close(5) OK
9mS dbgif( 536): gethostname(indy64, 256) OK
9mS dbgif( 536): getpid() = 536 ppid=535
10mS dbgif( 536): getpid() = 536 ppid=535
10mS dbgif( 536): time() = 1355791715
10mS dbgif( 536): getdomainname((null), 256) OK
10mS dbgif( 536): socket(PF_INET, SOCK_DGRAM, 0) = 5
10mS dbgif( 536): connect(5, <00 02 00 35 c0 a8 01 01 00 00 00 00 00 00 00 00>, 16) OK
10mS dbgif( 536): send(5, <00 01 01 00 00 01 00 00 00 00 00 00 06 69 6e 64>..., 24, 0) = 24
11mS dbgif( 536): select(6, IN:set=5 OUT:set=5, 0, 0, sec=5 usec=0) = 1
27mS dbgif( 536): recv(5, <00 01 81 83 00 01 00 00 00 01 00 00 06 69 6e 64>..., 1024, 0) = 99
28mS dbgif( 536): close(5) OK
28mS dbgif( 536): open(/usr/lib/locale/C/LC_MESSAGES/uxsyserr, O_RDONLY, 01752601414) errno = 2 (No such file or directory)

So it finds hostname just fine, and then correctly returns null for domainname, since there is none.
While gethostbyname and getdomainname are both OK, it still proceeds to contact a DNS server (0x35 is 53 decimal, which is DNS,
0xc0 0xa8 0x01 0x01 is your configured name server. Not sure what it tries (forward or reverse lookup), you may have to check with tcpdump, or a higher log level for your DNS, or just make sure that both forward and reverse lookups work for the indy.
Quote:
But it seems to fail on:
open(/usr/lib/locale/C/LC_MESSAGES/uxsyserr, O_RDONLY, 01752601414) errno = 2 (No such file or directory)
and indeed, I do not have a:
/usr/lib/locale/C/LC_MESSAGES
directory at all ... should I ?
That's most likely OK. There are no translations for this text, so the file for a translation table to the "C" language (locale) doesn't exist. This just means that the message is printed as is - "gethostbyname call failed",