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

@ -13,12 +13,17 @@
<sect1 id="xorg" xreflabel="X.org-&xorg-version;"> <sect1 id="xorg" xreflabel="X.org-&xorg-version;">
<sect1info> <sect1info>
<othername>$LastChangedBy$</othername> <othername>$LastChangedBy$</othername>
<date>$Date$</date> <date>$Date$</date>
</sect1info> </sect1info>
<?dbhtml filename="xorg.html"?> <?dbhtml filename="xorg.html"?>
<title>Xorg-&xorg-version;</title> <title>Xorg-&xorg-version;</title>
<indexterm zone="xorg">
<primary sortas="a-xorg">xorg</primary>
</indexterm>
<sect2> <sect2>
<title>Introduction to <application>Xorg</application></title> <title>Introduction to <application>Xorg</application></title>
@ -57,27 +62,27 @@ providing both the windowing infrastructure and a standardized application
interface (<acronym>API</acronym>).</para> interface (<acronym>API</acronym>).</para>
<sect3><title>Package information</title> <sect3><title>Package information</title>
<itemizedlist spacing='compact'> <itemizedlist spacing='compact'>
<listitem><para>Download (HTTP): <listitem><para>Download (HTTP): <ulink url="&xorg-download-http;"/></para></listitem>
<ulink url="&xorg-download-http;"/></para></listitem> <listitem><para>Download (FTP): <ulink url="&xorg-download-ftp;"/></para></listitem>
<listitem><para>Download (FTP): <listitem><para>Download size: &xorg-size;</para></listitem>
<ulink url="&xorg-download-ftp;"/></para></listitem> <listitem><para>Estimated disk space required: &xorg-buildsize;</para></listitem>
<listitem><para>Download size: <listitem><para>Estimated build time: &xorg-time;</para></listitem>
&xorg-size;</para></listitem> </itemizedlist>
<listitem><para>Estimated disk space required:
&xorg-buildsize;</para></listitem>
<listitem><para>Estimated build time:
&xorg-time;</para></listitem></itemizedlist>
</sect3> </sect3>
<sect3><title><application>Xorg</application> Dependencies</title> <sect3>
<title><application>Xorg</application> Dependencies</title>
<sect4><title>Required</title> <sect4>
<para><xref linkend="libpng"/> and <xref linkend="fontconfig"/></para> <title>Required</title>
<para><xref linkend="libpng"/> and
<xref linkend="fontconfig"/></para>
</sect4> </sect4>
<sect4><title>Optional</title> <sect4>
<para><xref linkend="Linux_PAM"/></para> <title>Optional</title>
<para><xref linkend="Linux_PAM"/></para>
</sect4> </sect4>
</sect3> </sect3>
@ -89,13 +94,13 @@ file, there are several files that need to be fetched from the download
location (directory /pub/x.org/pub/X11R&xorg-version;/src/):</para> location (directory /pub/x.org/pub/X11R&xorg-version;/src/):</para>
<itemizedlist spacing='compact'> <itemizedlist spacing='compact'>
<listitem><para><filename>X11R&xorg-version;-src1.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src1.tar.gz</filename></para></listitem>
<listitem><para><filename>X11R&xorg-version;-src2.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src2.tar.gz</filename></para></listitem>
<listitem><para><filename>X11R&xorg-version;-src3.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src3.tar.gz</filename></para></listitem>
<listitem><para><filename>X11R&xorg-version;-src4.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src4.tar.gz</filename></para></listitem>
<listitem><para><filename>X11R&xorg-version;-src5.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src5.tar.gz</filename></para></listitem>
<listitem><para><filename>X11R&xorg-version;-src6.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src6.tar.gz</filename></para></listitem>
<listitem><para><filename>X11R&xorg-version;-src7.tar.gz</filename></para></listitem> <listitem><para><filename>X11R&xorg-version;-src7.tar.gz</filename></para></listitem>
</itemizedlist> </itemizedlist>
<para>The first package contains the <application>Xorg</application> libraries <para>The first package contains the <application>Xorg</application> libraries
@ -114,72 +119,89 @@ is hardcopy documentation.</para>
</sect2> </sect2>
<sect2> <sect2>
<title>Installation of <application>Xorg</application></title> <title>Installation of <application>Xorg</application></title>
<sect3> <sect3 id='xorg-kernel'>
<title>Kernel Compilation Settings</title> <title>Kernel Compilation Settings</title>
<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
<acronym>CPU</acronym>s to the <acronym>MTRR</acronym> interface, so selecting
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>
<para>In the "Character Devices" section, enable <acronym>AGP</acronym> Support <indexterm zone="xorg xorg-kernel">
and select the chipset support on your motherboard. If you do not know the <primary sortas="d-Xorg">Xorg</primary></indexterm>
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>
<para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct <para>If you have an Intel P6 (Pentium Pro, Pentium II and later), it is
Rendering Manager unless you have a Direct Rendering Infrastructure recommended that you compile <acronym>MTRR</acronym> (Memory Type Range
(<acronym>DRI</acronym>) supported video card. A complete list of Registers) support into the kernel. The kernel can map Cyrix and AMD
<acronym>DRI</acronym> supported video cards can be found at <acronym>CPU</acronym>s to the <acronym>MTRR</acronym> interface, so selecting
<ulink url="http://dri.sourceforge.net" /> in the "Status" section. this option is useful for those processors also. This option is found in the
Currently, supported cards include those from 3dfx (Voodoo, Banshee), 3Dlabs, "Processor type and features" menu. It can increase performance of
ATI (Rage Pro, Rage 128, Radeon 7X00, Radeon 2), Intel (i810, i815), and image write operations 2.5 times or more on <acronym>PCI</acronym> or
Matrox (G200, G400, G450).</para> <acronym>AGP</acronym> video cards.
</para>
<para>Additionally NVidia provides their own closed source binary drivers, <para>In the "Character Devices" section, enable <acronym>AGP</acronym> Support
which do not make use of <acronym>DRI</acronym>. If you intend to use these and select the chipset support on your motherboard. If you do not know the
drivers, do not enable <acronym>DRI</acronym>.</para> 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>
<para>If you made any changes to the kernel configuration, recompile and <para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct
install the new kernel.</para> Rendering Manager unless you have a Direct Rendering Infrastructure
(<acronym>DRI</acronym>) supported video card. A complete list of
<acronym>DRI</acronym> supported video cards can be found at
<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>
<note><para>If you build <application>Xorg</application> in a <para>Additionally NVidia provides their own closed source binary drivers,
<command>chroot</command> environment, make sure the kernel version of the base which do not make use of <acronym>DRI</acronym>. If you intend to use these
system and the target system are the same.</para> drivers, do not enable <acronym>DRI</acronym>.
</note> </para>
<para>If you made any changes to the kernel configuration, recompile and
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
system and the target system are the same.</para>
</note>
</sect3> </sect3>
<sect3><title>Suppressing Xprint-related modification to <filename <sect3>
class="directory">/etc</filename></title> <title>Suppressing Xprint-related modification to <filename class="directory">/etc</filename></title>
<para><application>Xorg</application> insists on putting <para><application>Xorg</application> insists on putting
its boot and profile scripts into the <filename its boot and profile scripts into the <filename
class="directory">/etc</filename> directory even if we specifically tell class="directory">/etc</filename> directory even if we specifically tell
it not to compile anything Xprint server or client related (see it not to compile anything Xprint server or client related (see
<filename>host.def</filename> below). The following command will <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> <screen><userinput><command>sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile</command></userinput></screen>
</sect3> </sect3>
<sect3><title>Setting Up a Shadow Directory</title> <sect3>
<para>When building <application>Xorg</application>, you should create a shadow <title>Setting Up a Shadow Directory</title>
directory of symbolic links for the compiled code. To do that, first make
<command>lndir</command>. Starting from the <para>When building <application>Xorg</application>, you should create a shadow
<filename class='directory'>xc</filename> directory:</para> 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>
<screen><userinput><command>pushd config/util &amp;&amp; <screen><userinput><command>pushd config/util &amp;&amp;
make -f Makefile.ini lndir &amp;&amp; make -f Makefile.ini lndir</command></userinput></screen>
cp lndir /usr/bin/ &amp;&amp;
popd</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> <para>Now create the shadow tree:</para>
@ -188,18 +210,22 @@ cd ../xcbuild &amp;&amp;
lndir ../xc</command></userinput></screen> lndir ../xc</command></userinput></screen>
</sect3> </sect3>
<sect3><title>Creating <filename>host.def</filename></title> <sect3>
<para>The next step is to create the <filename>config/cf/host.def</filename> <title>Creating <filename>host.def</filename></title>
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>
<note><para><filename>config/cf/host.def</filename> is a C file, not a shell <para>The next step is to create the <filename>config/cf/host.def</filename>
script. Ensure the comments delimited by <userinput>/*</userinput> ... file. The documentation for <application>Xorg</application> indicates that the
<userinput>*/</userinput> are balanced when modifying the file.</para></note> 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>
<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>
<screen><userinput><command>cat &gt; config/cf/host.def &lt;&lt; "EOF"</command> <screen><userinput><command>cat &gt; config/cf/host.def &lt;&lt; "EOF"</command>
/* Begin Xorg host.def file */ /* Begin Xorg host.def file */
@ -263,19 +289,24 @@ script. Ensure the comments delimited by <userinput>/*</userinput> ...
/* End Xorg host.def file */ /* End Xorg host.def file */
<command>EOF</command></userinput></screen> <command>EOF</command></userinput></screen>
<para>There are several other options that you may want to consider. A well <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>
<sect3> <sect3>
<title>Build Commands</title> <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; */@" \ <screen><userinput><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@/* &amp; */@" \
`grep -lr linux/config.h *` &amp;&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 World 2&gt;&amp;1 | tee xorg-compile.log &amp;&amp; exit $PIPESTATUS )</command></userinput></screen>
make install &amp;&amp;
<para>Againas as the root user:</para>
<screen><userinput role='root'><command>make install &amp;&amp;
make install.man &amp;&amp; make install.man &amp;&amp;
ln -sf ../X11R6/bin /usr/bin/X11 &amp;&amp; ln -sf ../X11R6/bin /usr/bin/X11 &amp;&amp;
ln -sf ../X11R6/lib/X11 /usr/lib/X11 &amp;&amp; ln -sf ../X11R6/lib/X11 /usr/lib/X11 &amp;&amp;
@ -287,35 +318,36 @@ ln -sf ../X11R6/include/X11 /usr/include/X11</command></userinput></screen>
<sect2> <sect2>
<title>Command explanations</title> <title>Command explanations</title>
<para><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@...</command>: The <para><command>sed -i -e "s@^#include &lt;linux/config.h&gt;@...</command>:
<application>Linux-Libc-Headers</application> package installed in The <application>Linux-Libc-Headers</application> package installed in
<acronym>LFS</acronym> installs a <acronym>LFS</acronym> installs a
<filename>/usr/include/linux/config.h</filename> file which is not compatible <filename>/usr/include/linux/config.h</filename> file which is not compatible
with userspace applications. The recommended fix for applications including with userspace applications. The recommended fix for applications including
this file is to remove it (see <ulink this file is to remove it (see <ulink
url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ"> url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ">
linux-libc-headers FAQ</ulink>). The <command>sed</command> uses linux-libc-headers FAQ</ulink>). The <command>sed</command> uses
<command>grep -lr</command> to replace all occurences. If you desire, just <command>grep -lr</command> to replace all occurences. If you desire, just
remove (comment) the line in the appropriate video driver file if you remove (comment) the line in the appropriate video driver file if you
customized <filename>host.def</filename>. customized <filename>host.def</filename>.
</para> </para>
<para><command>( make World 2&gt;&amp;1 | tee xorg-compile.log <para><command>( make World 2&gt;&amp;1 | tee xorg-compile.log
&amp;&amp; exit $PIPESTATUS )</command>: &amp;&amp; exit $PIPESTATUS )</command>:
This command runs multiple <filename>Makefile</filename>s to completely rebuild This command runs multiple <filename>Makefile</filename>s to completely rebuild
the system. <parameter>2&gt;&amp;1</parameter> redirects error messages the system. <parameter>2&gt;&amp;1</parameter> redirects error messages
to the same location as standard output. The <command>tee</command> command to the same location as standard output. The <command>tee</command> command
allows viewing of the output while logging the results to a file. The 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 parentheses around the command runs the entire comand in a subshell and finally
the <command>exit $PIPESTATUS</command> ensures the result of the 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>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 <note><para>When rebuilding <application>Xorg</application>, a separate command
that may be used if only minor changes are made to the sources is that may be used if only minor changes are made to the sources is
<command>make Everything</command>. This does not automatically remove generated <command>make Everything</command>. This does not automatically remove generated
files and only rebuilds those files or programs that are out of date.</para> files and only rebuilds those files or programs that are out of date.</para>
</note> </note>
<para><screen><command>ln -sf ../X11R6/bin /usr/bin/X11 <para><screen><command>ln -sf ../X11R6/bin /usr/bin/X11
ln -sf ../X11R6/lib/X11 /usr/lib/X11 ln -sf ../X11R6/lib/X11 /usr/lib/X11
@ -327,12 +359,17 @@ symbolic links. They are intended for utilization by users only."</para>
</sect2> </sect2>
<sect2> <sect2 id='xorg-config'>
<title>Configuring Xorg</title> <title>Configuring Xorg</title>
<para>Edit <filename>/etc/ld.so.conf</filename> and add <para>Edit <filename>/etc/ld.so.conf</filename> and add
<filename class="directory">/usr/X11R6/lib</filename>. <filename class="directory">/usr/X11R6/lib</filename>. Run:
Run:</para> </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> <screen><userinput><command>ldconfig</command></userinput></screen>
<para>Ensure <filename class="directory">/usr/X11R6/bin</filename> <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 command will create a file, <filename>xorg.conf.new</filename> in your home
directory.</para> 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 <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 of the file are located in the xorg.conf man page. Some
things you may want to do are:</para> 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 simple window manager, Tab Window Manager. For details of
<command>twm</command>, see the man page.</para> <command>twm</command>, see the man page.</para>
<indexterm zone="xorg xorg-config">
<primary sortas="e-AA.xinitrc">~/.xinitrc</primary>
</indexterm>
<note> <note>
<para>When needed, <application>Xorg</application> creates the directory <para>When needed, <application>Xorg</application> creates the directory
<filename>/tmp/.ICE-unix</filename> if it does not exist. If this directory is <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> <command>EOF</command></userinput></screen>
</note> </note>
<indexterm zone="xorg xorg-config">
<primary sortas="e-etc-sysconfig-createfiles">/etc/sysconfig/createfiles</primary>
</indexterm>
<para>Start <application>X</application> with: <para>Start <application>X</application> with:
<screen><userinput><command>startx</command></userinput></screen> <screen><userinput><command>startx</command></userinput></screen>
to get a basic functional <application>X</application> Window System.</para> to get a basic functional <application>X</application> Window System.</para>