Retinal Burn Photo & Design

mini-HOWTO: Compiling and Installing the mach64 Branch of DRI
Home
World Trip
More Photos
Linux
Links
 
Last Updated: Feb. 3, 2005

Permission is granted to make, modify and distribute copies of this document as you see fit.

Since I wrote this HOWTO, the build process for DRI has changed. See the DRI building guide for current instructions.

If you'd rather use binaries, look for info on snapshots here.

If you need instructions for building an older branch of the DRI (e.g. mach64-0-0-6-branch or earlier), read on...

Note: If you want to keep your existing X installation intact, you'll need to set ProjectRoot to /usr/X11R6-DRI in host.def as described below.

First, you need to have an installed copy of XFree86. You can get this from your distribution or download a binary release from XFree86.org. If you build XFree86 source, make sure you install the build before continuing. Next, read the DRI Compilation Guide, but don't actually do the steps until you have read the following.

To checkout the mach64 DRI branch (rather than the HEAD) from CVS, use the -r option with the branch tag. The current branch tag is: mach64-0-0-6-branch, and is based on XFree86 4.2.99.2 and Mesa 5.x.

% cd ~
% mkdir DRI-CVS
% cd DRI-CVS
% cvs -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login
(hit ENTER when prompted for a password)
% cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri \
	co -r mach64-0-0-6-branch xc

As mentioned above, to build DRI you now need to have an existing XFree86 installation, since the DRI CVS tree was pruned of code which isn't dependant on DRI. So before you compile you must (as root) create the ProjectRoot directory (which you should have defined in xc/config/cf/host.def as /usr/X11R6-DRI) and use lndir to make directories of symlinks back to the include and lib directories of your XFree86 installation. This will allow the compiler to find the library and include files from your installation needed to build the DRI drivers. When you install the drivers, they will go into the ProjectRoot directory, overwriting the links and leaving your original istallation intact. This way you only duplicate the files necessary to run the DRI enabled X server. Other supporting libraries and modules are provided by your existing installation.

% su
% mkdir /usr/X11R6-DRI
% cd /usr/X11R6-DRI
% mkdir include
% mkdir lib
% cd include
% lndir -silent -ignorelinks ../../X11R6/include
% cd ../lib
% lndir -silent -ignorelinks ../../X11R6/lib
The install process can have problems with multiple levels of symlinks, so you should check /usr/X11R6-DRI/lib/X11 to see if you have symlinks to symlinks in /usr/X11R6/lib/X11. You may want to delete these links and/or directories in /usr/X11R6-DRI/lib/X11 and point them to the appropriate place in /etc/X11.

Now follow the instructions in the DRI Compilation Guide to build and install DRI and the kernel modules (you need mach64.o). For AGP support, you must have the agpgart module loaded before you start X (the mach64 kernel module is loaded by the X server). I suggest adding modprobe agpgart to your rc.local init file. If you haven't configured your kernel with agpgart support or the module is not loaded, the driver will default to PCI operation -- this should work for both PCI and AGP cards. Note that the driver should work on PowerPC platforms, but AGP is not likely to be supported in the kernel on these platforms.

For more information on the status and limitations of the driver, see my mach64 DRI status page.


   

All images and text © 1998-2008 Leif Delgass, All Rights Reserved
(Unless otherwise specified).

Home | World Trip | Photos | Linux | Links



[Blue Ribbon Campaign]