Intel Linux Graphics Driver Build Guide
1. Introduction
This guide is for those users who would like to build the latest driver from scratch.
Section 3 is for people who only need build the 2D driver to try a new 2D feature or bug fix. Section 4 is for people who want to build the whole stack including 3D.
2. Getting source
To make the Intel graphics chipset work, below components are needed:
1, kernel module agpgart and drm: included in Linux kernel.
2, libdrm: included in freedesktop drm source.
3,
Xorg 2D driver:
xf86-video-intel.
4,
To get the detailed download address for above
components, please refer to http://intellinuxgraphics.org/download.html.
3. 2D only driver build
In order to test or use the latest Intel X driver, you typically don't
need to upgrade other components of the graphics stack, like Mesa or the
DRM drivers. In order to build the driver, you'll need several development
packages installed (list taken from the Fedora build requirements for the
driver):
- autoconf
- automake
- libtool
- hwdata (for PCI
IDs)
- xorg-x11-server-Xorg
- xorg-x11-server-sdk
- libXvMC-devel
- mesa-libGL-devel
-
libdrm-devel
If these packages are available, building should be as simple as:
$
./autogen
$ make
$ sudo -c "make install"
Note that depending on your distribution, you may need extra flags, like --prefix=, --exec-prefix=, --libdir=, --sysconfdir=, etc. depending on where your X server is installed (see ./configure --help for details).
4. Whole stack building
We
suppose you have downloaded all components under directory $DOWN_ROOT
except kernel source.
4.1 Linux kernel
Just using an upstream kernel is fine in most cases, and you can build customized kernel if needed. The graphics related kernel modules include DRM (drm and i915) and AGPGART (agpgart and intel-agp).
4.2 libdrm
Build and install libdrm:
$
cd $DOWN_ROOT/drm
$
./autogen.sh
Note: libdrm installs to /usr/local/lib by default. To install in /usr/lib run:
$
./autogen.sh --prefix=/usr --exec-prefix=/
$
make
$
make install
libdrm.so will be installed to /usr/lib.
4.3 Xorg 2D driver
If
you install xorg in another directory(refered as $XORG_DIR) instead of overriding
the xorg shipped in your Linux distribution, you need set two macros at
first:
$
export PKG_CONFIG_PATH=${XORG_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
$
export ACLOCAL="aclocal -I
${XORG_DIR}/share/aclocal"
Of
course, if you install xserver to another
directory, you need compile all xorg modules. As
for the detailed guide about xserver and xorg module compilation, please refer to Xorg Modular
Developers' Guide.
The compilation of 2D driver is
simple:
$
cd
$DOWN_ROOT/xf86-video-intel
$
./autogen.sh --prefix=${XORG_DIR}
$
make && make install
At
last, 2D driver library file (intel_drv.so) will
be installed to $XORG_DIR/lib/xorg/modules/drivers/.
4.4 Mesa and 3D driver
You can refer to http://wiki.x.org/wiki/Development/git for new building process and skip this section.
Please note that additional parameters might be needed to include features not enabled by default in Mesa builds. Those parameters must be appended to the ./autogen.sh build script to enable the features below:
- To enable floating-point textures support, add the '--enable-texture-float' parameter.
- To build GL ES1 libraries, add the '--enable-gles1' parameter.
- To build GL ES2 libraries, add the '--enable-gles2' parameter.
- If you only need Intel driver, you can specify it via the '--with-dri-drivers="i915 i965"' parameter.
5. Reference
[1] http://intellinuxgraphics.org/testing.html
- Intel Linux graphics website.
[2] http://wiki.x.org/wiki/Development/git - Document about building and installing whole stack.
[3]
http://wiki.x.org/wiki/ModularDevelopersGuide
- Document about building and installing Xorg.
