-
Notifications
You must be signed in to change notification settings - Fork 39
Building Mesa for VC4
PabloPL edited this page Dec 15, 2017
·
6 revisions
If you're interested in hacking on the Mesa driver, you'll want to build your own copy of Mesa. And since Mesa is a system component and you won't want to break your desktop if you make a mistake, you will want to do it without replacing your system Mesa.
sudo apt-get build-dep libgl1-mesa-dri
sudo apt-get install \
automake libtool \
bison flex \
gettext \
libdrm-dev \
libexpat1-dev \
libudev-dev \
libx11-xcb-dev \
libxcb-dri3-dev \
libxcb-dri2-0-dev \
libxcb-glx0-dev \
libxcb-xfixes0-dev \
libxcb-present-dev \
libxcb-sync-dev \
libxshmfence-dev \
libxdamage-dev \
libxext-dev \
libxfixes-dev \
python-mako \
x11proto-present-dev \
x11proto-dri3-dev \
x11proto-dri2-dev \
x11proto-gl-dev
git clone git://anongit.freedesktop.org/mesa/mesa
cd mesa
./autogen.sh \
--prefix=$HOME/prefix \
--with-gallium-drivers=vc4 \
--with-dri-drivers= \
--with-egl-platforms=x11,drm
make install
Once you've installed your local copy, you can run an application with it by prefixing your command with the following script:
exec env \
LD_LIBRARY_PATH=$HOME/prefix/lib \
LIBGL_DRIVERS_PATH=$HOME/prefix/lib \
GBM_DRIVERS_PATH=$HOME/prefix/lib \
$@
Some developers go further and add $HOME/mesa/lib
to these paths so that they can skip the make install
step.