summaryrefslogtreecommitdiff
path: root/Software/gallium/EGLReferenceDrivers/linuxvmimage.moin
blob: 3a3fd469317f1623ef35d463305344886afa73a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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:

  1. 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.

  1. The potential for developing a Gallium3D drivers that utilizes the [[http://vmware-svga.sourceforge.net/|VMware SVGA II]] virtual GPU interface.

Here are the current set of steps used to build the Reference Gallium3D VM Image:

  1. Download [[http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0|VMplayer 3]] (Registration Required)

  1. Install VMPlayer 3{{{
chmod +x VMware-Player-3.0.0*
sudo ./VMware-Player-3.0.0*
}}}

  1. Get Ubuntu 9.04 Desktop Image from [[http://chrysaor.info|Chrysaor's Ubuntu page]] via Bittorrent

  1. Unpack Desktop Image{{{
tar xzvf ubuntu904desktop.tgz
}}}

  1. Launch VMPlayer{{{
vmplayer
}}}

  1. Launch Ubuntu Desktop from within VMPlayer

  1. Login to Ubuntu Desktop:{{{
User login: user
User password: chrysaor.info
}}}

  1. Turn off automatic updates
    a. Launch Update Manager: "System"->"Administration"->"Update Manager"
    a. Access Settings Pane: "Settings..." button in lower left corner
    a. Select Updates Pane: "Updates" tab half way across top
    a. Turnoff updates: deselect all update options
    a. Close up Update Manager: select "Close" twice

  1. Start Terminal: "Applications"->"Accessories"->"Terminal"

  1. Change user password to gallium3d{{{
passwd
chrysaor.info
gallium3d
gallium3d
}}}

  1. Install build tool packages{{{
sudo apt-get -y install autoconf automake1.9 libtool build-essential
}}}

  1. Clarify build dependencies{{{
sudo apt-get -y build-dep xorg mesa xserver-xorg-video-intel libdrm-dev
}}}

  1. 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
}}}

  1. Install LLVM{{{
sudo apt-get -y install llvm-dev
}}}

  1. Install Python State Tracker{{{
sudo apt-get -y install python-dev swig python-imaging python-imaging-tk
}}}

  1. Install GTK for rbug-gui{{{
sudo apt-get -y install libgtk2.0-dev libgtkglext1-dev
}}}

  1. Create and change to Gallium3D build director{{{
mkdir Gallium3D
cd Gallium3D
}}}

  1. Get latest Mesa3D repository.  It's where Gallium3D is hosted right now{{{
git clone git://git.freedesktop.org/git/mesa/mesa
}}}

  1. Compile Mesa3D in a way that compiles Gallium3D and software driver{{{
cd mesa
export GALLIUM=$PWD
make linux-x86-debug
}}}

  1. Compile OpenVG{{{
cd src/gallium/state_trackers/vega
make
cd $GALLIUM
}}}

  1. 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
}}}

  1. Make sure Gallium's EGL implementation is using the software driver{{{
export EGL_DRIVER="egl_softpipe"
}}}

  1. Build and test OpenVG demos{{{
cd progs/openvg/demos
make
./sp
./lion
}}}

  1. 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
}}}

  1. Build llvmpipe{{{
cd $GALLIUM
scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=xlib dri=false -k
}}}

  1. Test llvmpipe{{{
export LD_LIBRARY_PATH=$GALLIUM/build/linux-x86-debug/lib:$GALLIUM/build/linux-x86_64-debug:$LD_LIBRARY_PATH
}}}

  1. Build Python State Tracker{{{
cd $GALLIUM
scons debug=yes statetrackers=python drivers=softpipe,trace winsys=none
}}}

  1. 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
}}}

  1. Get rbug-gui source{{{
cd $GALLIUM/..
git clone git://git.freedesktop.org/git/mesa/rbug-gui
}}}

  1. Build rbug-gui{{{
cd rbug-gui
./autogen.sh
make
}}}