Changeset 20f1da7


Ignore:
Timestamp:
07/25/2004 08:07:27 PM (20 years ago)
Author:
Randy McMurchy <randy@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
cadb42f
Parents:
b40beacc
Message:

Added instructions to remove linux/config.h source file includes and made various fixed to XFree86

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2497 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    rb40beacc r20f1da7  
    1919<itemizedlist>
    2020
     21<listitem><para>July 25th, 2004 [randy]: Added instructions to remove
     22linux/config.h includes from source video driver files and made various
     23fixes to XFree86.</para></listitem>
     24
    2125<listitem><para>July 24th, 2004 [randy]: Added instructions to install
    2226unformatted man pages and added a 'Command explanations' section to
  • x/installing/xfree86.xml

    rb40beacc r20f1da7  
    3535</sect3>
    3636
    37 
    3837<sect3><title><application>XFree86</application> dependencies</title>
    3938
     
    4342
    4443<sect4><title>Optional</title>
    45 <para><xref linkend="Linux_PAM"/> and the following packages are included in the <application>XFree86</application> package,
    46 however they
    47 are updated more often than the <application>XFree86</application> package and are highly recommended:
    48 <xref linkend="expat"/>, <xref linkend="freetype2"/>, <xref linkend="fontconfig"/>.</para>
     44<para><xref linkend="Linux_PAM"/>, the following packages are included in the
     45<application>XFree86</application> package, however they are updated more often
     46than the <application>XFree86</application> package and are highly recommended:
     47<xref linkend="expat"/>, <xref linkend="freetype2"/>,
     48<xref linkend="fontconfig"/>.</para>
    4949
    5050<note><para>If you choose not to install <application>expat</application>,
    51 <application>freetype2</application>, and <application>fontconfig</application>, the
    52 <filename>host.def</filename> file below will have to be modified to
     51<application>freetype2</application>, and <application>fontconfig</application>,
     52the <filename>host.def</filename> file below will have to be modified to
    5353instruct <application>XFree86</application> to build them.</para></note>
    5454</sect4>
     
    5656</sect3>
    5757
    58 
    5958<sect3><title>Download Instructions</title>
    6059
    61 <para>There are several files that need to be fetched from the download location:</para>
     60<para>There are several files that need to be fetched from the download
     61location:</para>
    6262<itemizedlist spacing='compact'>
    6363<listitem><para><filename>XFree86-4.4.0-src-1.tgz</filename></para></listitem>
     
    8282-->
    8383
    84 <para>The first three packages are the <application>XFree86</application> programs,
    85 the fourth and fifth are fonts, the sixth is normal documentation, and the seventh
    86 is hardcopy documentation. There are also two packages
    87 <filename>doctools-1.3.1.tgz</filename>,  which contain programs to regenerate hardcopy
    88 documentation, and <filename>utils-1.1.0.tgz</filename>, which contain
     84<para>The first three packages are the <application>XFree86</application>
     85programs, the fourth and fifth are fonts, the sixth is normal documentation,
     86and the seventh is hardcopy documentation. There are also two packages
     87<filename>doctools-1.3.1.tgz</filename>, which contain programs to regenerate
     88hardcopy documentation, and <filename>utils-1.1.0.tgz</filename>, which contain
    8989<application><acronym>GNU</acronym> <acronym>TAR</acronym></application>
    9090and <application>zlib</application> which are already installed on an
    9191<acronym>LFS</acronym> system.</para>
    9292
    93 <para>To check your downloads for integrity, download the <filename>SUMS.md5sum</filename>
    94 file. Then:</para>
     93<para>To check your downloads for integrity, download the
     94<filename>SUMS.md5sum</filename> file. Then:</para>
    9595
    9696<screen><userinput><command>md5sum -c SUMS.md5sum</command></userinput></screen>
     
    135135<acronym>AGP</acronym> video cards.</para>
    136136
    137 <para>In the "Character Devices" section, enable <acronym>AGP</acronym> Support and select the chipset
    138 support on your motherboard.  If you do not know the chipset, you may select
    139 all the chip types at the expense of extra kernel size. You can usually
    140 determine your motherboard's chipset by doing:</para>
    141 <screen><userinput><command>cat /proc/pci</command></userinput></screen>
     137<para>In the "Character Devices" section, enable <acronym>AGP</acronym> Support
     138and select the chipset support on your motherboard.  If you do not know the
     139chipset, you may select all the chip types at the expense of extra kernel size.
     140You can usually determine your motherboard's chipset by running the command
     141<command>lspci</command>, a program from the <xref linkend="pciutils"/> package.
     142</para>
    142143
    143144<para>In the "Character Devices" section, <emphasis>disable</emphasis> Direct
    144145Rendering Manager unless you have a Direct Rendering Infrastructure
    145 (<acronym>DRI</acronym>)
    146 supported video card.  A complete list of <acronym>DRI</acronym> supported video cards can
    147 be found at <ulink url="http://dri.sourceforge.net" /> in the Status section. 
    148 Currently,
     146(<acronym>DRI</acronym>) supported video card.  A complete list of
     147<acronym>DRI</acronym> supported video cards can be found at
     148<ulink url="http://dri.sourceforge.net" /> in the Status section. Currently,
    149149supported cards include those from 3dfx (Voodoo, Banshee), 3Dlabs,
    150 ATI (Rage Pro, Rage 128,
    151 Radeon 7X00, Radeon 2), Intel (i810, i815), and Matrox (G200, G400, G450).
    152 If you do enable <acronym>DRI</acronym> here, make sure you select the video card(s) you want
    153 to support as a <emphasis>module</emphasis>.</para>
     150ATI (Rage Pro, Rage 128, Radeon 7X00, Radeon 2), Intel (i810, i815), and
     151Matrox (G200, G400, G450). If you do enable <acronym>DRI</acronym> here, make
     152sure you select the video card(s) you want to support as a
     153<emphasis>module</emphasis>.</para>
    154154
    155155<para>Additionally NVidia provides their own closed source binary drivers,
    156 which do not make use of <acronym>DRI</acronym>. If you intend to use these drivers,
    157 do not enable <acronym>DRI</acronym>.</para>
    158 
    159 <para>If you made any changes to the kernel configuration, recompile the kernel.</para>
     156which do not make use of <acronym>DRI</acronym>. If you intend to use these
     157drivers, do not enable <acronym>DRI</acronym>.</para>
     158
     159<para>If you made any changes to the kernel configuration, recompile the
     160kernel.</para>
    160161
    161162<para>Copy <filename>/usr/src/linux/arch/i386/boot/bzImage</filename> and
     
    163164<filename>/boot</filename>, edit <filename>/etc/lilo.conf</filename>
    164165appropriately and run <filename>lilo</filename>. If you use
    165 <filename>grub</filename>, edit <filename>/boot/grub/grub.conf</filename>
     166<filename>grub</filename>, edit <filename>/boot/grub/menu.lst</filename>
    166167and add the new kernel to the boot menu.
    167168</para>
    168169
    169 <note><para>If you build <application>XFree86</application> in a chroot environment, make sure the kernel
    170 version of the base system and the target system are the same.  This is
    171 especially important if you enabled <acronym>DRI</acronym> support as a module as
    172 instructed above.</para></note>
     170<note><para>If you build <application>XFree86</application> in a
     171<command>chroot</command> environment, make sure the kernel version of the base
     172system and the target system are the same.  This is especially important if you
     173enabled <acronym>DRI</acronym> support as a module as instructed above.</para>
     174</note>
    173175
    174176</sect3>
     
    177179
    178180<para>Although <application>XFree86</application> will compile without a
    179 <filename>host.def</filename> file, the following file
    180 is recommended for customizing the installation. Start from
    181 the <filename class="directory">xc</filename> directory.</para>
     181<filename>host.def</filename> file, the following file is recommended for
     182customizing the installation. Start from the
     183<filename class="directory">xc</filename> directory.</para>
    182184
    183185<note><para>The <filename>host.def</filename> file is a
    184 <application>C</application> file, not the
    185 usual configuration file.  If you make any changes, be sure the comment characters
    186 (<userinput>/*</userinput> and <userinput>*/</userinput>)
    187 are balanced.  Most of the entries in the file below are
    188 commented out with the default settings shown.
    189 </para></note>
     186<application>C</application> file, not the usual configuration file.  If you
     187make any changes, be sure the comment characters (<userinput>/*</userinput>
     188and <userinput>*/</userinput>) are balanced.  Most of the entries in the file
     189below are commented out with the default settings shown.</para></note>
    190190
    191191<screen><userinput><command>cat &gt; config/cf/host.def &lt;&lt; "EOF"</command>
     
    320320<sect3>
    321321<title>Build Commands</title>
    322 <para>Install <application>XFree86</application> by running the following commands:</para>
    323 
    324 
    325 <screen><userinput><command>( make WORLDOPTS="" World 2&gt;&amp;1 | tee xfree-compile.log &amp;&amp; exit $PIPESTATUS ) &amp;&amp;
     322<para>Install <application>XFree86</application> by running the following
     323commands:</para>
     324
     325<screen><userinput><command>sed -i -e "s@#include &lt;linux/config.h&gt;@/* #include &lt;linux/config.h&gt; */@" \
     326`grep -lr linux/config.h *` &amp;&amp;
     327( make WORLDOPTS="" World 2&gt;&amp;1 | tee xfree-compile.log &amp;&amp; exit $PIPESTATUS ) &amp;&amp;
    326328make install &amp;&amp;
    327329make install.man &amp;&amp;
     
    336338<para>If you have one of the supported <acronym>DRI</acronym> cards and
    337339have enabled <acronym>DRI</acronym> kernel modules as explained
    338 above, you now need to update the kernel modules to ensure they are compatible with the
    339 current version of <application>XFree86</application>.  To do this, perform the following:</para>
     340above, you now need to update the kernel modules to ensure they are compatible
     341with the current version of <application>XFree86</application>. To do this,
     342perform the following:</para>
    340343
    341344<screen><userinput><command>cd programs/Xserver/hw/xfree86/os-support/linux/drm/kernel &amp;&amp;
    342 make  CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux  &amp;&amp;
     345make -f Makefile.linux  &amp;&amp;
    343346mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/  &amp;&amp;
    344347cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o \
     
    346349depmod -a</command></userinput></screen>
    347350
    348 <warning><para>If you recompile or upgrade your kernel, you will need to re-copy the
    349 appropriate driver module(s)
    350 to the kernel module library and rerun <command>depmod -a</command>.</para></warning>
    351 
    352 <note><para>If you created <acronym>AGP</acronym> support as a module when compiling the kernel, you may
    353 have to add a line to <filename>/etc/modules.conf</filename> to ensure
    354 the agpgart module is loaded.  For instance, the <acronym>AGP</acronym> version of the Radeon video card
    355 will use the <filename>radeon.o</filename> driver.  It will
    356 need to have the line <screen>below radeon agpgart</screen> in
    357 <filename>/etc/modules.conf</filename> to enable <acronym>DRI</acronym> support.</para></note>
     351<warning><para>If you recompile or upgrade your kernel, you will need to
     352re-copy the appropriate driver module(s) to the kernel module library and rerun
     353<command>depmod -a</command>.</para></warning>
     354
     355<note><para>If you created <acronym>AGP</acronym> support as a module when
     356compiling the kernel, you may have to add a line to
     357<filename>/etc/modules.conf</filename> to ensure the agpgart module is loaded.
     358For instance, the <acronym>AGP</acronym> version of the Radeon video card will
     359use the <filename>radeon.o</filename> driver.  It will need to have the line
     360<screen>below radeon agpgart</screen> in <filename>/etc/modules.conf</filename>
     361to enable <acronym>DRI</acronym> support.</para></note>
    358362
    359363</sect3>
     
    363367<title>Command explanations</title>
    364368
     369<para><command>sed -i -e "s@#include &lt;linux/config.h&gt;@...</command>: The
     370<application>Linux-Libc-Headers</application> package installed in
     371<acronym>LFS</acronym> installs a
     372<filename>/usr/include/linux/config.h</filename> file which is not compatible
     373with userspace applications. The recommended fix for applications including
     374this file is to remove it (see <ulink
     375url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/doc/FAQ">
     376linux-libc-headers FAQ</ulink>). The <command>sed</command> uses
     377<command>grep -lr</command> to replace all occurences. If you desire, just
     378remove (comment) the line in the appropriate video driver file if you
     379customized <filename>host.def</filename>.
     380</para>
     381
    365382<para><command>( make WORLDOPTS="" World 2&gt;&amp;1 | tee xfree-compile.log
    366383   &amp;&amp; exit $PIPESTATUS )</command>:
    367 This command runs multiple makefiles to completely rebuild the system.
    368 <envar>WORLDOPTS</envar>="" disables the default setting to continue after
    369 encountering an error. <parameter>2&gt;&amp;1</parameter> redirects error messages
    370 to the same location as standard output. The <command>tee</command> command
    371 allows viewing of the output while logging the results to a file. The parentheses
    372 around the command runs the entire comand in a subshell and finally the
    373 <command>exit $PIPESTATUS</command> ensures the result of the <command>make</command>
    374 is returned as the result and not the result of the <command>tee</command> command.</para>
    375 
    376 <note><para>When rebuilding <application>XFree86</application>, a separate command that may be used if only minor
    377 changes are made to the sources is <command>make
    378 Everything</command>.  This does not automatically remove generated
    379 files and only rebuilds those files or programs that are out
     384This command runs multiple <filename>Makefile</filename>s to completely rebuild
     385the system. <envar>WORLDOPTS</envar>="" disables the default setting to
     386continue after encountering an error. <parameter>2&gt;&amp;1</parameter>
     387redirects error messages to the same location as standard output. The
     388<command>tee</command> command allows viewing of the output while logging the
     389results to a file. The parentheses around the command runs the entire comand in
     390a subshell and finally the <command>exit $PIPESTATUS</command> ensures the
     391result of the <command>make</command> is returned as the result and not the
     392result of the <command>tee</command> command.</para>
     393
     394<note><para>When rebuilding <application>XFree86</application>, a separate
     395command that may be used if only minor changes are made to the sources is
     396<command>make Everything</command>. This does not automatically remove
     397generated files and only rebuilds those files or programs that are out
    380398of date.</para></note>
    381399
     
    384402ln -sf ../X11R6/include/{X11,GL} /usr/include</command></screen>
    385403These commands are present to enable other (broken) packages to build
    386 against <application>XFree86</application>.  We do this even though the Filesystem Hierarchy Standard
    387 says:
    388 "In general, software must not be installed or managed via the above
    389 symbolic links. They are intended for utilization by users only."</para>
    390 
    391 <para><command>make  CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux</command>: This builds the
    392 <application>XFree86</application> compatible kernel modules using the same compiler used to compile
    393 the kernel.</para>
     404against <application>XFree86</application>, even though the Filesystem
     405Hierarchy Standard says: "In general, software must not be installed or
     406managed via the above symbolic links. They are intended for utilization by
     407users only."</para>
     408
     409<!-- <para><command>make -f Makefile.linux</command>: This builds the
     410<application>XFree86</application> compatible kernel modules using the same
     411compiler used to compile the kernel.</para> -->
    394412
    395413<para><command>cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o
     
    408426<para>Edit <filename>/etc/ld.so.conf</filename> and add
    409427<filename class="directory">/usr/X11R6/lib</filename>.
    410 Run</para> <screen><userinput><command>ldconfig</command></userinput></screen>
    411 
    412 <para>Ensure <filename class='directory'>/usr/X11R6/bin</filename> is added to your
    413 <envar>PATH</envar> environment variable. Instructions for doing this are described
    414 in the section "<xref linkend='postlfs-config-profile'/>."</para>
     428Run: </para>
     429<screen><userinput><command>ldconfig</command></userinput></screen>
     430
     431<para>Ensure <filename class='directory'>/usr/X11R6/bin</filename> is added to
     432your <envar>PATH</envar> environment variable. Instructions for doing this are
     433described in the section "<xref linkend='postlfs-config-profile'/>."</para>
    415434 
    416435<para>Expand the <envar>PKG_CONFIG_PATH</envar> so that other packages
     
    425444
    426445Adjust the symbolic link as necessary for other types of mice.  For instance,
    427 a serial mouse on the first serial port would be linked to ttyS1.</para>
     446a serial mouse on the first serial port would be linked to ttyS0.</para>
    428447
    429448<para>Create the <filename>XF86Config</filename> file with:
     
    435454
    436455<para>Edit <filename>XF86Config.new</filename> to suit your system.  The
    437 details of the file are located in the man
    438 page <command>man XF86Config</command>.  Some things you may want to
    439 do are:</para>
     456details of the file are located in the man page
     457<command>man XF86Config</command>.  Some things you may want to do are:</para>
    440458
    441459<itemizedlist>
     
    446464directories completely.</para></listitem>
    447465
    448 <listitem><para>Section "Monitor".  Specify the <parameter>VertRefresh</parameter>
    449 and <parameter>HorizSync</parameter> values if the system does not automatically
    450 detect the monitor and its values.</para></listitem>
     466<listitem><para>Section "Monitor".  Specify the
     467<parameter>VertRefresh</parameter> and <parameter>HorizSync</parameter> values
     468if the system does not automatically detect the monitor and its values.</para>
     469</listitem>
    451470
    452471<listitem><para>Section "InputDevice".  You may want to change the keyboard
    453 autorepeat rate by
    454 adding <parameter>Option "Autorepeat" "250 30"</parameter>.</para></listitem>
     472autorepeat rate by adding <parameter>Option "Autorepeat" "250 30"</parameter>.
     473</para></listitem>
    455474
    456475<listitem><para>Section "Device".  You may want to set some of the options
     
    460479<listitem><para>Section "Screen".  Add a DefaultDepth statement such
    461480as: <parameter>DefaultDepth 16</parameter>. In the SubSection for your
    462 default depth, add a modes line such
    463 as: <parameter> Modes "1280x1024" "1024x768"</parameter>.
    464 The first mode listed will normally be the starting
    465 resolution.</para></listitem>
     481default depth, add a modes line such as:
     482<parameter> Modes "1280x1024" "1024x768"</parameter>. The first mode listed
     483will normally be the starting resolution.</para></listitem>
    466484
    467485</itemizedlist>
     
    471489You will only get a gray background with an X-shaped mouse cursor, but it
    472490confirms the system is working.  Exit with Control-Alt-Backspace.  If the
    473 system does not work, take a look
    474 at <filename>/var/log/XFree86.0.log</filename> to see what went
    475 wrong.</para>
     491system does not work, examine <filename>/var/log/XFree86.0.log</filename> to
     492see what went wrong.</para>
    476493
    477494<para>Move the configuration file to its final location:</para>
     
    486503<command>EOF</command></userinput></screen>
    487504This provides an initial screen with an xterm and a clock that is managed by a
    488 simple window manager, Tab Window Manager.  For details of twm, see the
    489 man page.</para>
     505simple window manager, Tab Window Manager. For details of
     506<command>twm</command>, see the man page.</para>
    490507
    491508<note>
     
    493510<para>When needed, <application>XFree86</application> creates the directory
    494511<filename>/tmp/.ICE-unix</filename> if it does not exist. If this directory is
    495 not owned by root, <application>XFree86</application> delays startup by a few seconds
    496 and also appends a warning to the logfile. This also affects startup of other
    497 applications. To improve performance, it is advisable to manually create the directory
    498 before XFree86 uses it. Add the file creation to <filename>/etc/sysconfig/createfiles</filename>
    499 that is sourced by the
    500 <filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
     512not owned by root, <application>XFree86</application> delays startup by a few
     513seconds and also appends a warning to the logfile. This also affects startup of
     514other applications. To improve performance, it is advisable to manually create
     515the directory before <application>XFree86</application> uses it. Add the file
     516creation to <filename>/etc/sysconfig/createfiles</filename> that is sourced by
     517the <filename>/etc/rc.d/init.d/cleanfs</filename> startup script.</para>
    501518
    502519<screen><userinput><command>cat &gt;&gt; /etc/sysconfig/createfiles &lt;&lt; "EOF"</command>
     
    516533
    517534<para>The <application>XFree86</application> package contains the
    518 <application>X</application> Window System for Linux
    519 (and other operating systems).  It includes
    520 the <application>X</application> server, fonts, xterm, a simple window manager (twm),
    521 various utilities, video output drivers,
    522 and various input drivers including the mouse and keyboard.</para>
    523 
    524 <para><application>XFree86</application> also contains libraries and header files for development of
    525 the <application>X</application> Window System programs.</para>
     535<application>X</application> Window System for Linux (and other operating
     536systems).  It includes the <application>X</application> server, fonts,
     537<command>xterm</command>, a simple window manager (<command>twm</command>),
     538various utilities, video output drivers, and various input drivers including
     539the mouse and keyboard.</para>
     540
     541<para><application>XFree86</application> also contains libraries and header
     542files for development of the <application>X</application> Window System
     543programs.</para>
    526544
    527545</sect2>
     
    530548
    531549<note><para>The following list of programs is not comprehensive. The
    532 full list is in <filename class="directory">/usr/X11R6/bin</filename>.  For additional
    533 information about these programs, see the respective man page.</para></note>
     550full list is in <filename class="directory">/usr/X11R6/bin</filename>.  For
     551additional information about these programs, see the respective man
     552page.</para></note>
    534553
    535554<sect3>
     
    542561<para><command>xf86config</command> is an interactive program for
    543562generating an <filename>XF86Config</filename> file for use with
    544 <application>XFree86</application> <application>X</application> servers.</para></sect3>
     563<application>XFree86</application> <application>X</application>
     564servers.</para></sect3>
    545565
    546566<sect3><title>xf86cfg</title>
     
    552572<sect3><title>startx</title>
    553573<para><command>startx</command> is a script to initialize the
    554 <application>X</application> session. It runs <command>xinit</command>.</para></sect3>
     574<application>X</application> session. It runs <command>xinit</command>.</para>
     575</sect3>
    555576
    556577<sect3><title>xinit</title>
     
    559580
    560581<sect3><title>twm</title>
    561 <para><command>twm</command> (Tab Window Manager) is a window manager included with the
    562 <application>X</application> Window System.</para></sect3>
     582<para><command>twm</command> (Tab Window Manager) is a window manager included
     583with the <application>X</application> Window System.</para></sect3>
    563584
    564585<sect3><title>xterm</title>
     
    571592
    572593<sect3><title>x11perf</title>
    573 <para><command>x11perf</command> is an <application>X</application>11 server performance test program.</para></sect3>
     594<para><command>x11perf</command> is an <application>X</application>11 server
     595performance test program.</para></sect3>
    574596
    575597<sect3><title>xlsfonts</title>
     
    593615
    594616<sect3><title>xmodmap</title>
    595 <para><command>xmodmap</command> is a utility for modifying keymaps and pointer button mappings
    596 in <application>X</application>.</para></sect3>
     617<para><command>xmodmap</command> is a utility for modifying keymaps and pointer
     618button mappings in <application>X</application>.</para></sect3>
    597619
    598620</sect2>
     621
    599622</sect1>
Note: See TracChangeset for help on using the changeset viewer.