Running Foreign Software


Traditionally, operating systems have had to have software written for them, and a piece of software would only run on the platform it was designed for. Many people have built a healthy business changing software for one platform so it will run on another operating system, a task filled with many potential problems. OpenBSD has the ability to run binaries built for certain other operating systems, however, through a process called ABI implementation. This is most commonly used for running software native to Linux and FreeBSD.

The ABI (Application Binary Interface) is the part of the kernel that provides services to programs, including everything from sound-card access to reading files to printing on the screen — all the things a program needs to run. As far as programs are concerned, the ABI is the operating system. By completely implementing the ABI from a different operating system on your native operating system, you can run non-native programs as if they were on their native platform.

The OpenBSD kernel includes modules that implement ABIs for Linux, FreeBSD, SVR4, SCO, and BSD/OS. When you attempt to run a Linux program, for example, the kernel picks out that the program is actually a Linux binary and directs it at the proper ABI.

One large limitation of ABI implementations is that they can only handle the kernel features, not the underlying hardware. A program only works if the binary is built for the same architecture that it is being run on. You can run a Solaris 2.6 binary built for an i386 system on OpenBSD running on i386, but you cannot run a Solaris Sparc binary on an i386 system.

Of course, programs require a little more than just a kernel to run on. They also require the dynamic libraries that they link against, if nothing else. OpenBSD provides these shared libraries for Linux (/usr/ports/emulators/ redhat) and FreeBSD (/usr/ports/emulators/freebsd_lib). Because BSD/OS, SVR4, and SCO are proprietary operating systems, the OpenBSD project cannot easily provide easy-to-install ports for their shared libraries. You must have access to the proper operating system to grab the libraries. If you're interested in how to install these libraries see compat_bsdos(8), compat_svr4(8), and compat_ibcs2(8) for details.

In most cases, however, the Linux and FreeBSD ABIs "just work" and are reliable enough that many ports depend on them. Quite a few people use the Linux Netscape port, for example. Using an ABI implementation requires no configuration, once you have the shared libraries installed. If you install software from ports, you may be using Linux mode without even realizing it!

Between add-on native software and foreign ABI implementations, OpenBSD can support a wide variety of software packages. OpenBSD also includes a variety of basic UNIX software, most of it configured through files in /etc. We'll look there in the next chapter.




Absolute Openbsd(c) Unix for the Practical Paranoid
Absolute OpenBSD: Unix for the Practical Paranoid
ISBN: 1886411999
EAN: 2147483647
Year: 2005
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net