Subject: Re: Runs SunOS binaries (see sparc sun shared lib notes)
To: None <port-sun3@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sun3
Date: 03/17/1995 21:36:54
> Well, here goes...

> First you copy Sun's /usr/lib/ld.so to that same path on the
> NetBSD/sun3 system.  Then make the directory /sun and copy the
> relevant parts of the SunOS /usr filesystem there.  (I just NFS mount
> the SunOS /usr on /sun)

> Finally, use emacs on /usr/lib/ld.so (in overwrite mode) and replace
> "/usr" with "/sun" at all ocurrances.   That's it.

If you have a SunOS system available to mount things from, you don't
need to have a copy of even ld.so on your NetBSD box.

Here's what I did.  Mind you, I did it on NetBSD/sparc, but I don't see
any reason it wouldn't work equally well on NetBSD/sun3.

	# mkdir /sun-libs
	# mkdir /sun-libs/usr
	# mkdir /sun-libs/usr/lib
	# ln -s /sunos/usr/nfs/mount/point/lib/*.so* /sun-libs/usr/lib
(note this ln command will make a link for ld.so as well.)
	# mount -t null -o ro,union /sun-libs/usr/lib /usr/lib

That's it.  Then you run your SunOS binary.  (The null mount doesn't
have to be ro; I'm just paranoid.)  Nothing but symlinks and an nfs
mount on the NetBSD machine.

You might even be able to get away with just
	# mount -t union -o -b sunoshost:/usr/lib /usr/lib
though I haven't tried it.

>> FYI: attempts to run NetBSD/i386 binaries on NetBSD/sun3 cause
>> kernel panics instead of "Exec format error. Wrong Architecture."
>> messages.
> Gee.  That was an optimistic experiment!  8^)

I suspect more likely it was an accident... 8-)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu