Tagging for xorg

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3409 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Bruce Dubbs 2005-02-06 05:17:20 +00:00
parent 8b7d510003
commit 282612744d

View File

@ -16,9 +16,14 @@
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="xorg.html"?>
<title>Xorg-&xorg-version;</title>
<indexterm zone="xorg">
<primary sortas="a-xorg">xorg</primary>
</indexterm>
<sect2>
<title>Introduction to <application>Xorg</application></title>
@ -58,25 +63,25 @@ interface (<acronym>API</acronym>).</para>
<sect3><title>Package information</title>
<itemizedlist spacing='compact'>
<listitem><para>Download (HTTP):
<ulink url="&xorg-download-http;"/></para></listitem>
<listitem><para>Download (FTP):
<ulink url="&xorg-download-ftp;"/></para></listitem>
<listitem><para>Download size:
&xorg-size;</para></listitem>
<listitem><para>Estimated disk space required:
&xorg-buildsize;</para></listitem>
<listitem><para>Estimated build time:
&xorg-time;</para></listitem></itemizedlist>
<listitem><para>Download (HTTP): <ulink url="&xorg-download-http;"/></para></listitem>
<listitem><para>Download (FTP): <ulink url="&xorg-download-ftp;"/></para></listitem>
<listitem><para>Download size: &xorg-size;</para></listitem>
<listitem><para>Estimated disk space required: &xorg-buildsize;</para></listitem>
<listitem><para>Estimated build time: &xorg-time;</para></listitem>
</itemizedlist>
</sect3>
<sect3><title><application>Xorg</application> Dependencies</title>
<sect3>
<title><application>Xorg</application> Dependencies</title>
<sect4><title>Required</title>
<para><xref linkend="libpng"/> and <xref linkend="fontconfig"/></para>
<sect4>
<title>Required</title>
<para><xref linkend="libpng"/> and
<xref linkend="fontconfig"/></para>
</sect4>
<sect4><title>Optional</title>
<sect4>
<title>Optional</title>
<para><xref linkend="Linux_PAM"/></para>
</sect4>
@ -116,8 +121,12 @@ is hardcopy documentation.</para>
<sect2>
<title>Installation of <application>Xorg</application></title>
<sect3>
<sect3 id='xorg-kernel'>
<title>Kernel Compilation Settings</title>
<indexterm zone="xorg xorg-kernel">
<primary sortas="d-Xorg">Xorg</primary></indexterm>
<para>If you have an Intel P6 (Pentium Pro, Pentium II and later), it is
recommended that you compile <acronym>MTRR</acronym> (Memory Type Range
Registers) support into the kernel. The kernel can map Cyrix and AMD
@ -125,14 +134,16 @@ Registers) support into the kernel. The kernel can map Cyrix and AMD
this option is useful for those processors also. This option is found in the
"Processor type and features" menu. It can increase performance of
image write operations 2.5 times or more on <acronym>PCI</acronym> or
<acronym>AGP</acronym> video cards.</para>
<acronym>AGP</acronym> video cards.
</para>
<para>In the "Character Devices" section, enable <acronym>AGP</acronym> Support
and select the chipset support on your motherboard. If you do not know the
chipset, you may select all the chip types at the expense of extra kernel size.
You can usually determine your motherboard's chipset by running the command
<command>lspci</command>, a program from the <xref linkend="pciutils"/>
package.</para>
package.
</para>
<para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct
Rendering Manager unless you have a Direct Rendering Infrastructure
@ -141,14 +152,17 @@ Rendering Manager unless you have a Direct Rendering Infrastructure
<ulink url="http://dri.sourceforge.net" /> in the "Status" section.
Currently, supported cards include those from 3dfx (Voodoo, Banshee), 3Dlabs,
ATI (Rage Pro, Rage 128, Radeon 7X00, Radeon 2), Intel (i810, i815), and
Matrox (G200, G400, G450).</para>
Matrox (G200, G400, G450).
</para>
<para>Additionally NVidia provides their own closed source binary drivers,
which do not make use of <acronym>DRI</acronym>. If you intend to use these
drivers, do not enable <acronym>DRI</acronym>.</para>
drivers, do not enable <acronym>DRI</acronym>.
</para>
<para>If you made any changes to the kernel configuration, recompile and
install the new kernel.</para>
install the new kernel.
</para>
<note><para>If you build <application>Xorg</application> in a
<command>chroot</command> environment, make sure the kernel version of the base
@ -156,30 +170,38 @@ system and the target system are the same.</para>
</note>
</sect3>
<sect3><title>Suppressing Xprint-related modification to <filename
class="directory">/etc</filename></title>
<sect3>
<title>Suppressing Xprint-related modification to <filename class="directory">/etc</filename></title>
<para><application>Xorg</application> insists on putting
its boot and profile scripts into the <filename
class="directory">/etc</filename> directory even if we specifically tell
it not to compile anything Xprint server or client related (see
<filename>host.def</filename> below). The following command will
suppress any such modifications:</para>
suppress any such modifications:
</para>
<screen><userinput><command>sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile</command></userinput></screen>
</sect3>
<sect3><title>Setting Up a Shadow Directory</title>
<sect3>
<title>Setting Up a Shadow Directory</title>
<para>When building <application>Xorg</application>, you should create a shadow
directory of symbolic links for the compiled code. To do that, first make
<command>lndir</command>. Starting from the
<filename class='directory'>xc</filename> directory:</para>
<command>lndir</command>. Starting from the <filename class='directory'>xc</filename> directory:
</para>
<screen><userinput><command>pushd config/util &amp;&amp;
make -f Makefile.ini lndir &amp;&amp;
cp lndir /usr/bin/ &amp;&amp;
popd</command></userinput></screen>
make -f Makefile.ini lndir</command></userinput></screen>
<para>Now, as the root user:</para>
<screen><userinput role='root'><command>cp lndir /usr/bin/</command></userinput></screen>
<para>And back as a regular user::</para>
<screen><userinput><command>popd</command></userinput></screen>
<para>Now create the shadow tree:</para>
@ -188,18 +210,22 @@ cd ../xcbuild &amp;&amp;
lndir ../xc</command></userinput></screen>
</sect3>
<sect3><title>Creating <filename>host.def</filename></title>
<sect3>
<title>Creating <filename>host.def</filename></title>
<para>The next step is to create the <filename>config/cf/host.def</filename>
file. The documentation for <application>Xorg</application> indicates that the
application will build without a <filename>host.def</filename> file, but
the included libraries for <application>Fontconfig</application> and
<application>FreeType2</application> do not build properly on a base
<acronym>LFS</acronym> system. Therefore, you must specify that these
libraries, as well as others, should be imported from the system.</para>
libraries, as well as others, should be imported from the system.
</para>
<note><para><filename>config/cf/host.def</filename> is a C file, not a shell
script. Ensure the comments delimited by <userinput>/*</userinput> ...
<userinput>*/</userinput> are balanced when modifying the file.</para></note>
<userinput>*/</userinput> are balanced when modifying the file.</para>
</note>
<screen><userinput><command>cat &gt; config/cf/host.def &lt;&lt; "EOF"</command>
/* Begin Xorg host.def file */
@ -264,18 +290,23 @@ script. Ensure the comments delimited by <userinput>/*</userinput> ...
<command>EOF</command></userinput></screen>
<para>There are several other options that you may want to consider. A well
documented example file is <filename>config/cf/xorgsite.def</filename>.</para>
documented example file is <filename>config/cf/xorgsite.def</filename>.
</para>
</sect3>
<sect3>
<title>Build Commands</title>
<para>Install <application>Xorg</application> by running the following
commands:</para>
<para>Install <application>Xorg</application> by running the following commands:</para>
<screen><userinput><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@/* &amp; */@" \
`grep -lr linux/config.h *` &amp;&amp;
( make World 2&gt;&amp;1 | tee xorg-compile.log &amp;&amp; exit $PIPESTATUS ) &amp;&amp;
make install &amp;&amp;
( make World 2&gt;&amp;1 | tee xorg-compile.log &amp;&amp; exit $PIPESTATUS )</command></userinput></screen>
<para>Againas as the root user:</para>
<screen><userinput role='root'><command>make install &amp;&amp;
make install.man &amp;&amp;
ln -sf ../X11R6/bin /usr/bin/X11 &amp;&amp;
ln -sf ../X11R6/lib/X11 /usr/lib/X11 &amp;&amp;
@ -287,8 +318,8 @@ ln -sf ../X11R6/include/X11 /usr/include/X11</command></userinput></screen>
<sect2>
<title>Command explanations</title>
<para><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@...</command>: The
<application>Linux-Libc-Headers</application> package installed in
<para><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@...</command>:
The <application>Linux-Libc-Headers</application> package installed in
<acronym>LFS</acronym> installs a
<filename>/usr/include/linux/config.h</filename> file which is not compatible
with userspace applications. The recommended fix for applications including
@ -309,7 +340,8 @@ allows viewing of the output while logging the results to a file. The
parentheses around the command runs the entire comand in a subshell and finally
the <command>exit $PIPESTATUS</command> ensures the result of the
<command>make</command> is returned as the result and not the result of the
<command>tee</command> command.</para>
<command>tee</command> command.
</para>
<note><para>When rebuilding <application>Xorg</application>, a separate command
that may be used if only minor changes are made to the sources is
@ -327,12 +359,17 @@ symbolic links. They are intended for utilization by users only."</para>
</sect2>
<sect2>
<sect2 id='xorg-config'>
<title>Configuring Xorg</title>
<para>Edit <filename>/etc/ld.so.conf</filename> and add
<filename class="directory">/usr/X11R6/lib</filename>.
Run:</para>
<filename class="directory">/usr/X11R6/lib</filename>. Run:
</para>
<indexterm zone="xorg xorg-config">
<primary sortas="e-etc-ld-so.conf">/etc/ld.so.conf</primary>
</indexterm>
<screen><userinput><command>ldconfig</command></userinput></screen>
<para>Ensure <filename class="directory">/usr/X11R6/bin</filename>
@ -348,6 +385,10 @@ The screen will go black and you may hear some clicking of the monitor. This
command will create a file, <filename>xorg.conf.new</filename> in your home
directory.</para>
<indexterm zone="xorg xorg-config">
<primary sortas="e-etc-X11-xorg-conf">/etc/X11/xorg.conf</primary>
</indexterm>
<para>Edit <filename>xorg.conf.new</filename> to suit your system. The details
of the file are located in the xorg.conf man page. Some
things you may want to do are:</para>
@ -406,6 +447,10 @@ This provides an initial screen with an xterm and a clock that is managed by a
simple window manager, Tab Window Manager. For details of
<command>twm</command>, see the man page.</para>
<indexterm zone="xorg xorg-config">
<primary sortas="e-AA.xinitrc">~/.xinitrc</primary>
</indexterm>
<note>
<para>When needed, <application>Xorg</application> creates the directory
<filename>/tmp/.ICE-unix</filename> if it does not exist. If this directory is
@ -421,6 +466,10 @@ the <filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
<command>EOF</command></userinput></screen>
</note>
<indexterm zone="xorg xorg-config">
<primary sortas="e-etc-sysconfig-createfiles">/etc/sysconfig/createfiles</primary>
</indexterm>
<para>Start <application>X</application> with:
<screen><userinput><command>startx</command></userinput></screen>
to get a basic functional <application>X</application> Window System.</para>