xref: /netbsd-src/share/man/man8/compat_sunos.8 (revision 481fca6e59249d8ffcf24fef7cfbe7b131bfb080)
1.\"	$NetBSD: compat_sunos.8,v 1.11 1999/03/17 20:31:19 garbled 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
36.Sh NAME
37.Nm compat_sunos
38.Nd setup procedure for m68k and sparc architectures
39.Sh DESCRIPTION
40.Nx Ns Tn /sparc
41and some of the
42.Nx Ns Tn /m68k
43architectures can run
44.Tn SunOS
45executables.  Most executables will work.
46.Pp
47The exceptions include programs that use the
48.Tn SunOS
49kvm library,
50and various system calls, ioctl()'s, or kernel semantics
51that are difficult to emulate.
52The number of reasons why a program might fail to work is (thankfully)
53longer than the number of programs that fail to run.
54.Pp
55Static executables will normally run without any extra setup.
56This procedure details the directories and files that must be
57setup to allow dynamically linked executables to work.
58.Pp
59The files you need are on your
60.Tn SunOS
61machine.
62You need to worry about the legal issues of ensuring that you
63have a right to use the required files on your machine.
64On your
65.Nx
66machine, do the following:
67.Pp
68.Bl -enum -inset -offset 123 -compact
69.It
70.Li mkdir -p /emul/sunos/usr/lib /emul/sunos/usr/5lib
71.fi
72.Pp
73.It
74.Li cp SunOS:/usr/lib/lib*.so.*.* NetBSD:/emul/sunos/usr/lib
75.Pp
76.It
77.Li cp SunOS:/usr/5lib/lib*.so.*.* NetBSD:/emul/sunos/usr/5lib
78.Pp
79.It
80.Li cp SunOS:/usr/lib/ld.so NetBSD:/emul/sunos/usr/lib/ld.so
81.Pp
82.It
83If you ever expect to use YP, you will want to create a link:
84.nf
85.Li ln -s /var/run/ypbind.lock /etc/ypbind.lock
86.fi
87.El
88.Pp
89Alternatively, you can use an NFS mount to accomplish the same
90effect.
91On your
92.Nx
93machine, do the following:
94.Pp
95.Bl -enum -inset -offset 123 -compact
96.Pp
97.It
98.Li mkdir -p /emul/sunos/usr
99.Pp
100.It
101.Li mount SunOS:/usr /emul/sunos/usr
102.fi
103.El
104.Pp
105This will place the
106.Tn SunOS
107libraries on your
108.Nx
109machine
110in a location where the
111.Tn SunOS
112compatibility code will look for
113first, where they do not conflict with the standard libraries.
114.Pp
115.Sh BUGS
116A list of things which fail to work in compatibility mode should
117be here.
118.Pp
119.Tn SunOS
120executables can not handle directory offset cookies > 32 bits.
121Should such an offset occur, you will see the message "sunos_getdents:
122dir offset too large for emulated program". Currently, this can only
123happen on NFS mounted filesystems, mounted from servers that return
124offsets with information in the upper 32 bits. These errors should
125rarely happen, but can be avoided by mounting this filesystem with offset
126translation enabled. See the
127.Fl X
128option to
129.Xr mount_nfs 8 .
130The
131.Fl 2
132option to
133.Xr mount_nfs 8
134will also have the desired effect, but is less preferable.
135
136