1 .\" Copyright (c) 2000 Sheldon Hearn
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 To compile support for this ABI into an i386 kernel
35 place the following line in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
38 .Cd "options COMPAT_LINUX"
41 for an amd64 kernel use:
42 .Bd -ragged -offset indent
43 .Cd "options COMPAT_LINUX32"
46 Alternatively, to load the ABI as a
47 module at boot time, place the following line in
49 .Bd -literal -offset indent
55 module provides limited Linux ABI (application binary interface) compatibility,
56 making it possible to run many unmodified Linux applications and libraries
57 without the need for virtualization or emulation.
58 Some of the facilities provided are:
66 Special signal handling for activated images
68 Linux to native system call translation
70 Linux-specific system calls
73 Note that dynamically linked Linux executables
74 will require a suitable environment in
76 This includes native Linux shared libraries, and Linux-specific virtual
78 To set it up, install the
79 .Pa emulators/linux_base-c7
80 port or the linux_base-c7
81 package, and add the following line to the
85 .Dl linux_enable="YES"
87 To avoid mounting Linux-specific filesystems at startup, also add the following
90 .Dl linux_mounts_enable="NO"
92 The following variables are available as both
97 .Bl -tag -width indent
98 .It Va compat.linux.debug
99 Enable debugging messages.
100 Set to 0 to silence them.
102 .It Va compat.linux.default_openfiles
103 Default soft openfiles resource limit for Linux applications.
104 Set to -1 to disable the limit.
106 .It Va compat.linux.emul_path
107 Path to the Linux run-time environment.
110 .It Va compat.linux.osname
111 Linux kernel operating system name.
112 .It Va compat.linux.osrelease
113 Linux kernel operating system release.
114 Changing this to something else is discouraged on non-development systems,
115 because it may change the way Linux programs work.
116 Recent versions of GNU libc are known to use different syscalls depending
117 on the value of this sysctl.
118 .It Va compat.linux.oss_version
119 Linux Open Sound System version.
120 .It Va compat.linux.preserve_vstatus
121 When set to 1, it prevents Linux applications from resetting the
124 From a user perspective, this makes
126 work for Linux executables.
129 .Bl -tag -width /compat/linux/dev/shm -compact
131 minimal Linux run-time environment
132 .It Pa /compat/linux/dev
133 device file system, see
135 .It Pa /compat/linux/dev/fd
136 file descriptor file system mounted with the
140 .It Pa /compat/linux/dev/shm
141 in-memory file system, see
143 .It Pa /compat/linux/proc
144 Linux process file system, see
146 .It Pa /compat/linux/sys
147 Linux kernel objects file system, see
159 Linux ABI support first appeared in
162 Support for some of the Linux-specific system calls and system call arguments