This page is an experimental effort to create a virtual machine image that can be used as a basic reference build and test environment for Gallium3D. The resulting VM image is large, and is not yet hosted anywhere, but the step by step instruction for creating this reference image are hosted here while development of this reference image is taking place.
The motivation for creating a reference VM image is two fold:
- Developing graphics drivers in a VM environment is typically much more efficient than doing the same on a physical machine. The debugging tools and abstraction from the hardware makes driver developers much more productive.
- The potential for developing a Gallium3D drivers that utilizes the VMware SVGA II virtual GPU interface.
Here are the current set of steps used to build the Reference Gallium3D VM Image:
- Download VMplayer 3 (Registration Required)
Install VMPlayer 3
chmod +x VMware-Player-3.0.0* sudo ./VMware-Player-3.0.0*
Get Ubuntu 9.04 Desktop Image from Chrysaor's Ubuntu page via Bittorrent
Unpack Desktop Image
tar xzvf ubuntu904desktop.tgz
Launch VMPlayer
vmplayer
Launch Ubuntu Desktop from within VMPlayer
Login to Ubuntu Desktop:
User login: user User password: chrysaor.info
Turn off automatic updates
- Launch Update Manager: "System"->"Administration"->"Update Manager"
- Access Settings Pane: "Settings..." button in lower left corner
- Select Updates Pane: "Updates" tab half way across top
- Turnoff updates: deselect all update options
- Close up Update Manager: select "Close" twice
- Start Terminal: "Applications"->"Accessories"->"Terminal"
Change user password to gallium3d
passwd chrysaor.info gallium3d gallium3d
Install build tool packages
sudo apt-get -y install autoconf automake1.9 libtool build-essential
Clarify build dependencies
sudo apt-get -y build-dep xorg mesa xserver-xorg-video-intel libdrm-dev
Install more tools and libraries
sudo apt-get -y install git-core libxmu-dev xorg-dev xorg-build-macros flex bison libtiff4-dev libglut-dev sawfish git-core gitk libxmu-dev libxi-dev x11proto-xf86dga-dev scons
Install LLVM
sudo apt-get -y install llvm-dev
Install Python State Tracker
sudo apt-get -y install python-dev swig python-imaging python-imaging-tk
Install GTK for rbug-gui
sudo apt-get -y install libgtk2.0-dev libgtkglext1-dev
Create and change to Gallium3D build director
mkdir Gallium3D cd Gallium3D
Get latest Mesa3D repository. It's where Gallium3D is hosted right now
git clone git://git.freedesktop.org/git/mesa/mesa
Compile Mesa3D in a way that compiles Gallium3D and software driver
cd mesa export GALLIUM=$PWD make linux-x86-debug
Compile OpenVG
cd src/gallium/state_trackers/vega make cd $GALLIUM
Make sure that from now on all apps pick up newly compiled Gallium libs
export LD_LIBRARY_PATH=$GALLIUM/lib/gallium:$GALLIUM/lib:$LD_LIBRARY_PATH
Make sure Gallium's EGL implementation is using the software driver
export EGL_DRIVER="egl_softpipe"
Build and test OpenVG demos
cd progs/openvg/demos make ./sp ./lion
Get special version of udis86 for llvmpipe
cd $GALLIUM/.. git clone git://people.freedesktop.org/~jrfonseca/udis86 cd udis86 ./configure --with-pic make sudo make install
Patch llvm header to fix typo
--- /usr/include/llvm-c/Core.h.orig 2009-08-10 15:38:54.000000000 +0100 +++ /usr/include/llvm-c/Core.h 2009-08-10 15:38:25.000000000 +0100 @@ -831,7 +831,7 @@ template<typename T> inline T **unwrap(LLVMValueRef *Vals, unsigned Length) { #if DEBUG - for (LLVMValueRef *I = Vals, E = Vals + Length; I != E; ++I) + for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I) cast<T>(*I); #endif return reinterpret_cast<T**>(Vals);
Build llvmpipe
cd $GALLIUM scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=xlib dri=false -k
Test llvmpipe
export LD_LIBRARY_PATH=$GALLIUM/build/linux-x86-debug/lib:$GALLIUM/build/linux-x86_64-debug:$LD_LIBRARY_PATH
Build Python State Tracker
cd $GALLIUM scons debug=yes statetrackers=python drivers=softpipe,trace winsys=none
Test Python State Tracker
export PYTHONPATH=$GALLIUM/build/linux-x86-debug/gallium/state_trackers/python python $GALLIUM/src/gallium/state_trackers/python/samples/tri.py
Get rbug-gui source
cd $GALLIUM/.. git clone git://git.freedesktop.org/git/mesa/rbug-gui
Build rbug-gui
cd rbug-gui ./autogen.sh make