* Add Rich Murphey's name back into the attributions for this chapter.

His name was apparently accidently removed when we moved to the
  <chapterinfo> scheme.
* Add a standard synopsis to this chapter.
* Remove gratuitous "For information about <title of next section>,
  see <number of next section>".
* Use <xref> instead of a <link> to Ports chapter.
* Clean up the section about KLDs and enabling Linux compatibility.
This commit is contained in:
Murray Stokely 2001-08-12 20:13:54 +00:00
parent 7e74e35582
commit 7928e44f14
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10325

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml,v 1.48 2001/08/09 23:42:32 chern Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml,v 1.49 2001/08/10 22:58:14 chern Exp $
--> -->
<chapter id="linuxemu"> <chapter id="linuxemu">
@ -20,6 +20,10 @@
<surname>Handy</surname> <surname>Handy</surname>
<contrib>Originally contributed by </contrib> <contrib>Originally contributed by </contrib>
</author> </author>
<author>
<firstname>Rich</firstname>
<surname>Murphey</surname>
</author>
</authorgroup> </authorgroup>
</chapterinfo> </chapterinfo>
@ -33,10 +37,9 @@
<secondary>Linux</secondary> <secondary>Linux</secondary>
</indexterm> </indexterm>
<para>The following chapter will cover FreeBSD's Linux binary <para>FreeBSD provides binary compatibility with several other
compatibility features, how to install it, and how it works.</para> Unix-like operating systems, including Linux. At this point,
you may be asking yourself why exactly, does
<para>At this point, you may be asking yourself why exactly, does
FreeBSD need to be able to run Linux binaries? The answer to that FreeBSD need to be able to run Linux binaries? The answer to that
question is quite simple. Many companies and developers develop question is quite simple. Many companies and developers develop
only for Linux, since it is the latest <quote>hot thing</quote> in only for Linux, since it is the latest <quote>hot thing</quote> in
@ -73,23 +76,40 @@
FreeBSD's <filename>/proc</filename> filesystem), or i386-specific FreeBSD's <filename>/proc</filename> filesystem), or i386-specific
calls, such as enabling virtual 8086 mode.</para> calls, such as enabling virtual 8086 mode.</para>
<para>For information on installing the Linux binary compatibility <para>After reading this chapter you will know:</para>
mode, see the <link linkend="linuxemu-lbc-install">next section</link>.</para> <itemizedlist>
<listitem><para>How to enable Linux binary compatibility on your
system.</para></listitem>
<listitem><para>How to install additional Linux shared
libraries.</para></listitem>
<listitem><para>How to install Linux applications on your
FreeBSD system.</para></listitem>
<listitem><para>The implementation details of Linux
compatibility in FreeBSD.</para></listitem>
</itemizedlist>
<para>Before reading this chapter you should:</para>
<itemizedlist>
<listitem><para>Know how to install additional third-party software (<xref
linkend="ports">)</para></listitem>
</itemizedlist>
</sect1> </sect1>
<sect1 id="linuxemu-lbc-install"> <sect1 id="linuxemu-lbc-install">
<title>Installation</title> <title>Installation</title>
<para>With the advent of 3.0-RELEASE, it is no longer necessary to
specify <literal>options LINUX</literal> or
<literal>options COMPAT_LINUX</literal> in your kernel
configuration.</para>
<indexterm><primary>KLD (kernel loadable object)</primary></indexterm> <indexterm><primary>KLD (kernel loadable object)</primary></indexterm>
<para>The Linux binary compatibility is now done via a KLD object <para>Linux binary compatibility is not turned on by default. The
(<quote>Kernel LoaDable object</quote>), so it can be installed easiest way to enable this functionality is to load the
<quote>on-the-fly</quote> without having to reboot. You will, <literal>linux</literal> KLD object (<quote>Kernel LoaDable
however, need to have the following in object</quote>). You can load this module by simply typing
<command>linux</command> at the command prompt.</para>
<para>If you would like Linux compatibility to always be enabled,
then you should add the following line to
<filename>/etc/rc.conf</filename>:</para> <filename>/etc/rc.conf</filename>:</para>
<programlisting>linux_enable=<quote>YES</quote></programlisting> <programlisting>linux_enable=<quote>YES</quote></programlisting>
@ -105,8 +125,8 @@ case ${linux_enable} in
;; ;;
esac</programlisting> esac</programlisting>
<para>If you wish to verify that the KLD is loaded, <para>The &man.kldstat.8; command can be used to verify that the
<command>kldstat</command> will do that:</para> KLD is loaded:</para>
<screen>&prompt.user; <userinput>kldstat</userinput> <screen>&prompt.user; <userinput>kldstat</userinput>
Id Refs Address Size Name Id Refs Address Size Name
@ -118,11 +138,10 @@ Id Refs Address Size Name
</indexterm> </indexterm>
<para>If for some reason you do not want to or cannot load the KLD, <para>If for some reason you do not want to or cannot load the KLD,
then you may statically link the binary compatibility in the kernel then you may statically link Linux binary compatibility into the kernel
by adding <literal>options LINUX</literal> to your kernel by adding <literal>options LINUX</literal> to your kernel
configuration file. Then install your new kernel as described in configuration file. Then install your new kernel as described in
the <link linkend="kernelconfig">kernel configuration</link> section <xref linkend="kernelconfig">.</para>
of this handbook.</para>
<sect2> <sect2>
<title>Installing Linux Runtime Libraries</title> <title>Installing Linux Runtime Libraries</title>