mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 23:32:12 +08:00
Tagging for xorg
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3409 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
8b7d510003
commit
282612744d
@ -13,12 +13,17 @@
|
||||
|
||||
<sect1 id="xorg" xreflabel="X.org-&xorg-version;">
|
||||
<sect1info>
|
||||
<othername>$LastChangedBy$</othername>
|
||||
<date>$Date$</date>
|
||||
<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>
|
||||
@ -57,27 +62,27 @@ providing both the windowing infrastructure and a standardized application
|
||||
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>
|
||||
<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>
|
||||
</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>
|
||||
<para><xref linkend="Linux_PAM"/></para>
|
||||
<sect4>
|
||||
<title>Optional</title>
|
||||
<para><xref linkend="Linux_PAM"/></para>
|
||||
</sect4>
|
||||
|
||||
</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>
|
||||
|
||||
<itemizedlist spacing='compact'>
|
||||
<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;-src3.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;-src6.tar.gz</filename></para></listitem>
|
||||
<listitem><para><filename>X11R&xorg-version;-src7.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;-src3.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;-src6.tar.gz</filename></para></listitem>
|
||||
<listitem><para><filename>X11R&xorg-version;-src7.tar.gz</filename></para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>The first package contains the <application>Xorg</application> libraries
|
||||
@ -114,72 +119,89 @@ is hardcopy documentation.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Installation of <application>Xorg</application></title>
|
||||
<title>Installation of <application>Xorg</application></title>
|
||||
|
||||
<sect3>
|
||||
<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>
|
||||
<sect3 id='xorg-kernel'>
|
||||
<title>Kernel Compilation Settings</title>
|
||||
|
||||
<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>
|
||||
<indexterm zone="xorg xorg-kernel">
|
||||
<primary sortas="d-Xorg">Xorg</primary></indexterm>
|
||||
|
||||
<para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct
|
||||
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>
|
||||
<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>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>
|
||||
<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>
|
||||
|
||||
<para>If you made any changes to the kernel configuration, recompile and
|
||||
install the new kernel.</para>
|
||||
<para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct
|
||||
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
|
||||
<command>chroot</command> environment, make sure the kernel version of the base
|
||||
system and the target system are the same.</para>
|
||||
</note>
|
||||
<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>
|
||||
|
||||
<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><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>
|
||||
<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>
|
||||
|
||||
<screen><userinput><command>sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile</command></userinput></screen>
|
||||
|
||||
</sect3>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<screen><userinput><command>pushd config/util &&
|
||||
make -f Makefile.ini lndir &&
|
||||
cp lndir /usr/bin/ &&
|
||||
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 &&
|
||||
lndir ../xc</command></userinput></screen>
|
||||
</sect3>
|
||||
|
||||
<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>
|
||||
<sect3>
|
||||
<title>Creating <filename>host.def</filename></title>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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 > config/cf/host.def << "EOF"</command>
|
||||
/* Begin Xorg host.def file */
|
||||
@ -263,19 +289,24 @@ script. Ensure the comments delimited by <userinput>/*</userinput> ...
|
||||
/* End Xorg host.def file */
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Build Commands</title>
|
||||
<para>Install <application>Xorg</application> by running the following
|
||||
commands:</para>
|
||||
<title>Build Commands</title>
|
||||
|
||||
<para>Install <application>Xorg</application> by running the following commands:</para>
|
||||
|
||||
<screen><userinput><command>sed -i -e "s@^#include <linux/config.h>@/* & */@" \
|
||||
`grep -lr linux/config.h *` &&
|
||||
( make World 2>&1 | tee xorg-compile.log && exit $PIPESTATUS ) &&
|
||||
make install &&
|
||||
( make World 2>&1 | tee xorg-compile.log && exit $PIPESTATUS )</command></userinput></screen>
|
||||
|
||||
<para>Againas as the root user:</para>
|
||||
|
||||
<screen><userinput role='root'><command>make install &&
|
||||
make install.man &&
|
||||
ln -sf ../X11R6/bin /usr/bin/X11 &&
|
||||
ln -sf ../X11R6/lib/X11 /usr/lib/X11 &&
|
||||
@ -287,35 +318,36 @@ ln -sf ../X11R6/include/X11 /usr/include/X11</command></userinput></screen>
|
||||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><command>sed -i -e "s@^#include <linux/config.h>@...</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
|
||||
this file is to remove it (see <ulink
|
||||
url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ">
|
||||
linux-libc-headers FAQ</ulink>). The <command>sed</command> uses
|
||||
<command>grep -lr</command> to replace all occurences. If you desire, just
|
||||
remove (comment) the line in the appropriate video driver file if you
|
||||
customized <filename>host.def</filename>.
|
||||
<para><command>sed -i -e "s@^#include <linux/config.h>@...</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
|
||||
this file is to remove it (see <ulink
|
||||
url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ">
|
||||
linux-libc-headers FAQ</ulink>). The <command>sed</command> uses
|
||||
<command>grep -lr</command> to replace all occurences. If you desire, just
|
||||
remove (comment) the line in the appropriate video driver file if you
|
||||
customized <filename>host.def</filename>.
|
||||
</para>
|
||||
|
||||
<para><command>( make World 2>&1 | tee xorg-compile.log
|
||||
&& exit $PIPESTATUS )</command>:
|
||||
This command runs multiple <filename>Makefile</filename>s to completely rebuild
|
||||
the system. <parameter>2>&1</parameter> redirects error messages
|
||||
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
|
||||
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>
|
||||
<para><command>( make World 2>&1 | tee xorg-compile.log
|
||||
&& exit $PIPESTATUS )</command>:
|
||||
This command runs multiple <filename>Makefile</filename>s to completely rebuild
|
||||
the system. <parameter>2>&1</parameter> redirects error messages
|
||||
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
|
||||
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>
|
||||
|
||||
<note><para>When rebuilding <application>Xorg</application>, a separate command
|
||||
that may be used if only minor changes are made to the sources is
|
||||
<command>make Everything</command>. This does not automatically remove generated
|
||||
files and only rebuilds those files or programs that are out of date.</para>
|
||||
</note>
|
||||
<note><para>When rebuilding <application>Xorg</application>, a separate command
|
||||
that may be used if only minor changes are made to the sources is
|
||||
<command>make Everything</command>. This does not automatically remove generated
|
||||
files and only rebuilds those files or programs that are out of date.</para>
|
||||
</note>
|
||||
|
||||
<para><screen><command>ln -sf ../X11R6/bin /usr/bin/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 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>
|
||||
|
Loading…
Reference in New Issue
Block a user