summaryrefslogtreecommitdiff
path: root/Building.mdwn
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@freedesktop.org>2013-04-14 00:03:00 -0700
committerJoe Rayhawk <jrayhawk@freedesktop.org>2013-04-14 00:03:00 -0700
commit9f6797a814e88695f0816bb9a5f2b6bd90208098 (patch)
tree403904b77df9d95a60855fcf6e24cacade1e85f2 /Building.mdwn
parent6a13e76d94d60db1e07639785e539318925bec9e (diff)
moin2iki: Redoing a bunch of preformatted text and lists that moin2mdwn kinda screwed up
Diffstat (limited to 'Building.mdwn')
-rw-r--r--Building.mdwn196
1 files changed, 82 insertions, 114 deletions
diff --git a/Building.mdwn b/Building.mdwn
index 7a1a58b..3cf82b3 100644
--- a/Building.mdwn
+++ b/Building.mdwn
@@ -27,13 +27,10 @@ You need a current version (7.4, ie. xserver 1.5 as of this writing) of X.org (c
If you are using Debian or Ubuntu you can install the packages with:
-
-[[!format txt """
-apt-get build-dep libdrm mesa
-apt-get install linux-headers-`uname -r`
-apt-get install libxi-dev libxmu-dev x11proto-xf86vidmode-dev
-apt-get install git-core autoconf automake libtool
-"""]]
+ apt-get build-dep libdrm mesa
+ apt-get install linux-headers-`uname -r`
+ apt-get install libxi-dev libxmu-dev x11proto-xf86vidmode-dev
+ apt-get install git-core autoconf automake libtool
## Getting the latest source trees
@@ -44,70 +41,57 @@ Get the source trees using two `git` commands. These commands should be run in
The clean DRM source tree takes about 4MB of disk space.
-
-[[!format txt """
-git clone git://anongit.freedesktop.org/git/mesa/drm
-"""]]
+ git clone git://anongit.freedesktop.org/git/mesa/drm
### Getting Mesa
The clean Mesa source tree takes about 32MB of disk space.
-
-[[!format txt """
-git clone git://anongit.freedesktop.org/git/mesa/mesa
-"""]]
+ git clone git://anongit.freedesktop.org/git/mesa/mesa
## Building libdrm
The Mesa drivers now require `libdrm` to be installed. Do the following to build `libdrm`:
+ cd drm
+ ./autogen.sh
-[[!format txt """
-cd drm
-./autogen.sh
-"""]]
**Note:** `libdrm` installs to `/usr/local/lib` by default. To install in `/usr/lib` run:
-[[!format txt """
-./configure --prefix=/usr
-"""]]
+
+ ./configure --prefix=/usr
+
Now you're ready to compile it:
-[[!format txt """
-make
-"""]]
+
+ make
+
Then as root, to install:
-[[!format txt """
-make install
-"""]]
+
+ make install
+
## Building Mesa 3D drivers
The DRI 3D drivers are now built from the Mesa source.
+ cd mesa
+ ./autogen.sh
-[[!format txt """
-cd mesa
-./autogen.sh
-"""]]
**Note:** `mesa` installs to `/usr/local/lib` by default. To install in `/usr/lib` run:
-[[!format txt """
-./configure --prefix=/usr
-"""]]
+
+ ./configure --prefix=/usr
+
Choose the right configure options depending on the hardware architecture you're compiling for.
See [[http://www.mesa3d.org/autoconf.html|http://www.mesa3d.org/autoconf.html]] for more information about configuring mesa or read the output from:
-[[!format txt """
-./configure --help
-"""]]
+
+ ./configure --help
+
**Note:** You will need to install `libdrm` for Mesa to build properly. You should have done that at step 1.3 when doing the "make install".
**Note:** You will need to update PKG_CONFIG_PATH if you installed `libdrm` in `/usr/local/lib`. For example, `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH`.
Now you're ready to compile it:
-
-[[!format txt """
-make
-"""]]
+ make
## Installing the 3D drivers
@@ -117,17 +101,13 @@ After compiling the Mesa tree, the 3D drivers can be found in `mesa/lib`. There
Run as root, to install:
+ make install
-[[!format txt """
-make install
-"""]]
2. Or set the environment variable LIBGL_DRIVERS_PATH to point to `<path to Mesa>/lib`, and also preload the newly built `libGL.so`:
+ export LIBGL_DRIVERS_PATH=<path to Mesa>/lib
+ export LD_PRELOAD=<path to Mesa>/lib/libGL.so.1
-[[!format txt """
-export LIBGL_DRIVERS_PATH=<path to Mesa>/lib
-export LD_PRELOAD=<path to Mesa>/lib/libGL.so.1
-"""]]
To make these settings persistent, you'll have to add them to `.bashrc` or a similar login script.
@@ -140,57 +120,51 @@ The DRM is shipped with the kernel on both Linux and FreeBSD, so you shouldn't h
There are two things you have to do if you compiled X.org for the first time and were using XFree86 before. There should be a symbolic link `/etc/X11/X` that points to `/usr/X11R6/bin/XFree86`. You should make that link point to `/usr/X11R6/bin/Xorg`.
+ cd /etc/X11
+ mv X X.backup
+ ln -s /usr/X11R6/bin/Xorg X
-[[!format txt """
-cd /etc/X11
-mv X X.backup
-ln -s /usr/X11R6/bin/Xorg X
-"""]]
Copy your `XF86Config-4` or `XF86Config` to `xorg.conf`, and in this file change the keyboard driver from `keyboard` to `kbd`.
+ Section "Input"
+ # ...
+ Driver "kbd"
+ # ...
+ EndSection
-[[!format txt """
-Section "Input"
- # ...
- Driver "kbd"
- # ...
-EndSection
-"""]]
In order to activate 3D acceleration make sure your `xorg.conf` is set up right. In particular, make sure the GLX and DRI modules are being loaded:
+ Section "Module"
+ # ...
+ Load "glx"
+ Load "dri"
+ # ...
+ EndSection
-[[!format txt """
-Section "Module"
- # ...
- Load "glx"
- Load "dri"
- # ...
-EndSection
-"""]]
and set the permissions for DRI appropriately. To allow anyone to use DRI, do:
-[[!format txt """
-Section "DRI"
- Mode 0666
-EndSection
-"""]]
+
+ Section "DRI"
+ Mode 0666
+ EndSection
+
To restrict DRI access to a certain group, find on your system the name of the group that is for video hardware access. (Have a look in `/etc/group`. It is often called `video`.) Add the users that may access the video hardware to that group. Then put this into `xorg.conf`:
-[[!format txt """
-Section "DRI"
- Group "video"
- Mode 0660
-EndSection
-"""]]
+
+ Section "DRI"
+ Group "video"
+ Mode 0660
+ EndSection
+
On Linux 2.4.x make sure the agpgart kernel module is loaded before you start X. On Linux 2.6.x make sure both agpgart and the agp chipset specific driver for your motherboard (via_agp, intel_agp, et al.) are loaded before you start X. To make the agp modules load automatically add these lines to your `modules.conf`:
2.4.x kernels:
-[[!format txt """
-pre-install <drm module> /sbin/modprobe "-k" "agpgart"
-"""]]
+
+ pre-install <drm module> /sbin/modprobe "-k" "agpgart"
+
2.6.x kernels:
-[[!format txt """
-pre-install <drm module> /sbin/modprobe "-k" "agpgart"
-pre-install agpgart /sbin/modprobe "-k" "<agp chipset driver>"
-"""]]
+
+ pre-install <drm module> /sbin/modprobe "-k" "agpgart"
+ pre-install agpgart /sbin/modprobe "-k" "<agp chipset driver>"
+
Replace <drm module> with the name of the drm module for your video card (e.g., radeon, mga, savage, etc.). Replace <agp chipset driver> with the name of the agp driver for your motherboard (e.g., via_agp, intel_agp, etc.).
For all kernels, make sure the DRM module is loaded before you start X.
@@ -205,12 +179,10 @@ If your issue isn't covered here, please report it on `#dri` on IRC or on the dr
## I cannot load my new DRM module on Linux Kernel 2.6.1
+ FATAL: Error inserting via (/lib/modules/2.6.1/kernel/
+ drivers/char/drm/<module name>.ko): Unknown symbol in module,
+ or unknown parameter (see dmesg)
-[[!format txt """
-FATAL: Error inserting via (/lib/modules/2.6.1/kernel/
-drivers/char/drm/<module name>.ko): Unknown symbol in module,
-or unknown parameter (see dmesg)
-"""]]
This error occurs because there are some missing symbols in the 2.6.1 kernel source. One way to get around this problem is to upgrade your kernel to a newer version... (You *might* be able to patch the DRM code to avoid this... Not sure about this, though!)
@@ -229,17 +201,15 @@ You need to have the headers for your current X version installed. How you inst
When building the kernel modules, the compilation might fail for some modules. In a recent CVS snapshot, I got the following:
+ savage_drv.c: In function `savage_alloc_continuous_mem':
+ savage_drv.c:106: warning: passing arg 1 of `remap_page_range_Rc414bdc2' makes pointer from integer without a cast
+ savage_drv.c:106: incompatible type for argument 4 of `remap_page_range_Rc414bdc2'
+ savage_drv.c:106: too few arguments to function `remap_page_range_Rc414bdc2'
+ savage_drv.c: In function `savage_get_physics_address':
+ savage_drv.c:170: warning: implicit declaration of function `pte_offset'
+ savage_drv.c:170: warning: assignment makes pointer from integer without a cast
+ make[2]: *** [savage_drv.o] Error 1
-[[!format txt """
-savage_drv.c: In function `savage_alloc_continuous_mem':
-savage_drv.c:106: warning: passing arg 1 of `remap_page_range_Rc414bdc2' makes pointer from integer without a cast
-savage_drv.c:106: incompatible type for argument 4 of `remap_page_range_Rc414bdc2'
-savage_drv.c:106: too few arguments to function `remap_page_range_Rc414bdc2'
-savage_drv.c: In function `savage_get_physics_address':
-savage_drv.c:170: warning: implicit declaration of function `pte_offset'
-savage_drv.c:170: warning: assignment makes pointer from integer without a cast
-make[2]: *** [savage_drv.o] Error 1
-"""]]
You can avoid this problem by only building the modules you need. See the DRM section above for the bit about the `DRM_MODULES` variable.
@@ -247,10 +217,8 @@ You can avoid this problem by only building the modules you need. See the DRM s
xf86cfg requires libXaw (and appropriate headers) to be installed in order to build. You can either install the relevant packages for your distribution, or else add the line:
+ #define BuildXFree86ConfigTools NO
-[[!format txt """
-#define BuildXFree86ConfigTools NO
-"""]]
to your `config/cf/host.def` and rerun `make World`.
[[ToDo|ToDo]]: fill this in with package names, as above.
@@ -265,15 +233,15 @@ For those who enabled DRI via the instructions here...
There is a known issue with Gentoo's Open``GL package switch; when the `opengl-update` package is installed, Gentoo places Open``GL libraries and header files under `/usr/lib/opengl` and uses symlinks to make everything appear in the normal place. As a result the normal install process doesn't always work.
Try setting up a "fake" Open``GL package, and switch into it:
-[[!format txt """
-cd /usr/lib/opengl
-mkdir mesa-cvs
-cd mesa-cvs
-ln -s ../../../local/lib
-ln -s ../../../local/include
-ln -s ../xorg-x11/extensions
-opengl-update mesa-cvs
-"""]]
+
+ cd /usr/lib/opengl
+ mkdir mesa-cvs
+ cd mesa-cvs
+ ln -s ../../../local/lib
+ ln -s ../../../local/include
+ ln -s ../xorg-x11/extensions
+ opengl-update mesa-cvs
+
This assumes you installed Mesa (including lib``GL) into `/usr/local`, which is the default. Also, you may like to remove everything in `/usr/local/lib` from Mesa that isn't either `libGL.*` or `libGLU.*` -- things like `libGLw.*` can cause problems.
If you set things up differently, a way to check whether you are affected by `opengl-update` is to strace any Open``GL based program (for example: `glxgears`) and to see which `libGL.so` it loads. Despite all symlinks it should load `/usr/lib/libGL.so.1.2`. If it doesn't correct the symlinks in `/usr/lib` to point to `/usr/lib/libGL.so.1.2`. After that **don't run `opengl-update`** -- it will only break things.