Compiling and installing Nouveau
Posted by Sharar Ravitz in Linux, Nouveau driver on Friday, July 25, 2008
This began as an effort to purge all non-free blobs from my machine. In that quest I found an interesting program: vrms. From the wikipedia: "vrms (Virtual Richard M. Stallman) is a program that analyzes the set of currently-installed packages on a Debian-based system, and reports all of the packages from the non-free tree which are currently installed. Software gets placed in the non-free tree when it is agreed not to be too problematic for Debian to distribute but does not meet the Debian Free Software Guidelines and therefore cannot be included in their official distribution. For each program from 'non-free' installed, vrms displays an explanation of why it is non-free, if one is available."
Neat.
This mostly follows instructions found on the nouveau wiki page.
Install dependencies:
sudo apt-get install libsdl1.2-dev xorg-dev libdrm-dev git git-core libtool mesa-common-dev automake autoconf
grab the drm source:
git clone git://anongit.freedesktop.org/git/mesa/drm/
and the driver:
git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/
I placed these in the /usr/src directory. cd into drm.
./autogen.sh --prefix=/usr/
./configure --prefix=/usr/
make LINUXDIR=/path/to/kernel-headers
sudo make install
then cd into the linux-core directory.
make nouveau.o
then I made sym links for the modules (which only worked if I first cd into /lib/modules/`uname -r`/kernel/drivers/char/drm directory):
ln -s /usr/src/drm/linux-source/drm.ko drm.ko
ln -s /usr/src/drm/linux-source/nouveau.ko nouveau.ko
cd out of that directory and into xf86-video-nouveau
./autogen.sh
make
cp src/.libs/nouveau_drv.so /usr/lib/xorg/modules/drivers
depmod -ae
Final task is editing xorg.conf - This configuration worked for me:
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules/"
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "nouveau"
Option "Randr12"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
EndSection
If you have troubles compiling, specifically a complaint of "Module.symver is missing; modules will have no dependencies and modversions" - cd in to your /usr/src/linux dir and run:
make prepare scripts
After a day of pulling out hairs and tweaking - It works! Now I think I'll boldly test Gallium3D.
Update - galluim 3d works for me with openarena! I built using the instruction from the link above - and fired up openarea for a successful test. It actually ran the game - too fast. Here's some screenshots from a few other games I tried - supertux, freetennis, and netpanzer.

