NetBSD/share/man/man8/compat_hpux.8

242 lines
7.1 KiB
Groff

.\" $NetBSD: compat_hpux.8,v 1.2 2001/12/16 23:47:19 wiz Exp $
.\" from: compat_linux.8,v 1.23 2001/10/07 10:12:05 mbw Exp
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" 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 Frank van der Linden
.\" 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 November 29, 2001
.Dt COMPAT_HPUX 8
.Os
.Sh NAME
.Nm compat_hpux
.Nd setup procedure for running HP-UX binaries
.Sh DESCRIPTION
.Nx
supports running HP-UX binaries. This applies only to m68k systems (such
as hp300 systems). Most programs should work, such as Matlab 4.2c and the
HP-UX X11R5 server. Programs that will not work are fairly uncommon, and
often involve very low level hardware access.
.Pp
The HP-UX compatibility feature is active
for kernels compiled with the
.Dv COMPAT_HPUX
and
.Dv COMPAT_M68K4K
options enabled. HP-UX for m68k uses 4 KB page sizes, and
.Nx
for all m68k platforms now use 8 KB page sizes.
.Pp
A lot of programs are dynamically linked. This means that you will
need the HP-UX shared libraries that the program depends on.
Also, you will need to create a
.Dq shadow root
directory for HP-UX binaries on your
.Nx
system. This directory
is named
.Pa /emul/hpux .
Any file operations done by HP-UX programs run under
.Nx
will look in this directory first. So, if a HP-UX
program opens, for example,
.Pa /etc/passwd ,
.Nx
will
first try to open
.Pa /emul/hpux/etc/passwd ,
and if that does not exist open the
.Sq real
.Pa /etc/passwd
file. It is recommended that you install
hpux packages that include configuration files etc. under
.Pa /emul/hpux ,
to avoid naming conflicts with possible
.Nx
counterparts. Shared
libraries should also be installed in the shadow tree.
.Pp
Generally, you will need to look for the shared libraries that HP-UX
binaries depend on only the first few times that you install a HP-UX
program on your
.Nx
system. After a while, you will have a sufficient
set of HP-UX shared libraries on your system to be able to run newly
imported HP-UX binaries without any extra work.
.Ss Setting up shared libraries
How to get to know which shared libraries HP-UX binaries need, and where
to get them? Basically, there are 2 possibilities (when following
these instructions: you will need to be root on your
.Nx
system to do the necessary installation steps).
.Bl -enum
.It
You must have login access to an HP-UX system. These instructions apply to
HP-UX 9.10 (the latest version of HP-UX available for m68k-based systems),
although the instructions should be similar for earlier versions of HP-UX.
By far, the easiest method is to copy the essential files locally to your
.Nx
system.
.Pp
Use tar, or a similar utility to collect the following files:
.Bl -item -compact
.It
All files in the
.Pa /usr/lib
directory ending in
.Li ".sl" .
There should be about 46 files and two soft links.
.It
All files in the
.Pa /lib
directory ending in
.Li ".sl" .
There should be 5 files.
.El
.Pp
Now, you need to copy these files to your
.Nx
system, and extract them into
.Pa /emul/hpux ,
for example, you should end up with the following files:
.Bl -item -compact
.It
.Pa /emul/hpux/lib/dld.sl
.It
.Pa /emul/hpux/lib/libc.sl
.It
.Pa /emul/hpux/lib/libm.sl
.It
.Pa /emul/hpux/lib/libM.sl
.It
.Pa /emul/hpux/lib/libcurses.sl
.It
And a whole bunch of files in
.Pa /emul/hpux/usr/lib .
.El
Overall, HP-UX 9.10 has about 10 MB of shared libraries that you will have
ended up copying to your system.
.It
You have access to an HP-UX system with its entire root drive exported via NFS.
In this case, you simply mount the entire HP-UX system under
.Pa /emul/hpux .
For example, on your
.Nx
system, you might mount it as:
.Dl mount_nfs hpux-host.test.net:/ /emul/hpux
.El
.Ss Setting up X11R5
If you want to run the HP-UX X11R5 server instead of the X server that
comes with
.Nx ,
you will need to grab a few additional files:
.Bl -item -compact
.It
.Pa /usr/bin/X11/X
.It
.Pa /usr/lib/grmd
.It
The shared libraries in
.Pa /usr/lib/X11R5
.It
.Pa /usr/lib/Motif1.2/libXm.sl
.It
All the subdirectories and files in
.Pa /usr/lib/X11/fonts
.It
All the files in
.Pa /usr/lib/X11/nls/Xhp
.It
All the files in
.Pa /usr/lib/X11/extensions
.It
.Pa /usr/lib/X11/XHPKeymaps
.It
.Pa /usr/lib/X11/XHPmodmap
.It
.Pa /usr/lib/X11/XPCmodmap
.It
.Pa /usr/lib/X11/XKeysymDB
.It
.Pa /usr/lib/X11/Xconsoles
.It
.Pa /usr/lib/X11/X0screens
.It
.Pa /usr/lib/X11/X0devices
.It
.Pa /usr/lib/X11/X0pointerkeys
.It
.Pa /usr/lib/X11/rgb.txt
.It
.Pa /usr/lib/X11/rgb.dir
.It
.Pa /usr/lib/X11/rgb.pag
.El
.Pp
You'll also need to perform a few configuration steps:
.Bl -enum
.It
Get and extract the
.Pa xbase.tgz
set for your version of
.Nx
to provide the X11R6 clients you'll be using with your new X server.
.It
Create the following directory for the X server to deposit its socket files
in:
.Dl mkdir -p /usr/spool/sockets/X11
.Dl chmod 777 /usr/spool/sockets/X11
.It
Add the following lines to your
.Pa /etc/rc.local
to create the necessary directories for the X server to deposit its files in,
when your system boots:
.Dl mkdir /tmp/.X11-unix
.Dl chmod 777 /tmp/.X11-unix
.Dl ln -s /usr/spool/sockets/X11/0 /tmp/.X11-unix/X0
.It
To allow the X server to beep, you need to link some device names together:
.Dl ln -s /dev/hil0 /dev/rhil
.It
You may also want to link your X server to a more convenient location, such as:
.Dl ln -s /emul/hpux/usr/bin/X /usr/X11R6/bin/X
.El
.Sh SEE ALSO
.Pa http://www.netbsd.org/Ports/hp300/faq.html#x110
.Pa http://www.blobulent.com/hp300/X11
.Sh BUGS
See PR kern/6042 on why you must create directories for sockets outside
of the
.Pa /emul/hpux
directory tree when running the HP-UX X server.
.Pp
You may not be able to run the X server on multiple framebuffers, even though
both the X server and
.Nx
support them.