我用的系统是Fedora发型版的Linux系统,对其他版本的linux系统可能有一些地方有点差异。
下面就以Fedora系统为例:
1、安装libtool
输入命令:yum install libtool
2、安装glproto
解压命令:tar -xvf x11proto-gl_1.4.15.orig.tar.gz
进入:cd glproto-1.4.15
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
不用make直接:make install
3、安装dri2proto
解压命令:tar -xvf dri2proto-2.8.tar.bz2
进入:cd dri2proto-2.8
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
不用make
直接:make install
4、安装libdrm
解压命令:tar -xvf libdrm-2.4.40.tar.bz2
进入:cd libdrm-2.4.40
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install
5、安装xcb-proto
解压命令:tar -xvf xcb-proto_1.7.1.orig.tar.xz
进入:cd xcb-proto_1.7.1
./autogen.sh
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install
6、安装xcb-glx
解压命令:tar -xvf libxcb_1.8.1.ori.tar.gz
进入:cd libxcb_1.8.1
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install
7、安装xproto
解压命令:tar -xvf xproto-7.0.23.tar.gz
进入:cd xproto-7.0.23
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install
8、安装x11-xcb
解压命令:tar -xvf libx11_1.5.0.orig.tar.gz
进入:cd libx11_1.5.0
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/
make
make install
以上都是mesa9.0的依赖库,所以要先装,不然mesa在configure时会出错。
在安装以上一些依赖库是会出现一些缺少另一些库的错误:
如:
上面的错误就是缺少了xtrans这样的库
你可以用命令:yum search xtrans来搜这样的库,
然后用:yum install xxx 来安装搜到的。
中去找缺的库,下载下来,解压在安装上,安装步骤如上面库的安装。
9、安装mesa9.0
解压命令:tar -xvf MesaLib-9.0.tar.bz2
进入:cd Mesa-9.0
./autogen.sh
修改configure文件,文件内容如下:
# default drivers if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i915 i965 nouveau r200 radeon swrast" fi 修改为: # default drivers if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS=" nouveau r200 radeon swrast" fi去掉默认的驱动配置,因为我的显卡是用的 集成了ati的3200hd显卡,所以只需要与我配套的选项。否则configure无法通过。
./config --build=mips64el-unknown-linux-gnu --prefix=/usr/ --enable-gles1 --enable-gles2
后面的配置参数是打开OpenGL ES
make -j4
make install
安装成功后,可以用linux中自带的齿轮例子测试一下:
glxgears -info
可以看到以下内容:
- GL_RENDERER = Gallium 0.4 on AMD RS780
- GL_VERSION = 2.1 Mesa 9.0
- GL_VENDOR = X.Org