主题 : 请教 mini2440开发板的opengl环境搭建问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 17733
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2010-04-01
最后登录: 2010-08-05
楼主  发表于: 2010-06-09 16:21

 请教 mini2440开发板的opengl环境搭建问题

1)    首先按照micro2440的手册建立了交叉编译环境;arm-linux-gcc安装到/usr/loca/arm/4.3.2
2)    参照网上一份在“ARM Linux上使用OpenGL”的文档,http://xianzilu.spaces.live.com/blog/cns!4201FDC93932DDAF!274.entry
3)    下载opengl的程序库,用的是该文档中提到的PicoGL软件包
4)    
文档中有如下一段话
“要使用这个软件包还必须有支持软件浮点的交叉编译器,我们一般用的arm-linux-gcc 2.95.3/3.3.2/3.4.1等都不支持软件浮点,这需要我们重新编译一个。编译一个交叉编译器,引用Crosstool作者Dan Kegel的话,used to be a scary prospect,requiring iron will,days if not weeks of effort……幸好有Crosstool这个工具,如果你的机器好网速快,输入个指令,差不多1个多小时就可以编译出来。crosstool的主页http://kegel.com/crosstool/,下载地址http://kegel.com/crosstool/crosstool-0.43.tar.gz。”

疑问的是:我看资料上说开发板提供的arm-linux-gcc-4.3.2编译器是支持软件浮点的,请问我还用自己再用Crosstool编译一个交叉编译器吗?
5)    我没有按文档要求的再自己制作一个交叉编译器,当进行到文档中的如下步骤:
----------------------------------------------------------------------------------------------
#CC=/opt/crosstool/gcc-3.4.5-glibc-2.3.6/arm-softfloat-linux-gnu/bin/arm-softfloat-linux-gnu-gcc ./configure --with-backend=vesafb --host=arm-softfloat-linux-gnu --prefix=/home/lxz/builtPicoGL
说明下,CC=设置交叉编译器的位置,--with-backend=vesafb指定使用FB作为显示设备,host=arm-softfloat-linux-gnu设定交叉编译,--prefix=/home/lxz/builtPicoGL设定编译后库和示例程序安装位置。
----------------------------------------------------------------------------------------------------
我输入的命令是:
#CC=//usr/loca/arm/4.3.2/bin ./configure --with-backend=vesafb --host=arm-softfloat-linux-gnu --prefix=/root/arm_Stu/opengl/builtPicoGL/
错误报告如下:
[root@localhost PicoGL]# CC=/usr/local/arm/4.3.2/bin ./configure --with-backend=vesafb --host=arm-linux-gcc --prefix=/root/arm_Stu/opengl/builtPicoGL/
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... Invalid configuration `arm-linux-gcc': system `gcc' not recognized
configure: error: /bin/sh ./config.sub arm-linux-gcc failed
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-06-09 22:11
我输入的命令是:
#CC=//usr/loca/arm/4.3.2/bin ./configure --with-backend=vesafb --host=arm-softfloat-linux-gnu --prefix=/root/arm_Stu/opengl/builtPicoGL/

看起来你应该用
#CC=//usr/loca/arm/4.3.2/bin/arm-linux-gcc ./configure --with-backend=vesafb --host=arm-softfloat-linux-gnu --prefix=/root/arm_Stu/opengl/builtPicoGL/
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 17733
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2010-04-01
最后登录: 2010-08-05
2楼  发表于: 2010-06-11 08:36
其实之前就按照您说的方式 试过,问题是一样的。
级别: 新手上路
UID: 17733
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2010-04-01
最后登录: 2010-08-05
3楼  发表于: 2010-06-11 09:09
我再贴一下.configure部分代码:
-------------------------------------------------------------------------------------
{ echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
if test "${ac_cv_host+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
   { (exit 1); exit 1; }; }
fi
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2010-06-11 11:01
不好意思,你的帖子里看来还不止一个错误
[root@localhost PicoGL]# CC=/usr/local/arm/4.3.2/bin ./configure --with-backend=vesafb --host=arm-linux-gcc --prefix=/root/arm_Stu/opengl/builtPicoGL/

应该是
[root@localhost PicoGL]# CC=/usr/local/arm/4.3.2/bin/arm-linux-gcc ./configure --with-backend=vesafb --host=arm-linux --prefix=/root/arm_Stu/opengl/builtPicoGL/

CC是用来指定编译器的,--host是用来指定程序所跑的目标硬件平台的,当CC没有设置时,系统用的编译器是--host所指定的值+‘-gcc’,也就是arm-linux-gcc
我个人比较推荐不设置CC,让configure根据--host的值自己判断。

不管什么时候,"./configure --help"是你最好的帮手
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 17733
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2010-04-01
最后登录: 2010-08-05
5楼  发表于: 2010-06-11 14:44
非常感谢!
文中有如此一段:“在/home/lxz/builtPicoGL/lib里就有PicoGL的库了,把动态库文件拷贝到arm-linux根文件系统的/lib里面,把/home/lxz/builtPicoGL/bin里的程序拷贝到arm-linux文件系统的任何地方,然后制作和烧写文件系统映像”

对于mini2440开发板提供的文件系统而言,我是否就将动态库拷贝到root_qtopia目录/lib里?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2010-06-11 17:47

 回 5楼(realxu) 的帖子

是的。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
7楼  发表于: 2010-06-11 22:10
我们提供的编译器是矢量浮点,不是软浮点
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.
级别: 新手上路
UID: 17733
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2010-04-01
最后登录: 2010-08-05
8楼  发表于: 2010-06-12 08:29
我想在这个开发板上运行opengl的程序,用矢量浮点编译器编译opengl库可以吗?

我查了一下资料,似乎矢量浮点比软浮点性能更好吧?
级别: 新手上路
UID: 58773
精华: 0
发帖: 37
金钱: 190 两
威望: 38 点
综合积分: 74 分
注册时间: 2011-11-13
最后登录: 2018-02-08
9楼  发表于: 2012-06-15 11:04