compat_hpux - setup for running HP-UX binaries under emulation
OpenBSD 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.
The HP-UX compatibility feature is active for kernels compiled with the
COMPAT_HPUX and COMPAT_M68K4K options and the kern.emul.hpux
enabled. HP-UX for m68k uses 4 KB page sizes, and OpenBSD
for all m68k
platforms now uses 8 KB page sizes.
A lot of programs are dynamically linked. This means that
shared libraries that the programs depend on are also needed. Additionally,
a "shadow root" directory for HP-UX binaries on the
will have to be created. This directory is named
/emul/hpux. Any file
operations done by HP-UX programs run under OpenBSD will
look in this directory
first. So, if a HP-UX program opens, for example,
OpenBSD will first try to open /emul/hpux/etc/passwd, and if
not exist open the `real' /etc/passwd file. It is recommended that HP-UX
packages that include configuration files, etc., be installed under
/emul/hpux, to avoid naming conflicts with possible OpenBSD
Shared libraries should also be installed in the shadow
Generally, it will only be necessary to look for the shared
that HP-UX binaries depend on the first few times that HP-UX
installed on the OpenBSD system. After a while, there will
be a sufficient
set of HP-UX shared libraries on the system to be able
to run newly
imported HP-UX binaries without any extra work.
Setting up shared libraries [Toc] [Back]
How to get to know which shared libraries HP-UX binaries
need, and where
to get them? Basically, there are 2 possibilities. (When
these instructions, root privileges are required on the
OpenBSD system to
perform the necessary installation steps).
1. Access to an HP-UX system: These instructions apply to
(the latest version of HP-UX available for m68k-based
the instructions should be similar for earlier
HP-UX. By far, the easiest method is to copy the essential files
locally to the OpenBSD system.
Use tar(1), or a similar utility, to collect the following files:
All files in the /usr/lib directory ending in .sl.
There should be
about 46 files and two soft links.
All files in the /lib directory ending in .sl. There
should be 5
Copy these files to the OpenBSD system, and extract
/emul/hpux. The following files should be present:
And a whole bunch of files in /emul/hpux/usr/lib.
9.10 has about 10 MB of shared libraries that will need
to be copied
to the OpenBSD system.
2. Access to an HP-UX system with its entire root drive
NFS: In this case, simply mount the entire HP-UX system
/emul/hpux. For example, on the OpenBSD system, mount
$ mount -t nfs hpux-host.test.net:/ /emul/hpux
Note that, in this case, the HP-UX emulation will use
files from the HP-UX system (/etc/passwd, for example,) and
that might not be desirable.
Setting up X11R5 [Toc] [Back]
Although the OpenBSD based X11R5 server is the preferred way
to run X, it
is possible to run the HP-UX X11R5 server instead. To do
so, a few additional
files are necessary:
The shared libraries in /usr/lib/X11R5.
All the subdirectories and files in
All the files in /usr/lib/X11/nls/Xhp.
All the files in /usr/lib/X11/extensions.
The following configuration steps will also need to be performed:
1. Get and extract the xbase.tgz set for OpenBSD to provide the X11R6
clients which are going to be used with the new X server.
2. Create the following directory for the X server to deposit its socket
$ mkdir -p /usr/spool/sockets/X11
$ chmod 777 /usr/spool/sockets/X11
3. Add the following lines to /etc/rc.local to create the
for the X server to deposit its files in,
when the system
$ mkdir /tmp/.X11-unix
$ chmod 777 /tmp/.X11-unix
$ ln -s /usr/spool/sockets/X11/0
4. It's also possible to link the X server to a more convenient location,
$ ln -s /emul/hpux/usr/bin/X /usr/X11R6/bin/X
It might not be possible to run the X server on multiple
even though both the X server and OpenBSD support them.
OpenBSD 3.6 November 29, 2001
[ Back ]