glfs/x/installing/xfree86/xfree86-inst.xml
Igor Živković 8b74243d0e fixed GL/X11 absolute symlink
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2078 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-05-01 19:55:44 +00:00

240 lines
11 KiB
XML

<sect2>
<title>Installation of <application>XFree86</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>
<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 doing:</para>
<screen><userinput><command>cat /proc/pci</command></userinput></screen>
<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).
If you do enable <acronym>DRI</acronym> here, make sure you select the video card(s) you want
to support as a <emphasis>module</emphasis>.</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>If you made any changes to the kernel configuration, recompile the kernel.</para>
<para>Copy <filename>/usr/src/linux/arch/i386/boot/bzImage</filename> and
<filename>/usr/src/linux/System.map</filename> to
<filename>/boot</filename>, edit <filename>/etc/lilo.conf</filename>
appropriately and run <filename>lilo</filename>. If you use
<filename>grub</filename>, edit <filename>/boot/grub/grub.conf</filename>
and add the new kernel to the boot menu.
</para>
<note><para>If you build <application>XFree86</application> in a chroot environment, make sure the kernel
version of the base system and the target system are the same. This is
especially important if you enabled <acronym>DRI</acronym> support as a module as
instructed above.</para></note>
</sect3>
<sect3><title>Creating <filename>host.def</filename></title>
<para>Although <application>XFree86</application> will compile without a
<filename>host.def</filename> file, the following file
is recommended for customizing the installation. Start from
the <filename class="directory">xc</filename> directory.</para>
<note><para>The <filename>host.def</filename> file is a
<application>C</application> file, not the
usual configuration file. If you make any changes, be sure the comment characters
(<userinput>/*</userinput> and <userinput>*/</userinput>)
are balanced. Most of the entries in the file below are
commented out with the default settings shown.
</para></note>
<screen><userinput><command>cat &gt; config/cf/host.def &lt;&lt; "EOF"</command>
/* Begin XFree86 host.def file */
/* System Related Information. If you read and configure only one
* section then it should be this one. The Intel architecture defaults are
* set for a i686 and higher. Axp is for the Alpha architecture and Ppc is
* for the Power PC. Note that there have been reports that the Ppc
* optimization line causes segmentation faults during build. If that
* happens, try building without the DefaultGcc2PpcOpt line. **************/
/* #define DefaultGcc2i386Opt -O2 -fomit-frame-pointer -march=i686 */
/* #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 */
/* #define DefaultGcc2PpcOpt -O2 -mcpu=750 */
/* The following definitions are normally set properly by XFree86's scripts.
* You can uncomment them if you want to make sure. ************************/
/* #define HasMTRRSupport YES */ /* Enabled in kernel see kernel docs*/
/* #define HasMMXSupport NO */ /* Any i586 or above */
/* #define HasKatmaiSupport NO */ /* PIII SSE instructions */
/* #define Has3DNowSupport NO */ /* AMD instructions */
/* This setting reduces compile time a little by omitting rarely used input
* devices. You can find the complete list in config/cf/xfree86.cf ********/
#define XInputDrivers mouse void
/* VIDEO DRIVERS ***********************************************************/
/* If you are sure you only want the drivers for one or a few video cards,
* you can delete the drivers you do not want. *****************************/
#define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
neomagic i740 tdfx savage \
cirrus vmware tseng trident chips apm \
GlideDriver fbdev i128 nsc \
ati i810 AgpGartDrivers DevelDrivers ark \
cyrix siliconmotion \
vesa vga \
dummy XF86OSCardDrivers XF86ExtraCardDrivers
/* USER AND SYSTEM DEFAULT PATHS *******************************************/
/* These settings set the PATH variables used by xdm. See README for *******/
/* detailed description and modify the following as per your need. *********/
/* #define DefaultSystemPath /usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin */
/* #define DefaultUserPath /usr/bin:/bin:/usr/X11R6/bin */
/* FONT SERVER AND LIBRARY SETTINGS ****************************************/
/* These settings are the defaults ***************************************/
/* #define BuildFontServer YES */ /* For Ghostscript Print Server*/
/* #define SharedLibFont YES */
/* #define CompressAllFonts YES */
/* #define GzipFontCompression YES */
/* These settings ensure we use our libraries ******************************/
#define HasFreetype2 YES
#define HasFontconfig YES
#define HasExpat YES
#define HasLibpng YES
#define HasZlib YES
/* The font path can be redefined in the XF86Config file *******************/
/*
#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/75dpi/,\
$(FONTDIR)/100dpi/,$(FONTDIR)/Type1,$(FONTDIR)/local,\
$(FONTDIR)/TrueType,$(FONTDIR)/CID,$(FONTDIR)/Speedo
*/
/* INTERNATIONAL FONTS. Change to YES if you need any of them. These are
* the defaults. ***********************************************************/
/* #define BuildCyrillicFonts NO */
/* #define BuildArabicFonts NO */
/* #define BuildISO8859_6Fonts NO */
/* #define BuildGreekFonts NO */
/* #define BuildISO8859_7Fonts NO */
/* #define BuildHebrewFonts NO */
/* #define BuildISO8859_8Fonts NO */
/* #define BuildKOI8_RFonts NO */
/* #define BuildJapaneseFonts NO */
/* #define BuildJISX0201Fonts NO */
/* #define BuildKoreanFonts NO */
/* #define BuildChineseFonts NO */
/* DOCUMENTATION SETTINGS **************************************************/
/* These setting are the defaults. *****************************************/
/* #define BuildLinuxDocHtml NO */ /* X Docs in Html format */
/* #define BuildLinuxDocPS NO */ /* PostScript format */
/* #define BuildAllSpecsDocs NO */ /* Various docs */
/* #define BuildHtmlManPages NO */
/* GENERAL SETTINGS: You generally want to leave these alone when
* building X on an LFS system *********************************************/
#define GccWarningOptions -pipe /* Speed up compiles */
#define TermcapLibrary -lncurses
#define XprtServer YES /* Needed by realplayer */
#define XnestServer YES
#define XAppLoadDir EtcX11Directory/app-defaults
#define VarLibDir /var/lib
#define XFree86Devel NO
#define FSUseSyslog YES
#define ThreadedX YES
#define HasPam NO
#define SystemManDirectory /usr/share/man /* Instead of /usr/man */
#define HasLibCrypt YES
#define InstallXinitConfig YES
#define InstallXdmConfig YES
#define ForceNormalLib YES
#define BuildSpecsDocs NO
/* End XFree86 host.def file */
<command>EOF</command></userinput></screen>
<para>Edit the file for your hardware and desires.</para>
</sect3>
<sect3>
<title>Build Commands</title>
<para>Install <application>XFree86</application> by running the following commands:</para>
<screen><userinput><command>( make WORLDOPTS="" World 2&gt;&amp;1 | tee xfree-compile.log &amp;&amp; exit $PIPESTATUS ) &amp;&amp;
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 &amp;&amp;
ln -sf ../X11R6/include/{X11,GL} /usr/include</command></userinput></screen>
</sect3>
<sect3>
<title>Updating Direct Rendering Infrastructure (<acronym>DRI</acronym>)</title>
<para>If you have one of the supported <acronym>DRI</acronym> cards and
have enabled <acronym>DRI</acronym> kernel modules as explained
above, you now need to update the kernel modules to ensure they are compatible with the
current version of <application>XFree86</application>. To do this, perform the following:</para>
<screen><userinput><command>cd programs/Xserver/hw/xfree86/os-support/linux/drm/kernel &amp;&amp;
make CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux &amp;&amp;
mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/ &amp;&amp;
cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o \
/lib/modules/`uname -r`/kernel/drivers/char/drm/ &amp;&amp;
depmod -a</command></userinput></screen>
<warning><para>If you recompile or upgrade your kernel, you will need to re-copy the
appropriate driver module(s)
to the kernel module library and rerun <command>depmod</command>.</para></warning>
<note><para>If you created <acronym>AGP</acronym> support as a module when compiling the kernel, you may
have to add a line to <filename>/etc/modules.conf</filename> to ensure
the agpgart module is loaded. For instance, the <acronym>AGP</acronym> version of the Radeon video card
will use the <filename>radeon.o</filename> driver. It will
need to have the line <screen>below radeon agpgart</screen> in
<filename>/etc/modules.conf</filename> to enable <acronym>DRI</acronym> support.</para></note>
</sect3>
</sect2>