Instructions to install kodi: http://geektillithertz.com/wordpress/index.php/2016/05/09/kodi-on-raspberry-pi-open-source-gpu-driver-mesa-11/

Instructions to install mesa 11.2:

git clone git://anongit.freedesktop.org/mesa/mesa -b 11.2 --depth=1

cd mesa

./autogen.sh --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --libdir=/usr/lib/arm-linux-gnueabihf --localstatedir=/var --disable-silent-rules --build=arm-linux-gnueabihf --with-gallium-drivers=vc4 --with-dri-drivers= --enable-gbm --enable-xa --disable-va --enable-vdpau --enable-omx --enable-shared-glapi --enable-gles1 --enable-gles2 --with-egl-platforms=x11,wayland,drm

##Resolve any dependancies

make -j4

sudo make install