summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorcaner <caner.altinbasak@gmail.com>2008-02-14 09:33:05 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-14 09:33:26 -0700
commit5047a8ae1989b506133563a266001fd6cc184536 (patch)
tree2cfe05e6d3f77a4e61d11ced0bbd0abd263ac8e6 /docs
parent4813946d366a0d61e0be1dacec6d3077bc939b48 (diff)
miniglx doc updates
Diffstat (limited to 'docs')
-rw-r--r--docs/fbdev-dri.html201
1 files changed, 141 insertions, 60 deletions
diff --git a/docs/fbdev-dri.html b/docs/fbdev-dri.html
index c3724b37129..e941b1679ed 100644
--- a/docs/fbdev-dri.html
+++ b/docs/fbdev-dri.html
@@ -1,15 +1,15 @@
-<html>
+<html><head><title>Mesa fbdev/DRI Environment</title>
-<TITLE>Mesa fbdev/DRI Environment</TITLE>
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-<BODY>
+<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-<center><H1>Mesa fbdev/DRI Drivers</H1></center>
+<body>
+<center><h1>Mesa fbdev/DRI Drivers</h1></center>
+<br>
-<H1>1. Introduction</H1>
+<h1>1. Introduction</h1>
<p>
The fbdev/DRI environment supports hardware-accelerated 3D rendering without
@@ -22,60 +22,131 @@ Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
<p>
Applications in the fbdev/DRI environment use
-the <a href="MiniGXL.html"> MiniGLX</a> interface to choose pixel
+the <a href="http://www.nabble.com/file/p15480666/MiniGXL.html"> MiniGLX</a> interface to choose pixel
formats, create rendering contexts, etc. It's a subset of the GLX and
Xlib interfaces allowing some degree of application portability between
the X and X-less environments.
</p>
<p>
-Some of the files needed for building this configuration are not included
-in the normal Mesa releases so you'll need to get the latest sources
-sources from the <a href="repository.html">git repository</a>.
+Note that this environment is not well-supported and these instructions
+may not be completely up to date.
</p>
+<br>
-<p>
-This fbdev/DRI environment isn't well supported.
-Code and documentation updates/patches are welcomed.
-</p>
<h1>2. Compilation</h1>
+<p>
+
+<h2>2.1 glxproto</h2>
+Get <a href="http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/include/GL/glxproto.h?rev=1.9">glxproto.h</a>. Copy it to the /mesa/include/GL/ directory.
+</p>
+
+<h2>2.2 libpciaccess</h2>
<p>
-You'll need the DRM and pciaccess libraries. Check with:
+Check if you have libpciaccess installed:
</p>
-<pre>
- pkg-config --modversion libdrm
- pkg-config --modversion pciaccess
-</pre>
+<pre>pkg-config --modversion pciaccess
+</pre>
<p>
-You can get them from the git repository with:
+If not you can download the latest code from:
</p>
-<pre>
- git clone git://anongit.freedesktop.org/git/mesa/drm
- git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
+<pre> git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
</pre>
-
<p>
-See the README files in those projects for build/install instructions.
+Run autogen.sh to generate a configure file. autogen.sh uses autoconf
+utility. This utility may not be installed with your linux distro,
+check if it is available. if not you can use your package manager or
+type:
+</p>
+<pre>sudo apt-get install autoconf
+</pre>
+The next step is to install the libpciaccess library.
+<pre>make
+make install
+</pre>
+<p> Now your libpciaccess.a file is saved into /usr/local/lib
+directory. If you have a libpciaccess.a in /usr/lib you may simply copy
+and overwrite these files. Don't forget to copy libpciaccess.pc file to
+/usr/lib/pkgconfig, which is also located in /usr/local/lib/pkgconfig/.
+Or you may use the following system variables:
+</p>
+<pre>export LD_LIBRARY_PATH=/usr/local/lib
+export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+</pre>
+
+<h2>2.3 drm</h2>
+
+<p>The next step is to compile the drm. DRM consists of two seperate parts,
+the DRM client library(lindrm.so) and kernel device module(such as
+radeon.ko). We need to make a small change in kernel device module. So
+you need to download the kernel source. You may choose the nearest
+mirror from www.kernel.org, or you are using Fedora Core 5, for
+example, you may need to install RPMs such as:
+kernel-smp-devel-2.16.15-1.2054_FC5.i686.rpm
+kernel-devel-2.6.15-1.2054_FC5.i686.rpm
+etc. You can find a detailed information <a href="http://www.howtoforge.com/kernel_compilation_fedora">here.</a>
</p>
+<p>You will find drm_drv.c at /usr/src/LINUX-VERSION/drivers/char/drm/. Edit this code and comment out the following part:
+</p>
-<p>
+<pre>
+ /* ||
+ ((ioctl-&gt;flags &amp; DRM_MASTER) &amp;&amp; !priv-&gt;master)*/
+</pre>
+Now you are ready to compile your kernel. If your kernel version is
+identical to the version you have compiled, you can simply over write
+your new "ko" files over older ones. If you have compiled a different
+kernel, you must configure your grub or lilo to be able to boot your
+new kernel. <p>
You'll need fbdev header files. Check with:
</p>
<pre>
- ls -l /usr/include/linux/fb.h
+ ls -l /usr/include/linux/fb.
</pre>
+<p>This file may be missing if you have not installed linux header files.
-<p>
-You'll need to get Mesa from git (see above).
-Compile Mesa with the 'linux-solo' configuration:
+
+<h2>2.4 Mesa</h2>
+
+</p><p>Get latest development Mesa sources from git repository
+(currently 7.1-prerelease)
+</p>
+<pre>
+ git clone git://anongit.freedesktop.org/git/mesa/mesa
+</pre>
+
+<p>You will need the makedepend utility which is a part of mesa project
+to build your linux-solo. You probably wont have this utility. You can
+download its source from following git repulsitory:
</p>
<pre>
- make linux-solo
+ git clone git://anongit.freedesktop.org/git/xorg/util/makedepend
+</pre>
+
+<p>Get the latest stable mesa version from SourceForge (currently 7.0.3)
+<a href="http://sourceforge.net/project/showfiles.php?group_id=3">http://sourceforge.net/project/showfiles.php?group_id=3</a>
+</p>
+
+<p>Copy the miniglx folder from 7.1-prerelease to 7.0.3.
+You may also extract GLUT to 7.0.3 version at this step.
+</p>
+
+<p>Edit linux-solo.conf at /conf directory, just only compile the
+graphics driver you need, delete the unwanted drivers names from the
+list(some drivers are causing problems...)
+</p>
+<pre>
+ while(build==0)
+ {
+ make linux-solo
+
+ There will be some missing header files, copy them from 7.1-prerelease
+ }
</pre>
<p>
@@ -83,22 +154,40 @@ When complete you should have the following:
</p>
<ul>
<li>lib/libGL.so - the GL library which applications link with
-<li>lib/*_dri_so - DRI drivers
-<li>lib/miniglx.conf - sample MiniGLX config file
-<li>progs/miniglx/* - several MiniGLX sample programs
-</ul>
+</li><li>lib/*_dri_so - DRI drivers
+</li><li>lib/miniglx.conf - sample MiniGLX config file
+</li><li>progs/miniglx/* - several MiniGLX sample programs
+</li></ul>
+
+To install these files into appropriate locations in system:
+<pre>
+ make install
+</pre>
+Now your openGL libraries are copied to /usr/local/lib and
+miniglx.conf is copied to /etc. You may copy them to /usr/lib and
+overwrite your old GL libraries. Or you may export following variable:
+
+<pre>
+ export LIBGL_DRIVERS_PATH=/usr/local/lib
+</pre>
+<br>
<h1>3. Using fbdev/DRI</h1>
<p>
If an X server currently running, exit/stop it so you're working from
-the console.
+the console. Following command shuts down the x window and also the multi user support.
</p>
+<pre>
+ init 1
+</pre>
-
-<h2>3.1 Load Kernel Modules</h2>
+<p>Also you may define the runlevel as 1 in "/etc/inittab". Your system
+will always start in single user mode and without x-window with this
+option set.
+</p><h2>3.1 Load Kernel Modules</h2>
<p>
You'll need to load the kernel modules specific to your graphics hardware.
@@ -112,8 +201,7 @@ As root, the kernel modules can be loaded as follows:
<p>
If you have Intel i915/i945 hardware:
</p>
-<pre>
- modprobe agpgart # the AGP GART module
+<pre> modprobe agpgart # the AGP GART module
modprobe intelfb # the Intel fbdev driver
modprobe i915 # the i915/945 DRI kernel module
</pre>
@@ -121,8 +209,7 @@ If you have Intel i915/i945 hardware:
<p>
If you have ATI Radeon/R200 hardware:
</p>
-<pre>
- modprobe agpgart # the AGP GART module
+<pre> modprobe agpgart # the AGP GART module
modprobe radeonfb # the Radeon fbdev driver
modprobe radeon # the Radeon DRI kernel module
</pre>
@@ -130,8 +217,7 @@ If you have ATI Radeon/R200 hardware:
<p>
If you have ATI Rage 128 hardware:
</p>
-<pre>
- modprobe agpgart # the AGP GART module
+<pre> modprobe agpgart # the AGP GART module
modprobe aty128fb # the Rage 128 fbdev driver
modprobe r128 # the Rage 128 DRI kernel module
</pre>
@@ -139,8 +225,7 @@ If you have ATI Rage 128 hardware:
<p>
If you have Matrox G200/G400 hardware:
</p>
-<pre>
- modprobe agpgart # the AGP GART module
+<pre> modprobe agpgart # the AGP GART module
modprobe mgafb # the Matrox fbdev driver
modprobe mga # the Matrox DRI kernel module
</pre>
@@ -148,8 +233,7 @@ If you have Matrox G200/G400 hardware:
<p>
To verify that the agpgart, fbdev and drm modules are loaded:
</p>
-<pre>
- ls -l /dev/agpgart /dev/fb* /dev/dri
+<pre> ls -l /dev/agpgart /dev/fb* /dev/dri
</pre>
<p>
Alternately, use lsmod to inspect the currently installed modules.
@@ -160,16 +244,15 @@ If you have problems, look at the output of dmesg.
<h2>3.2 Configuration File</h2>
<p>
-Copy the sample miniglx.conf to /etc/miniglx.conf and review/edit its contents.
+review/edit /etc/miniglx.conf.
Alternately, the MINIGLX_CONF environment variable can be used to
indicate the location of miniglx.conf
</p>
To determine the pciBusID value, run lspci and examine the output.
For example:
-</p>
-<pre>
- /sbin/lspci:
+<p></p>
+<pre> /sbin/lspci:
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
</pre>
<p>
@@ -192,15 +275,13 @@ for example.
Change to the <code>Mesa/progs/miniglx/</code> directory and
start the sample_server program in the background:
</p>
-<pre>
- ./sample_server &amp;
+<pre> ./sample_server &amp;
</pre>
<p>
Then try running the <code>miniglxtest</code> program:
</p>
-<pre>
- ./miniglxtest
+<pre> ./miniglxtest
</pre>
<p>
You should see a rotating quadrilateral which changes color as it rotates.
@@ -211,7 +292,7 @@ It will exit automatically after a bit.
If you run other tests in the miniglx/ directory, you may want to run
them from a remote shell so that you can stop them with ctrl-C.
</p>
-
+<br>
<h1>4.0 Troubleshooting</h1>
@@ -220,8 +301,7 @@ them from a remote shell so that you can stop them with ctrl-C.
<li>
If you try to run miniglxtest and get the following:
<br>
-<pre>
- [miniglx] failed to probe chipset
+<pre> [miniglx] failed to probe chipset
connect: Connection refused
server connection lost
</pre>
@@ -235,7 +315,7 @@ It means that the sample_server process is not running.
<h1>5.0 Programming Information</h1>
<p>
-OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
+OpenGL/Mesa is interfaced to fbdev via the <a href="http://www.nabble.com/file/p15480666/MiniGLX.html">MiniGLX</a>
interface.
MiniGLX is a subset of Xlib and GLX API functions which provides just
enough functionality to setup OpenGL rendering and respond to simple
@@ -256,5 +336,6 @@ See the <code>GL/miniglx.h</code> header file for details.
</p>
+
</body>
</html>