1.\" $NetBSD: compat_sunos.8,v 1.7 1997/02/27 08:05:39 mikel Exp $ 2.\" 3.\" Copyright (c) 1984 Theo de Raadt 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by Theo de Raadt. 17.\" 4. Neither the name of the author nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.Dd June 15, 1994 34.Dt COMPAT_SUNOS 8 35.Os BSD 4 36.Sh NAME 37.Nm compat_sunos 38.Nd setup procedure for m68k and sparc architectures 39.Sh DESCRIPTION 40NetBSD/sparc and some of the NetBSD/m68k architectures can run 41SunOS executables. Most executables will work. 42.Pp 43The exceptions include programs that use the SunOS kvm library, 44and various system calls, ioctl()'s, or kernel semantics 45that are difficult to emulate. 46The number of reasons why a program might fail to work is (thankfully) 47longer than the number of programs that fail to run. 48.Pp 49Static executables will normally run without any extra setup. 50This procedure details the directories and files that must be 51setup to allow dynamically linked executables to work. 52.Pp 53The files you need are on your SunOS machine. 54You need to worry about the legal issues of ensuring that you 55have a right to use the required files on your machine. 56On your NetBSD machine, do the following: 57.Pp 58.Bl -enum -inset -offset 123 -compact 59.It 60.Li mkdir -p /emul/sunos/usr/lib /emul/sunos/usr/5lib 61.fi 62.Pp 63.It 64.Li cp SunOS:/usr/lib/lib*.so.*.* NetBSD:/emul/sunos/usr/lib 65.Pp 66.It 67.Li cp SunOS:/usr/5lib/lib*.so.*.* NetBSD:/emul/sunos/usr/5lib 68.Pp 69.It 70.Li cp SunOS:/usr/lib/ld.so NetBSD:/emul/sunos/usr/lib/ld.so 71.Pp 72.It 73If you ever expect to use YP, you will want to create a link: 74.nf 75.Li ln -s /var/run/ypbind.lock /etc/ypbind.lock 76.fi 77.El 78.Pp 79Alternatively, you can use an NFS mount to accomplish the same 80effect. 81On your NetBSD machine, do the following: 82.Pp 83.Bl -enum -inset -offset 123 -compact 84.Pp 85.It 86.Li mkdir -p /emul/sunos/usr 87.Pp 88.It 89.Li mount SunOS:/usr /emul/sunos/usr 90.fi 91.El 92.Pp 93This will place the SunOS libraries on your NetBSD machine 94in a location where the SunOS compatibility code will look for 95first, where they do not conflict with the standard libraries. 96.Pp 97.Sh BUGS 98A list of things which fail to work in compatibility mode should 99be here. 100