NetBSD/share/man/man8/compat_darwin.8
2003-11-12 13:04:18 +00:00

128 lines
4.2 KiB
Groff

.\" $NetBSD: compat_darwin.8,v 1.3 2003/11/12 13:04:18 grant Exp $
.\"
.\" Copyright (c) 2003 Emmanuel Dreyfus
.\" 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.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed for the NetBSD Project
.\" by Emmanuel Dreyfus.
.\" 4. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission
.\"
.\" 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.
.\"
.Dd September 29, 2003
.Dt COMPAT_DARWIN 8
.Os
.Sh NAME
.Nm compat_darwin
.Nd setup procedure for running Darwin binaries from MacOS X
.Sh DESCRIPTION
.Nx
supports running Darwin binaries.
This works on PowerPC ports, and i386 should be supported in the
future.
For now, most text based and X11 based program should work.
Applications using the Quartz displaying system may work, but local
display is not yet supported: running MacOS X's Quartz display
server on
.Nx
is a work in progress.
.Pp
The Darwin compatibility feature is active for kernels compiled
with the
.Dv COMPAT_DARWIN ,
.Dv COMPAT_MACH ,
and
.Dv EXEC_MACHO
options enabled.
.Pp
All Darwin binaries are dynamically linked.
As
.Dv COMPAT_DARWIN
only emulates the Darwin system calls, you will need various Darwin
userland files, such as the shared libraries and the dynamic linker.
Theses files are kept in a
.Dq shadow root
directory, named
.Pa /emul/darwin .
Each time a Darwin binary has to use a file, it will look it up in
.Pa /emul/darwin
first.
This feature is used to prevent conflict between native and foreign
libraries and configuration files.
.Pp
There are two ways of setting up the
.Pa /emul/darwin
tree.
.Bl -enum
.It
The easiest way is to install the Darwin library package in
.Pa pkgsrc/emulators/darwin_lib .
This package uses files provided by the OpenDarwin project.
Therefore, it does not contain Apple's MacOS X proprietary libraries,
which are required in order to run any Quartz-based application.
If you need some files not installed by the package, read on.
.It
You can also install Darwin or MacOS X files in
.Pa /emul/darwin
by hand.
To do this, you need a Darwin system.
In order to know what libraries a program needs, just use the
.Dl otool -L program
command on Darwin.
Alternatively, you can use
.Xr ktrace 1
and
.Xr kdump 1
to discover what files the program attempts to open.
.El
.Pp
Please note that you need a valid MacOS X license if you copy Apple
proprietary libraries and programs from a MacOS X system.
.Sh SEE ALSO
.Xr kdump 1 ,
.Xr ktrace 1 ,
.Xr options 4
.Sh AUTHORS
.Dv COMPAT_DARWIN
and
.Dv COMPAT_MACH
layers were written by
.An Emmanuel Dreyfus Aq manu@NetBSD.org
with some help from
.An Christos Zoulas Aq christos@NetBSD.org
.Pp
.Dv EXEC_MACHO
was integrated into
.Nx
by
.An Christos Zoulas Aq christos@NetBSD.org .
.Pp
The
.Pa pkgsrc/emulators/darwin_lib
package was created by
.An James Whitwell Aq abacau@yahoo.com.au .
.Sh BUGS
Many.
.Dv COMPAT_DARWIN
is still very experimental.