To get started, installing all build dependencies of the mesa source
package should be sufficient, along with the essential build tools,
and git:
$ sudo apt-get install build-essential git
$ sudo apt-get build-dep mesa
Make sure you have some disc space available, since the git repository
is over 120MB, and since the mesa directory is over 500MB after a
build. Once you’re ready, grab the upstream mesa sources:
$ git clone git://anongit.freedesktop.org/mesa/mesa mesa.git
$ cd mesa.git
$ autoreconf -vfi
Here’s what the ./configure call will look like:
$ ./configure --prefix=/usr \
--enable-driglx-direct \
--enable-gles1 \
--enable-gles2 \
--enable-glx-tls \
--with-dri-driverdir=/usr/lib/dri \
--with-egl-platforms='drm x11' \
…
Now, what are the parameters to replace “…” with? Basically, if
you determined an Intel driver (i915 or i965), you want to use the
classic drivers and to disable the Gallium drivers. Other drivers are
only available on Gallium (r300, r600, radeonsi and more).
Running ./configure --help might be useful.
Examples for common drivers:
Now, once you’ve run ./configure, time for your favorite beverage: