2003-12-10 15:06:25 +03:00
|
|
|
.\" $NetBSD: compat_sunos.8,v 1.18 2003/12/10 12:06:25 agc Exp $
|
1994-11-30 22:31:07 +03:00
|
|
|
.\"
|
1994-06-16 22:51:19 +04:00
|
|
|
.\" Copyright (c) 1984 Theo de Raadt
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2001-06-07 19:25:31 +04:00
|
|
|
.Dd February 3, 2001
|
1994-06-16 22:51:19 +04:00
|
|
|
.Dt COMPAT_SUNOS 8
|
1999-03-17 23:31:19 +03:00
|
|
|
.Os
|
1994-06-16 22:51:19 +04:00
|
|
|
.Sh NAME
|
1997-02-27 11:05:36 +03:00
|
|
|
.Nm compat_sunos
|
2001-06-07 19:25:31 +04:00
|
|
|
.Nd setup procedure for m68k, sparc and sparc64 architectures
|
1994-06-16 22:51:19 +04:00
|
|
|
.Sh DESCRIPTION
|
2001-06-07 19:25:31 +04:00
|
|
|
.Nx Ns Tn /sparc64 ,
|
1998-02-06 08:54:12 +03:00
|
|
|
.Nx Ns Tn /sparc
|
|
|
|
and some of the
|
|
|
|
.Nx Ns Tn /m68k
|
|
|
|
architectures can run
|
|
|
|
.Tn SunOS
|
|
|
|
executables. Most executables will work.
|
1994-06-16 22:51:19 +04:00
|
|
|
.Pp
|
1998-02-06 08:54:12 +03:00
|
|
|
The exceptions include programs that use the
|
|
|
|
.Tn SunOS
|
|
|
|
kvm library,
|
2001-09-06 03:47:15 +04:00
|
|
|
and various system calls,
|
|
|
|
.Fn ioctl Ns 's ,
|
|
|
|
or kernel semantics that are difficult to emulate.
|
1994-06-16 22:51:19 +04:00
|
|
|
The number of reasons why a program might fail to work is (thankfully)
|
|
|
|
longer than the number of programs that fail to run.
|
|
|
|
.Pp
|
|
|
|
Static executables will normally run without any extra setup.
|
|
|
|
This procedure details the directories and files that must be
|
2003-05-15 10:01:02 +04:00
|
|
|
set up to allow dynamically linked executables to work.
|
1994-06-16 22:51:19 +04:00
|
|
|
.Pp
|
1998-02-06 08:54:12 +03:00
|
|
|
The files you need are on your
|
|
|
|
.Tn SunOS
|
|
|
|
machine.
|
1994-06-16 22:51:19 +04:00
|
|
|
You need to worry about the legal issues of ensuring that you
|
|
|
|
have a right to use the required files on your machine.
|
1998-02-06 08:54:12 +03:00
|
|
|
On your
|
|
|
|
.Nx
|
|
|
|
machine, do the following:
|
1995-06-12 03:05:17 +04:00
|
|
|
.Pp
|
2003-06-26 16:06:00 +04:00
|
|
|
.Bl -enum -offset 123 -compact
|
1995-06-12 03:05:17 +04:00
|
|
|
.It
|
|
|
|
.Li mkdir -p /emul/sunos/usr/lib /emul/sunos/usr/5lib
|
1994-06-16 22:51:19 +04:00
|
|
|
.fi
|
|
|
|
.Pp
|
1995-06-12 03:05:17 +04:00
|
|
|
.It
|
|
|
|
.Li cp SunOS:/usr/lib/lib*.so.*.* NetBSD:/emul/sunos/usr/lib
|
1994-06-16 22:51:19 +04:00
|
|
|
.Pp
|
1995-06-12 03:05:17 +04:00
|
|
|
.It
|
|
|
|
.Li cp SunOS:/usr/5lib/lib*.so.*.* NetBSD:/emul/sunos/usr/5lib
|
1994-06-16 22:51:19 +04:00
|
|
|
.Pp
|
1995-06-12 03:05:17 +04:00
|
|
|
.It
|
|
|
|
.Li cp SunOS:/usr/lib/ld.so NetBSD:/emul/sunos/usr/lib/ld.so
|
1994-09-28 04:41:05 +03:00
|
|
|
.Pp
|
1995-06-12 03:05:17 +04:00
|
|
|
.It
|
1994-09-28 04:41:05 +03:00
|
|
|
If you ever expect to use YP, you will want to create a link:
|
|
|
|
.nf
|
1995-06-12 03:05:17 +04:00
|
|
|
.Li ln -s /var/run/ypbind.lock /etc/ypbind.lock
|
1994-09-28 04:41:05 +03:00
|
|
|
.fi
|
1994-06-16 22:51:19 +04:00
|
|
|
.El
|
|
|
|
.Pp
|
1995-06-12 02:34:31 +04:00
|
|
|
Alternatively, you can use an NFS mount to accomplish the same
|
|
|
|
effect.
|
1998-02-06 08:54:12 +03:00
|
|
|
On your
|
|
|
|
.Nx
|
|
|
|
machine, do the following:
|
1995-06-12 03:05:17 +04:00
|
|
|
.Pp
|
2003-06-26 16:06:00 +04:00
|
|
|
.Bl -enum -offset 123 -compact
|
1995-06-12 03:05:17 +04:00
|
|
|
.Pp
|
|
|
|
.It
|
|
|
|
.Li mkdir -p /emul/sunos/usr
|
|
|
|
.Pp
|
|
|
|
.It
|
|
|
|
.Li mount SunOS:/usr /emul/sunos/usr
|
1995-06-12 02:34:31 +04:00
|
|
|
.fi
|
|
|
|
.El
|
|
|
|
.Pp
|
1998-02-06 08:54:12 +03:00
|
|
|
This will place the
|
|
|
|
.Tn SunOS
|
|
|
|
libraries on your
|
|
|
|
.Nx
|
|
|
|
machine
|
|
|
|
in a location where the
|
|
|
|
.Tn SunOS
|
|
|
|
compatibility code will look for
|
1995-06-12 02:34:31 +04:00
|
|
|
first, where they do not conflict with the standard libraries.
|
2001-06-07 19:25:31 +04:00
|
|
|
.Sh NOTES
|
|
|
|
When using
|
|
|
|
.Nm
|
|
|
|
on
|
|
|
|
.Nx Ns Tn /sparc64 ,
|
|
|
|
the
|
2001-09-06 03:47:15 +04:00
|
|
|
.Dv COMPAT_NETBSD32
|
2001-06-07 19:25:31 +04:00
|
|
|
option must also be used.
|
1994-06-16 22:51:19 +04:00
|
|
|
.Sh BUGS
|
|
|
|
A list of things which fail to work in compatibility mode should
|
|
|
|
be here.
|
1997-10-19 19:03:15 +04:00
|
|
|
.Pp
|
1998-02-06 08:54:12 +03:00
|
|
|
.Tn SunOS
|
2002-02-13 11:17:26 +03:00
|
|
|
executables can not handle directory offset cookies \*[Gt] 32 bits.
|
2001-09-06 03:47:15 +04:00
|
|
|
Should such an offset occur, you will see the message
|
|
|
|
.Dq sunos_getdents: dir offset too large for emulated program .
|
|
|
|
Currently, this can only
|
1997-10-19 19:03:15 +04:00
|
|
|
happen on NFS mounted filesystems, mounted from servers that return
|
2001-09-06 03:47:15 +04:00
|
|
|
offsets with information in the upper 32 bits. These errors should
|
1997-10-19 19:03:15 +04:00
|
|
|
rarely happen, but can be avoided by mounting this filesystem with offset
|
|
|
|
translation enabled. See the
|
|
|
|
.Fl X
|
|
|
|
option to
|
|
|
|
.Xr mount_nfs 8 .
|
|
|
|
The
|
|
|
|
.Fl 2
|
|
|
|
option to
|
|
|
|
.Xr mount_nfs 8
|
|
|
|
will also have the desired effect, but is less preferable.
|
2001-06-07 19:25:31 +04:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nx Ns Tn /sparc64
|
|
|
|
support is less complete than the other ports.
|