This page is a walk through on obtaining Direct Rendering on a mach64 graphics chipset
The Mach 64 Board
The Mach64 Chip is made by ATI, coming in several varieties. This page is targeted at the Rage Pro variant, which to my knowledge is the only 3D version of the mach64. Wikipedia: Mach64/Rage Pro This board has basic 3D capabilites, but Arch's xf86-video-ati package, which contains open source ATI drivers does not contain support for it.
Most GNU/Linux 3D graphics drivers use the DRI/DRM system for direct rendering, which is what the Mach64 Driver uses this.
Packages and References
Reference Building DRI - Check this for link updates. mesa - installs the mesa GL libs - Install this with pacman. libgl - installs the gl libs (part of the 'official' mesa source tree) (). - install this with pacman libdrm - installs the drm libs - install this with pacman xf86-video-ati - installs the ati kernel drm files. - If you have this installed, get rid of it with pacman (use ABS to recompile).
Building the Kernel Drm Module - with makepkg goodness
You can either use this method, the pacman (bad) method, or recompile your kernel to include mach64.
- Head over to the AUR and search for mach64drm
- Download the tarball and untar it, then change directory into the resulting directory.
- Install the resulting package with
pacman -Uf <resulting package>
-f/Force is required because the drm.ko module overwrites an already existing module.
Building the Kernel Drm Module - the Old Way without pacman
warning: this does not use the makepkg method, which is recommended. Skip this section if you did the section above, with makepkg. Proceed to "Installing the other end: DRI."
The standard ARCH kernel doesn't come with the mach64 DRM module, so building yourself is required.
- Create a build folder to keep things tidy - this folder will be referred to from now on as $BUILDDIR
- Now, obtain the drm source tree:
- Get the thing compiled: (the drm folder appeared out of git)
cd $BUILDDIR/drm/linux-core/ make DRM_MODULES="mach64"
- Go get some coffee or something since your machine is probably very old to have a mach64 chipset and wait while everything compiles.
- When it's done compiling, there will be two files,
mach64.ko, the device kernel module, and
drm.ko, the DRM generic module.
- Copy those two files to the appropriate kernel modules directory. (Before doing this you may want to backup the exisiting files to somewhere else just in case).
sudo cp mach64.ko drm.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/
- Now get the modules registered and depedencies generated.
sudo depmod -a `uname -r`
Installing the other end: DRI
No matter what you chose to do to install the DRM, these are the steps to install the DRI.
- This is easy. First, install the ABS system with Pacman if you don't have it already.
- Run the following to sync the ABS directory (/var/abs) with the repos.
- Copy the xf86-video-ati folder to your local build directory.
cp -r /var/abs/extra/xf86-video-ati <some place in your /home or somewhere...>
- Customize the PKGBUILD file inside the copied xf86-video-ati folder. You have to change dir_dirs to
- Run this now to create a standard pacman package
- Now install the resulting package in the current directory as root with pacman -U
A decent chunk of time wasted getting 3D support for a primitive 3D graphics chipset