Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1529706
  • 博文数量: 290
  • 博客积分: 3468
  • 博客等级: 中校
  • 技术积分: 3461
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-28 22:21
文章分类

全部博文(290)

文章存档

2016年(13)

2015年(3)

2014年(42)

2013年(67)

2012年(90)

2011年(75)

分类: LINUX

2013-01-30 12:30:07

  • 这里龙芯3a指rs780e开发板,板上集成了ati的3200hd显卡
  • 要使用最新版龙芯内核,其中集成了相关drm驱动
  • 本文以debian系统为范例
  • 顺序安装以下软件(有些在文件系统中已经有了,但是版本偏低,请至少更新到本文指定的版本):
    • libtool
      • apt-get install libtool
    • glproto
      • tar -xvf x11proto-gl_1.4.15.orig.tar.gz
      • cd glproto-1.4.15
      • ./configure --build=mips64el-unknown-linux-gnu
      • 不用编译,直接安装:make install
    • dri2proto
      • ./configure --build=mips64el-unknown-linux-gnu
      • 直接安装:make install
    • libdrm
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • xcb-proto
      • ./autogen.sh
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • xcb-glx
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • xproto
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • x11-xcb
      • ./configure --build=mips64el-unknown-linux-gnu
      • make
      • make install
    • 显卡驱动
    • mesa 9.0
      • mesa就是openGL的一个实现,需要新版,才能支持openGL 2.0
      • 以上各软件都是mesa 9.0的依赖库,所以要先装,不然mesa在configure时会报错退出。
      • 如果此时mesa的configure还是报缺少依赖库的错误,按照提示安装即可。
      • 两个有用的网站,可以找到大多依赖库的源码:
      • mesa 9.0的下载链接:
      • 修改configure文件,去掉默认的驱动配置中,intel相关选项(否则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
      • 比较特别的配置参数,打开openGL es(也许不打开也行)
        • ./configure --build=mips64el-unknown-linux-gnu --enable-gles1 --enable-gles2
      • make -j4
      • make install
    • 终于安装成功,但是软件运行时似乎没有成功调用到我们刚安装的openGL 2.0
      • 因为系统中之前可能用apt-get安装了旧版的mesa,其默认目录为/user/lib
      • 我们编译并安装的mesa,默认目录为/user/local/lib,如果通过prefix参数强制指定为/user/lib,则无法顺利安装,报错说只能安装在/user/local/lib
      • 解决方法是,把apt方式安装的mesa卸载掉:
        • apt-get remove libglu1-mesa
        • 卸载掉的不只是openGL,还包括几个其他软件,以后需要用的时候可以单独装
  • openGL 2.0安装成功,来确认一下成果:
    • glxgears -info
      • 可以看到这几行输出:
        • GL_RENDERER = Gallium 0.4 on AMD RS780
        • GL_VERSION = 2.1 Mesa 9.0
        • GL_VENDOR = X.Org

原文链接:http://www.loongson.cn/dev/wiki/OpenGL2.0

阅读(2405) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~