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.tgzLaunch VMPlayer
vmplayerLaunch Ubuntu Desktop from within VMPlayer
Login to Ubuntu Desktop:
User login: user User password: chrysaor.infoTurn 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 gallium3dInstall build tool packages
sudo apt-get -y install autoconf automake1.9 libtool build-essentialClarify build dependencies
sudo apt-get -y build-dep xorg mesa xserver-xorg-video-intel libdrm-devInstall 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 sconsInstall LLVM
sudo apt-get -y install llvm-devInstall Python State Tracker
sudo apt-get -y install python-dev swig python-imaging python-imaging-tkInstall GTK for rbug-gui
sudo apt-get -y install libgtk2.0-dev libgtkglext1-devCreate and change to Gallium3D build director
mkdir Gallium3D cd Gallium3DGet latest Mesa3D repository. It's where Gallium3D is hosted right now
git clone git://git.freedesktop.org/git/mesa/mesaCompile Mesa3D in a way that compiles Gallium3D and software driver
cd mesa export GALLIUM=$PWD make linux-x86-debugCompile OpenVG
cd src/gallium/state_trackers/vega make cd $GALLIUMMake sure that from now on all apps pick up newly compiled Gallium libs
export LD_LIBRARY_PATH=$GALLIUM/lib/gallium:$GALLIUM/lib:$LD_LIBRARY_PATHMake 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 ./lionGet special version of udis86 for llvmpipe
cd $GALLIUM/.. git clone git://people.freedesktop.org/~jrfonseca/udis86 cd udis86 ./configure --with-pic make sudo make installPatch 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 -kTest llvmpipe
export LD_LIBRARY_PATH=$GALLIUM/build/linux-x86-debug/lib:$GALLIUM/build/linux-x86_64-debug:$LD_LIBRARY_PATHBuild Python State Tracker
cd $GALLIUM scons debug=yes statetrackers=python drivers=softpipe,trace winsys=noneTest Python State Tracker
export PYTHONPATH=$GALLIUM/build/linux-x86-debug/gallium/state_trackers/python python $GALLIUM/src/gallium/state_trackers/python/samples/tri.pyGet rbug-gui source
cd $GALLIUM/.. git clone git://git.freedesktop.org/git/mesa/rbug-guiBuild rbug-gui
cd rbug-gui ./autogen.sh make
