The process detailed in this tutorial is for an old version of X.org. I have successfully enable DRI with my ATI Rage Mobility M1 in 7.04 Feisty Fawn (X.org 7.2). The steps are a bit involved, but it's all quite nicely documented on xorg.freedesktop.org. Also, it's entirely possible that there is an easier way to grab the necessary sources than via GIT, but this way you will have the newest ATI driver.
NOTE: I have not tried this on anything other than 7.04! Follow these steps at your own risk with earlier versions of Ubuntu.
EDIT: After the Ubuntu upgrade to 2.6.20-14, I downloaded everything again and tried to duplicate the process with these instructions with one hitch. The source for /tmp/working/drm/linux-core/drm_compat.c needs to have the vm_insert_pfn() function block-commented out. This is kind of a pain in the butt way to go about doing things!
SOURCES:
Compiling Modular X.org Source
Compiling DRI/DRM Support
The rough steps are as follows:
1. install the needed sources, headers, and software
Code:
sudo apt-get build-dep mesa
sudo apt-get build-dep libdrm
sudo apt-get install git-core autoconf automake libtool
sudo apt-get install libxmu-headers libxmu-dev libxi-dev libdrm-dev libxfixes-dev libxdamage-dev mesa-common-dev
sudo apt-get install xserver-xorg-dev
2. install the latest source trees for drm and mesa in a new directory
Code:
mkdir /tmp/working
cd /tmp/working
wget 'http://xorg.freedesktop.org/wiki/ModularDevelopersGuide?action=AttachFile&do=get&target=git_xorg.sh' -O git_xorg.sh
chmod a+x git_xorg.sh
./git_xorg.sh
git clone git://anongit.freedesktop.org/git/mesa/mesa
and finally, in the event that this doesn't download the 'drm' folder:
Code:
git clone git://anongit.freedesktop.org/git/mesa/drm
3. prepare the build directory
Code:
mkdir /tmp/build-dir
mkdir /tmp/build-dir/mesalibs
mkdir /tmp/build-dir/drm
4. prepare to build the new ati driver
sometimes running 'make' during steps 3 and 4 will result in a 'nothing to make' message. don't panic! the documentation for the build states this is normal and to run the 'make' instruction prior to a 'make install' regardless.
Code:
cd /tmp/working/util/macros
./autogen.sh --prefix=/tmp/build-dir
make
make install
export PKG_CONFIG_PATH=/tmp/build-dir/lib/pkgconfig
export ACLOCAL="aclocal -I /tmp/build-dir/share/aclocal"
5. build the necessary protos for the driver build step
Code:
cd /tmp/working/proto/fontsproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
cd /tmp/working/proto/xineramaproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
cd /tmp/working/proto/xf86miscproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
cd /tmp/working/proto/xf86driproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
cd /tmp/working/proto/randrproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
cd /tmp/working/proto/randerproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
cd /tmp/working/proto/videoproto
./autogen.sh --prefix=/tmp/build-dir
make
make install
6. build the new ati driver
Code:
cd /tmp/working/driver/xf86-video-ati
./autogen.sh --prefix=/tmp/build-dir
make
make install
7. build dri in the mesa tree (use make linux-dri-x86 for x86-specific optimizations)
Code:
cd /tmp/working/mesa
nano configs/linux-dri
//locate the line that begins 'DRI_DIRS = ....' (near the bottom) and edit it to be 'DRI_DIRS = mach64'
//this will build only the DRI module that you need
make linux-dri
cp -P /tmp/working/mesa/lib/* /tmp/build-dir/mesalibs
8. build drm NOTE: if you see "error: previous declaration of ‘vm_insert_pfn’ was here", you will need to comment out the function "vm_insert_pfn" in drm_compat.c and run make again.
Code:
cd /tmp/working/drm/linux-core
make mach64.o
cp *.ko /tmp/build-dir/drm
9. make backups of files from the following locations:
/lib/modules/$KERNEL/kernel/drivers/char/drm/ (make a backup of drm.ko)
/usr/lib/xorg/modules/drivers/ (at least backup ati_drv.so, atimisc_drv.so, r128_drv.so, and radeon_drv.so)
/usr/lib/dri/ (backup everything)
10. install everything (the last command will cause X to quit, and it will come back using the new driver... but you'll still need to reboot for DRI to load)
Code:
sudo cp -P /tmp/build-dir/mesalibs/* /usr/lib/dri/
sudo cp /tmp/build-dir/drm/* /lib/modules/$KERNEL/kernel/drivers/char/drm/
sudo depmod -a
sudo cp /tmp/build-dir/lib/xorg/modules/drivers/* /usr/lib/xorg/modules/drivers/
11. reboot and check glxinfo. if X won't work, at least you made backups in step 9. you DID do that, didn't you?
Bookmarks