Difference between revisions of "Building mesa with dri for fbcon"

From Organic Design wiki
m (libdrm)
m (libdrm)
Line 10: Line 10:
 
==libdrm==
 
==libdrm==
 
These are the kernel modules. Here is an example configure script to set some options for ''sandbox'' style compilation - where we don't want to install binaries on the host system. This is because we eventually want to cross compile for a target system.
 
These are the kernel modules. Here is an example configure script to set some options for ''sandbox'' style compilation - where we don't want to install binaries on the host system. This is because we eventually want to cross compile for a target system.
 +
 +
I obtained the DRM source with git.
 
<pre>
 
<pre>
#!/bin/sh
+
cd
ROOT=/home/rob/framebuffer/install
+
mkdir drm
 +
cd drm
 +
git clone git://anongit.freedesktop.org/git/mesa/drm
 +
 
 +
export ROOT=/home/rob/framebuffer/install
 
cd drm
 
cd drm
 
./configure \
 
./configure \
Line 27: Line 33:
 
</pre>
 
</pre>
  
I obtained the DRM source with git.
+
Then
 +
 
 
<pre>
 
<pre>
cd
 
mkdir drm
 
cd drm
 
git clone git://anongit.freedesktop.org/git/mesa/drm
 
 
cd
 
cd
 
mkdir mesa
 
mkdir mesa

Revision as of 23:10, 3 December 2006

You will need

Sources:

  • libdrm-2.2
  • MesaLib-6.5.2
  • Kernel-2.6.16.18

Process

The process requires both kernel space and user space software. You will need the kernel, the DRM/DRI and mesa source trees.

libdrm

These are the kernel modules. Here is an example configure script to set some options for sandbox style compilation - where we don't want to install binaries on the host system. This is because we eventually want to cross compile for a target system.

I obtained the DRM source with git.

cd
mkdir drm
cd drm
git clone git://anongit.freedesktop.org/git/mesa/drm

export ROOT=/home/rob/framebuffer/install
cd drm
./configure \
--prefix=$ROOT/usr \
--exec-prefix=$ROOT/usr \
--bindir=$ROOT/usr/bin \
--sbindir=$ROOT/usr/sbin \
--libexecdir=$ROOT/usr/lib \
--sysconfdir=$ROOT/etc \
--datadir=$ROOT/usr/share \
--localstatedir=$ROOT/var \
--mandir=$ROOT/usr/man \
--infodir=$ROOT/usr/info

Then

cd
mkdir mesa
cd mesa
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa co Mesa
cd
mkdir kernel
cd kernel
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.18.tar.bz2
tar xjf linux-2.6.16.18.tar.bz2
cd ~/drm/drm/linux-core
make LINUXDIR=~/kernel/linux-2.6.18/

All going well you will end up with a bunch of .o files in your ~/drm/drm/linux-core directory.

Now you need to build mesa linking against these .o files.

cd ~/mesa/Mesa-6.5.2
make realclean
sed -ri 's|DRM_SOURCE_PATH.+$|DRM_SOURCE_PATH = $(TOP)/../../drm/drm|' configs/default

We need to edit the config to point to the DRM modules. And make it.

make linux-solo

See also