请问捷安特骑行服套装眼镜是GL926好,还是SWIFT3好?推荐几款?谢谢!

2980人阅读
[这个贴子最后由singlewolfyu在
03:41pm 第 2 次编辑] 本文是用 Word 写的,本来想当成附件发上来,结果系统说&发贴数大于10篇才能上传附件!&,让我暴汗~~~~~ 所以就直接 Copy 上来了,有Word 中有一些加红,加黑表示要注意的地方这里显示不出来,大家将就着看吧,呵呵,有什么错误希望大家指出,谢谢 MiniGUI 1.3.3 移植详解 作者:大漠孤狼 & E-Mail: 最近移植了 MiniGUI 1.3.3 到一个开发板上,中间遇到许多问题,在论坛上发问题,结果也没多少人回我,就算偶尔有回的,基本上回答也没有什么用,网上找不到一个完整的移植文章,所以就决定把自己这次移植摸出来的一些方法写出来,给像我一样的小菜鸟做个参考吧。本文不教你怎么写驱动,只是教怎么样在最短的时候在你的PC机上搭建起开发环境,同时在你的板子上跑起MiniGUI 来,这样你就可以在PC上开发好程序,调试完毕,然后交叉编译一下,直接Copy到板子上就可以了。 首先,你需要下载的MiniGUI 的包:
& & & 这两个包的下载需要你在 &上注册过才可以下载,免费注册的,自己去下吧
& &图形界面程序
&一些小例子 好,首先就下载这几个包吧,后面还有需要下载的包,后面再说 1.PC环境的搭建 首先你需要一个 Linux 环境,我安装的是 RedHat 9.0 &安装时记着选 everything ,这样可以避免到时候编译少了东西。这里搭建的环境是让 MiniGUI 在你的 PC 上可以跑起来,这样以后你开发程序就可以只在 PC 上开发,调试好,最后交叉编译一下放到板子上就行了。后面会讲怎么为板子编译MiniGUI ,耐心的看吧:) 首先建立自己的开发目录 [Root]# &mkdir /opt [Root]# &cd /opt [Root]# mkdir st2410 & & & & & & //这个是我的板子, [Root]# chmod 777 st2410 & & & & //给一般用户操作权限 [user]# &cd /opt/st2410 & & & & & //进到目录中去,在这个目录下工作,用普通用户来工作 把 libminigui-1.3.3.tar.gz 解开 [user]# tar &zxf &libminigui-1.3.3.tar.gz [user]# tar zxf minigui-res-1.3.3.tar.gz 编译 libminigui &,这个是 minigui 运行所必需的库文件,必须编译成功 [user]# cd libminigui-1.3.3 [user]# ./configure & & & & & & & & //最简单的编译方式,让它自己去配置 ,这里采用缺省的Thread 模式而不是Lite模式,因为这种方式在 PC 机上使用最方便,后面移到板子上再改成 Lite 模式即可 注意屏幕上的输出,特别是下面几条 checking for FrameBuffer console support... yes checking for pthread library... yes checking for TT_FreeType_Version in -lttf... yes checking for T1_InitLib in -lt1... no checking for jpeg_std_error in -ljpeg... yes checking for png_check_sig in -lpng... yes 其中 &lttf & &lpng &必须是 yes ,不然后面你的程序肯定会有问题,如果这里不是 yes 的话,肯定是你的 Redhat 9 安装不对,告诉过你安装时选 everything ,你选了吗??? 其中 ttf 库是对 TrueType 字体的支持,png 库是对 png 图形的支持,MiniGui 里都需要这两个,在后面为板子交叉编译的时候也需要这两个,不然你的程序跑不起来,切记切记。 好了,现在通过了,下面是编译了 [user]# make 接来来就是漫长的等待了,让它慢慢的编译吧,呵 [user]# &su & & & & //切到 Root 用户权限下,不然安装时没法把文件写到你的 /usr/local 目录下 [Root]# make install 好了,库安装完毕,下面是安装资源 [Root]# cd /opt/st2410/minigui-res-1.3.3 [Root]# make install OK,基本的安装完成了,现在检查一下 看看在你的目录 &/usr/local/lib 下是不是有以下文件 libmgext-1.3.so.3 -& libmgext-1.3.so.3.0.0 libmgext-1.3.so.3.0.0 libmgext.a libmgext.la libmgext.so -& libmgext-1.3.so.3.0.0 libminigui-1.3.so.3 -& libminigui-1.3.so.3.0.0 libminigui-1.3.so.3.0.0 libminigui.a libminigui.la libminigui.so -& libminigui-1.3.so.3.0.0 libvcongui-1.3.so.3 -& libvcongui-1.3.so.3.0.0 libvcongui-1.3.so.3.0.0 libvcongui.a libvcongui.la libvcongui.so -& libvcongui-1.3.so.3.0.0 里面还有一个目录 minigui ,可以进到里面去看,分别为 minigui/res/ [bmp , cursor,icon ,&..] 好几个目录,里面有相应的文件 检查 /usr/local/include &里面是不是多了一个 minigui 目录,/usr/local/include/minigui 时面好多的 .h 文件,如下: common.h &control.h &endianrw.h &fixedmath.h &mgext.h & &mywindows.h &vcongui.h config.h &dti.c & & &filedlg.h & gdi.h & & & &minigui.h &skin.h & & & window.h 如果这里检查没有这些东西的话,那你前面的步骤肯定有问题,自己检查一下吧。 首先,修改你的 /etc/ld.so.conf 文件,在里面最后新加入一行 /usr/local/lib 然后执行 [Root]# &ldconfig OK ! [Root]# vi /usr/local/etc/MiniGUI.cfg 在里面找到 [system] # GAL engine #gal_engine=fbcon gal_engine=qvfb & //这里修改 # IAL engine #ial_engine=console ial_engine=qvfb & &//这里修改 mdev=/dev/mouse mtype=IMPS2 [fbcon] defaultmode=bpp [qvfb] defaultmode=640x480-16bpp & &//这里修改 display=0 保存一下,OK了! 现在你需要安装一个 qvfb ,因为 Redhat 9 里面没有,从下面地址下载
老方法: [user]# tar zxf qvfb-1.0.tar.gz [user]# cd qvfb-1.0 [user]# ./configure [user]# make [user]# make install 在这个过程中如果出现 error while loading shared libraries: libqt-mt.so.3: cannot open shared object file 说明你的系统少了 libqt-mt.so.3 这个库,还是回去检查一下,你安装时Redhat 时是否选了 everything ,或者在实际操作的过程中,这个库有可以被误删除掉,我就出现过,这时候你可以 google 一下 ,输入 libqt-mt.so.3 redhat 9 ,应该就可以搜到相应的 rpm 包,安装时 [root]# rpm &i --force [你的包名] & 就OK了 & 这里有个下载地址,可以试试,我是用讯雷下载的,别的工具没试过
注意:在你后面的操作过程中有可能会导致 libqt-mt.so.3 丢失,这时候只要重装一下就OK了 解决了这个问题后重复安装过程 [user]# ./configure [user]# make [user]# make install OK ,环境搭建好了,下面是测试了:) 还记得前面让你下载的 mg-samples-1.3.0.tar.gz 这个包吧,这个就是一些例子,现在试试吧:) [user]# tar zxf mg-samples-1.3.0.tar.gz [user]# ./configure [user]# make [user]# cd src 看看 src 目录下是不是已经编译出可执行文件来了 现在来执行一下吧,首先把 qvfb 加到你的可执行路径中去 [user]# cd $HOME [user]# vi .bashrc 在 .bashrc 最后面加上一句 export PATH=&$PATH:/sbin:/usr/local/arm/2.95.3/bin:/usr/local/bin:/usr/local& & 保存退出,这里面有些路径是为以后用的,比如 /usr/local/arm/2.95.3/bin ,先加上吧:) [user]# source .bashrc & //让它执行一下,当然你也可以选择重启一下电脑,效果是一样的,呵 执行例子程序: [user]# qvfb & & & & & & //在图形界面下执行,呵,别告诉我你只在命令行工作啊 :) 在 qvfb 中选 File ? Configure ? 640x480 VGA & 16bit & ,这样看起来舒服 [user]# &cd /opt/st2410/ mg-samples-1.3.0/src [user]# ./helloword OK ,这个时候你应该可以看到在 qvfb 中的执行效果了吧,记住:一定要先运行 qvfb ,并且设置 qvfb ,然后再运行你的程序,而且qvfb 每重启一次就需要重新设置一下,真麻烦 OK 你的 PC 环境搭建完毕了,你现在可以在 PC 上开发你的程序,并且编译,并在 qvfb &中执行,等完全验证它是正确的了,把它交叉编译一下,放到板子上去就可以了,呵呵:) MiniGUI 还有一种执行方式,就是在 Console 下在 Framebuffer 上执行,这种方式太麻烦,在PC 上不推荐,你还是用 qvfb 执行吧,方便,呵 在FrameBuffer 上执行 修改 /usr/local/etc/MiniGUI.cfg 文件,如下 [system] # GAL engine gal_engine=fbcon & //这里修改 # IAL engine ial_engine=console & //这里修改 mdev=/dev/mouse mtype=none & //这里改成none,因为经常鼠标不正常 [fbcon] defaultmode=bpp [qvfb] defaultmode=640x480-16bpp & & display=0 重启动你的 RedHat 9 ,在出现 Grub 的时候按 E 键,在 kernel =&.. & & &这一行的最后加入 &vga=0x317 &,然后 Enter ,然后在 kernel=& &这一行上按 b &就可以了,这时候可以在启动时看到一个小企鹅的图标,OK 进去后,直接在 例子程序的目录下执行 ./helloword &就可以了 :) 2.为你的实验板进行交叉编译 OK,PC机的开发环境已经建立好了,下面就是要移植到我们的板子上去了,这里不介绍怎么移植 Linux 系统,假设你已经有一个可以在板子上跑的 Linux 系统了,并且已经有一个可以用的根文件系统了,并且已经有了板子相对应的LCD的驱动程序,这里介绍怎么在你的根文件系统里加上 MiniGUI ,使得你的板子有图形界面的显示。 要交叉编译,首先就得有交叉编译器,这里介绍 arm 板的交叉编译。不要自己去编译,直接去下载个就行了。
记住这个 ftp ,最好的 arm 工具下载站, 下载回来,有35Mb,呵 安装交叉编译工具: [Root]# mkdir &&p &/usr/local/arm [Root]# cd /usr/local/arm [Root]# tar jxf &cross-2.95.3.tar.bz2 & //把工具直接解到压缩到这个目录下就安装完成了,简单吧:) 解压缩后生成一个 2.95.3 目录,里面在就是工具 记住,这时候的gcc为 2.95.3/bin/arm-linux-gcc & 而它的 include 为 2.95.3/arm-linux/include ,对应的 lib 为 2.95.3/arm-linux/lib 也就是说,你如果用 arm-linux-gcc 编译程序的话,它缺省的就找 2.95.3/arm-linux/include & 2.95.3/arm-linux/lib &两个目录,而不是 /usr/include ,所以如果你要加什么 .h &.a .so 文件话,记着一定是加到这两个目录下去,不然编译器会告诉你找不到这些东西的 把可行程序的路径加入到 PATH 中去,还记得前面说过的改 .bashrc 文件吗? [user]# cd $HOME [user]# vi .bashrc 在 .bashrc 最后面加上一句 export PATH=&$PATH:/sbin:/usr/local/arm/2.95.3/bin:/usr/local/bin:/usr/local& & [user]# source .bashrc OK ,交叉编译工具安装完了,够简单吧:) MiniGUI 的编译需要一些库文件,缺省我们的 gcc 基本上都有这些库文件,所以不需要安装,可是现在要交叉编译了,交叉编译器可是不带这些库文件的,所以我们得首先自己编译这些库文件装到交叉编译器中去。 注意一点:库不一定要装最新的,库版本太新,MiniGUI 有可能不认识,像jpeg 库和 ttf 库就是这样,太新了反而用不了,所以要注意版本,以下的库都是我验证过可以和MiniGUI一起工作的,其它版本的库没试过,不保证能正确通过:) 首先安装 zlib 库,这个是后面的库的编译基础。
&400多K,去下载吧, 下载到目录 /opt/st2410 下 [user]# tar zxf zlib-1.2.3.tar.gz 由于 zlib 库的configure 脚本不支持交叉编译选项,只好自己动用了,手动临时把 gcc 修改成指向我们的交叉编译器 arm-linux-gcc [Root]# cd /usr/bin [Root]# mv gcc gcc_back [Root]# ln -s /usr/local/arm/2.95.3/bin/arm-linux-gcc ./gcc [Root]# mv ld ld_back [Root]# ln -s /usr/local/arm/2.95.3/bin/arm-linux-ld ./ld OK ,修改完成后回到 /opt/st2410/zlib-1.2.3 目录下 [user]# &./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ --shared & 注意:这里配置指向 /usr/local/arm/2.95.3/arm-linux/ 目录,会自动安装在 /usr/local/arm/2.95.3/arm-linux/ [include,lib] 目录下,千万不要装错目录了,不然后面会找不到这个库的 [user]# &make [Root]# make install 安装完后检查一下目录 /usr/local/arm/2.95.3/arm-linux/ [include,lib] ,假如 include 中没有 zlib.h 之类的头文件,lib 中没有 libz.so.1.2.3 ,那就自己手动拷到这些目录下去,记着拷的时候把所有的 *.h &都需要拷过去,在拷库的时候用 cp &a libz.* /&./lib &就行,要用上 &a 选项 记着把刚才改过的 gcc 再改回去,不然后面会出错的!!!!! 安装 png 库,这个是用来显示 png 图形的,MiniGUI 里很多图都是 png 的,如果没有这个库,你的 MiniGUI 将无法正常工作,切记切记!
还是那句话,库不要用最新的,最新的容易有问题,用这个老一点的就没问题了,呵 [user]# tar zxf libpng-1.0.10rc1.tar.gz [user]# cd libpng-1.0.10rc1 Libpng 不提供有效的 configure 脚本,所以只好自己动手改 Makefile 文件了 [user]# cp scripts/makefile.linux &Makefile & //把 Scripts &下的一个 makefile 拷出来自己动手改 [user]# vi Makefile & &// 自己动手改 CC=arm-linux-gcc & &//修改这里 # where &make install& puts libpng.a, libpng.so*, png.h and pngconf.h prefix=/usr/local/arm/2.95.3/arm-linux & & //修改这里 # Where the zlib library and include files are located #ZLIBLIB=/usr/local/lib #ZLIBINC=/usr/local/include ZLIBLIB=/usr/local/arm/2.95.3/arm-linux/lib & //修改这里 ZLIBINC=/usr/local/arm/2.95.3/arm-linux/include & //修改这里 好了,保存,然后去编译吧 [user]# &make [user]# &make install 如果有错误,检查你前面的步骤哪个没做对 :) 尤其是 zlib 的安装 还是前面说的,检查 /usr/local/arm/2.95.3/arm-linux/ [include,lib] 目录中有成功安装否,如果没有安装成功,那就自己把编译出来的东西拷过去。记着,*.h 和 .so 的文件都要拷。 OK,现在来安装 jpeg 库
& &自己去下载,速度暴慢 [user]# tar zxf jpegsrc.v6b.tar.gz [user]# cd jpeg-6b [user]# ./configure &help & &//可以查看它的配置选项 首先在本机上编译一下,主要是它的 configure 文件设计得有问题,得先用 gcc 编译一个 dummy.c 的文件,然后才能后面编译,不然的话就会出现 libtool 找不到之类的错误 [user]# ./configure --enable-shared --enable-static 本机正常编译通过以后,[user]# make clean 清除掉,然后执行交叉编译 一般情况下用 [cdp@cdpserver jpeg-6b]$ ./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ --host=arm-linux --enable-shared --enable-static --host=arm-linux &来指定交叉编译选项,可是这里死活它不认,所以改用别的方法,如下 [user]# ./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ CC=arm-linux-gcc --enable-shared --enable-static [user]# make 安装前需要在 arm-linux 下建个目录,不然安装会出错 [Root]# mkdir &p /usr/local/arm/2.95.3/arm-linux/man/man1 [Root]# make install & &// OK 了 一样,自己去检查一下安装是否成功 :) 最后安装 libttf 库,这个是 TrueType 字体的支持库,用来显示文字的。
注意:MiniGUI 的文档说只支持 1.3.1 版本的 ttf 库,不要把版本弄错了 :) 这个库装起来最麻烦,全部自己手动编译,安装,下面一步一步来做吧:) [user]# tar zxf &freetype-1.3.1.tar.gz & & & //老一套 [user]# cd freetype-1.3.1 & //进到目录里去 [user]# mkdir &p /opt/st2410/libttf/extend & // 自己另外建立一个目录 [user]# cp freetype-1.3.1/lib/* &freetype-1.3.1/lib/arch/ansi/* &libttf/ & //把有用的东西拷出来 [user]#cp freetype-1.3.1/lib/extend/* &libttf/extend/ & &把 extend 目录下的文件也拷出来 注意 cp 命令不要用 &r 选项,因为会把一些没用的东西出拷出来的 拷贝完成了,现在来自己手动编译了 [user]# cd libttf [user]# arm-linux-gcc -c -fPIC -O2 freetype.c & & & & //不要奇怪,对,我们只要编译这一个 .c 文件,因为它包括了其它所有的 .c 文件了,你可以自己查看它的内容 & [user]# arm-linux-gcc -c -fPIC -O2 -I./ &extend/*.c & 把 extend 下所有的 .c 文件全部编译 [user]# arm-linux-gcc --shared -o libttf.so *.o & &生成最后的动态链接库,OK了 现在手动安装,得自己建立一下目录 [Root] mkdir &p /usr/local/arm/2.95.3/arm-linux/include/freetype1/freetype [Root] cp *.h &extend/*.h & /usr/local/arm/2.95.3/arm-linux/include/freetype1/freetype [Root] cp libttf.so &/usr/local/arm/2.95.3/arm-linux/lib 安装库完成,哈! 经过试验发现 MiniGUI 1.3.3 版本在链接 ljpeg lpng lttf 时老是要链接 /usr/lib 下的库,没办法,用老方法 [Root]# cd /usr/lib [Root]# mv libjpeg.so & libjpeg.so_back [Root]# ln &s /usr/local/arm/2.95.3/arm-linux/lib/libjpeg.so &./libjpeg.so & &//指向 arm 的库 [Root]# mv libpng.so & libpng.so_back [Root]# ln &s /usr/local/arm/2.95.3/arm-linux/lib/libpng.so &./libpng.so [Root]# mv libttf.so & libttf.so_back [Root]# ln &s /usr/local/arm/2.95.3/arm-linux/lib/libttf.so &./libttf.so 完成以上工作后就可以编译 libminigui 了 [user]# cd libminigui-1.3.3 [user]# &make menuconfig & & & & & & & &//就用图形界面来配置就好了,不要用一堆 &enable-xxx 之类的,太麻烦 如果在 make menuconfig 出错,去检查一下你的 gcc ,前面我们把它指向 arm-linux-gcc ,问一下,你改回来没有??????? 下面是配置libminigui 在 System Wide Options 里如下:
Build MiniGUI-Lite & & & &//用 Lite 方式编译,不是Thread 方式,这里适用于 PDA [ ] & Stand-Alone [ ] Use incore (built-in) resource & & & &//建议不要选这个,老有问题
Unit of timer is 10ms
Cursor support [ ] User can move window with mouse & //建议别选这个,可以移动蛮烦人的
Mouse button can do double click
Build with debugging messages [ ] Trace messages of MiniGUI & & & &//不要选这个,出来的Trace太多,看不过来
Include symbol name of messages 在 GAL &engine Options 里 (NEWGAL) GAL and its engines
& NEWGAL engine on Linux FrameBuffer console [ ] & NEWGAL engine on Qt Virtual FrameBuffer & & //建议不要选这个,不然老让你用qvfb [ ] & NEWGAL engine on eCos LCD interface
& Dummy NEWGAL engine
Have console on Linux FrameBuffer 在 IAL engine options 里 [ ] EP7211-based board [ ] ADS Graphics Client [ ] iPAQ H3600 (also H3800) [ ] MPC823 [ ] PX255B [ ] NEC VR4181 [ ] Helio Touch Panel [ ] MT T800
SMDK2410 Touch Screen [ ] uClinux Touch Screen Palm/MC68EZ328
Dummy IAL engine
Native (console) input engine --- & Native IAL engine subdriver options [ ] & PS2 mouse [ ] & IntelligentMouse (IMPS/2) mouse [ ] & MS mouse [ ] & MS3 mouse
& GPM daemon 在 Font Option 里
Raw bitmap font [ ] Var bitmap font &//千万不要选这个,不然会出现 unreferenced vfb_Courier8x8() 之类的错误
Incore font sansserif
Incore font courier
Incore font symbol
Incore font vgas
Qt Prerendered Font
TrueType font [ ] Adobe Type1 font 在 Image Options 里
Includes SaveBitmap-related functions [ ] PCX file support [ ] LBM/PBM file support [ ] TGA file support
GIF file support
JPG file support
PNG file support 在 Input Medthold Option 里
IME (GB2312) support [ ] IME (GB2312) Intelligent Pinyin module & //千万不要选这个,不然后面你的 mginit 程序一启动就崩溃了(Abort ,有点像 OOP 一样,显示所有的寄存器的值,然后Abort),暴不爽 在 Development Environment Option 里 (Linux) Platform (arm-linux-gcc) Compiler & //注意这里 (glibc) Libc & & & & & & //注意这里 --- Installation options Path prefix: &/usr/local/arm/2.95.3/arm-linux& & //注意这里,我们把库装到交叉编译器的目录下 --- Additonal Compiler Flags & & &CFLAGS: && & & &LDFLAGS: && 其它的用缺省的选项就可以了,好了,现在退出,保存你的设置吧,然后它就开始检测你的系统了,注意下面的输出: checking for FrameBuffer console support... yes checking for TT_FreeType_Version in -lttf... yes & & &//True Type字体 checking for jpeg_std_error in -ljpeg... yes & & & & & // jpeg 支持 checking for png_check_sig in -lpng... yes & & & & & //png 图形支持,重要!!! checking for pow in -lm... yes 这里的库应该都是显示为 yes 了,如果有 no 的话,回去检查前面你有哪步做得不对,不然的话编译后的东西可能没法正常执行,切记切记!!! 如果这里通过了,那就OK了 [user]# &make &//又是一个漫长的等待,呵 [Root]# &make install 注意:我们这里 make install 其实是给交叉编译器安装 libminigui 的库,你想,将来你需要编译为 minigui 开发的程序,这个程序总是需要链接库的吧,这些库因此也需要在交叉编译器中,不然你交叉编译的时候编译不过去 :) 装好了,到 /usr/local/arm/2.95.3/arm-linux &的 include lib 目录下去看看,是不是多了相应的 libminigui.so &libmgext.so &libvcongui.so & &在 include 目录下多了一个 minigui 目录,里面有相应的头文件 最后,安装 popt 库,这个库在编译 mde 程序时需要使用,不然编译没法通过 :)
&我是从这里下载的 [user]# &tar zxf popt-1.7.tar.gz [user]# cd popt-1.7 [user]# ./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ --host=arm-linux --enable-shared --enable-static [user]# make [Root]# make install 一切很顺利,搞定了。 交叉编译环境设置好了! OK ,下面是把 minigui 移植到你的板子上去了。 我在 /opt 目录下建立了一个 rootfs 目录,即 /opt/rootfs &,用来建立我的嵌入式系统的根目录,现在我需要把 minigui 的库文件放到里面去, 建立目录 [Root]# mkdir &p /opt/rootfs/usr/local/[lib,etc] 把 /usr/local/arm/2.95.3/arm-linux/lib 中相应的库拷到 /opt/rootfs/usr/local/lib 目录下去 下面是我拷的库文件: libjpeg.a & & & & &libmgext-1.3.so.3 & & & &libminigui.a & libpng.so.2 & & & & & &libttf.a & & & & & & & & libz.so libjpeg.la & & & & libmgext-1.3.so.3.0.0 & &libminigui.la &libpng.so.2.1.0.10rc1 &libttf.so & & & & & & &libz.so.1 libjpeg.so & & & &libmgext.a & & & & & & & libminigui.so &libpopt.a & & & & & & &libvcongui-1.3.so.3 & & &libz.so.1.2.3 libjpeg.so.62 & & &libmgext.la & & & & & & &libm.so & & & &libpopt.la & & & & & & libvcongui-1.3.so.3.0.0 &minigui libjpeg.so.62.0.0 &libmgext.so & & & & & & &libm.so.6 & & &libpopt.so & & & & & & libvcongui.a & & & & & & shared libm-2.2.3.so & & &libminigui-1.3.so.3 & & &libpng.a & & & libpopt.so.0 & & & & & libvcongui.la libm.a & & & & & & libminigui-1.3.so.3.0.0 &libpng.so & & &libpopt.so.0.0.0 & & & libvcongui.so 其中一些 .a 的静态库是不需要拷过去的,我图方便,一起拷了,呵,懒人的做法 同时修改 /opt/rootfs/etc/ld.so.conf ,在里面最后新加入一行 &/usr/local/lib 然后执行 [Root] ldconfig &r /opt/rootfs & & //把 rootfs 当成根目录,执行 OK,库文件准备完毕 下面把资源文件也拷过来,还记得吗,在前面 搭建 PC 环境中讲过安装资源文件,它被装在了 /usr/local/lib 目录下,一个叫 minigui 的目录,我们要做的就是把它拷过来 [Root]# cp &r &a /usr/local/lib/minigui &/opt/rootfs/usr/local/ & &连目录一起拷过来,目录结构和主机一样 把配置文件也拷过来 [Root]# cp /usr/local/etc/MiniGUI.cfg & /opt/rootfs/usr/local/etc/ & 记住,保持目录结构的一致 修改 MiniGUI.cfg ,如下 [system] # GAL engine gal_engine=fbcon & & //这里修改 # IAL engine ial_engine=dummy & & &// 这里修改,我不知道你会用什么触摸屏,所以就用dummy肯定不会错 mdev=/dev/touchscreen/0raw &//解摸屏,如果前面是 dummy ,则这里改不改无所谓 mtype=none [fbcon] defaultmode=240x320-16bpp &// 根据你的LCD大小自己设置,设置错误minigui 就启动不了 ial_engine 一开始建议用 dummy ,先让 minigui 跑起来,以后再把 触摸屏 加进去,保证尽可能减少错误的发生 保存,退出。 OK ,你的板子上的系统也搭建完毕了,现在来让真正的图形界面跑起来!:) 注意:你Build 你的 嵌入式 Linux 内核时,在 Console 中一定要先上 FrameBuffer ,从4位色一直到 16 位色的支持,全选上吧,同时把 VGA TextOut 选项勾掉,不要选它!!!!!!!!!! 内核启动时就要激活 FrameBuffer ,不然 minigui 没法启动起来,激活的方法就是给它传内核参数 vga=xxx 之类的。 3.启动你的 MiniGUI 的图形界面 看看你的 Windows 操作系统,左下方是一个 [开始] 按钮,然后是 任务条 ,MiniGUI 也提供了类似的界面,这就是一个叫 mginit 的程序,它启动后就跟widnows的界面很像了,它就在 mde 包里面,还记得最初让你下载的那个程序包吗?? &现在我们就来安装它!!:) [user]# tar zxf mde-1.3.0.tar.gz [user]# cd mde-1.3.0 //我们先对 mginit 程序做一点小修改,呵 [user]# & vi mginit.c 在 297 行处,把下面代码注释掉 /*************** & &AboutMiniGUI (); AboutMDE (); **************/ 保存,退出即可。 因为我们没有 触摸屏 现在,没法点它的 确认 按钮,所以把这些 About 信息去掉:) 好了,现在来编译吧,在mde-1.3.0 目录里 [user]# ./configure --prefix=/opt/rootfs/usr/local --host=arm-linux [user]# make 如果你发现 mginit 目录下的程序没有被编译,那就说明你的 libminigui 配置不正确,记住,你必须是配置为 Lite 模式,这个程序才会被编译 [user]# make install 事实上证明,make install,根本没用,它什么都没做,do nothing 所以还是我们自己动手来做吧,呵 [Root]# mkdir &p /opt/rootfs/usr/local/lib/shared/miniguiapps & &//建立了一个我们自己的目录,好长,呵 [Root]# cp &r &a &mde-1.3.0/* & /opt/rootfs/usr/local/lib/shared/miniguiapps 直接全部拷过去,然后到 /opt/rootfs/usr/local/lib/shared/miniguiapps 的各个程序目录下去,比如 mginit , bomb , painter 之类的,把不用的 .c .h .o Makefile 之类的全删除掉,保留 可执行文件和相应的 res 目录下的资源 注意,保持目录的结构,mginit.rc 文件不要删了,这个对mginit 程序很重要 OK,最后一步了,修改配置文件 [Root]# &vi &/opt/rootfs/linuxrc 文件 一般你配置嵌入式系统的时候都会有这个文件,用来执行一些系统的初始化工作,如果没有,就在你相应的初始化脚本(例如 etc/inittab)中加入下面的语句 mknod /dev/ttyp5 c 3 5 mknod /dev/ptyp5 c 2 5 cd /usr/local/lib/shared/miniguiapps/mginit ./mginit 注意:最后执行 mginit 命令的方式,先进入到它所在的目录,然后再执行,千万不要只写成 /usr/local/lib/shared/miniguiapps/mginit/mginit 因为 mginit 执行时在&当前目录&的res文件夹下搜索显示的资源,这种写法则&当前目录&为 / 根目录,所以会找不到 res 文件夹,于是显示错误 & Can not create taskbar! & 就退出了! 如果运行时显示没有 mknod 命令,请检查一下你的 busybox 的配置 :) 切记切记! 好了,一切成功了,现在放到你的板子上去试试吧:) [Root]# cd /opt [Root]# mkcramfs &rootfs &root.cramfs &制作根文件系统镜像,把 root.cramfs 烧到你的板子里面就OK了,启动,就可以看到 minigui 的图形界面启动了 :) 注意: 因为你的 minigui 是按 Lite 模式编译的,如果必须 mginit 首先运行起来,你其它的程序(比如 bomb ,或是 helloword)才能执行,如果 mginit 没有运行起来你就执行 helloword 的话,就会显示错误 & Can not attach shared resource ! & 4.为 &minigui 开发程序 环境配好了,现在是开发自己的程序了,呵呵,写个简单的 Helloword 程序 /* ** $Id: helloworld.c,v 1.7
07:15:49 weiym Exp $ ** ** Listing 2.1 ** ** helloworld.c: Sample program for MiniGUI Programming Guide ** & & &The first MiniGUI application. ** ** Copyright (C) 2003 Feynman Software. ** ** License: GPL */ #include &stdio.h& #include &minigui/common.h& #include &minigui/minigui.h& #include &minigui/gdi.h& #include &minigui/window.h& static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { & &HDC & &switch (message) { & & & &case MSG_PAINT: & & & & & &hdc = BeginPaint (hWnd); & & & & & &TextOut (hdc, 100, 100, &Hello, world!&); & & & & & &EndPaint (hWnd, hdc); & & & & & &return 0; & & & &case MSG_CLOSE: & & & & & &DestroyMainWindow (hWnd); & & & & & &PostQuitMessage (hWnd); & & & & & &return 0; & &} & &return DefaultMainWinProc(hWnd, message, wParam, lParam); } int MiniGUIMain (int argc, const char* argv[]) { & &MSG M & &HWND hMainW & &MAINWINCREATE CreateI #ifdef _LITE_VERSION & &SetDesktopRect(0, 0, ); #endif & &CreateInfo.dwstyle = WS_VISIBLE | WS_BORDER | WS_CAPTION; & &CreateInfo.dwExstyle = WS_EX_NONE; & &CreateInfo.spCaption = &Hello, world&; & &CreateInfo.hMenu = 0; & &CreateInfo.hCursor = GetSystemCursor(0); & &CreateInfo.hIcon = 0; & &CreateInfo.MainWindowProc = HelloWinP & &CreateInfo.lx = 0; & &CreateInfo.ty = 0; & &CreateInfo.rx = 320; & &CreateInfo.by = 240; & &CreateInfo.iBkColor = COLOR_ & &CreateInfo.dwAddData = 0; & &CreateInfo.hHosting = HWND_DESKTOP; & & & &hMainWnd = CreateMainWindow (&CreateInfo); & & & &if (hMainWnd == HWND_INVALID) & & & &return -1; & &ShowWindow(hMainWnd, SW_SHOWNORMAL); & &while (GetMessage(&Msg, hMainWnd)) { & & & &TranslateMessage(&Msg); & & & &DispatchMessage(&Msg); & &} & &MainWindowThreadCleanup (hMainWnd); & &return 0; } #ifndef _LITE_VERSION #include &minigui/dti.c& #endif 首先在 PC 上编译,验证通过! [user]# gcc &-o helloword &helloword.c &-lminigui &lmgext 如果没有错误,运行 qvfb ,按前面说的设置好,然后执行 [user]# ./helloword 一切正常,没有错误,现在就要把它放到我们的 板子上去跑了 [user]# arm-linux-gcc &O2 &o helloword helloword.c &lminigui &lmgext 编译完后,把它烧到板子的某个目录下,就可以在 板子上跑了! 所以这里就是说,minigui 提供了让你在 PC 上就可以调试和运行程序的方法(使用qvfb ),等你保证程序正确了以后,只需要把它重新编译一下,放到板子上去就行了! 5.一些常见的问题 这几天遇到不一些问题,发现论坛上也基本上没人回答我,所以只好自己解决了,这里把一些问题写出来,方便有需要的人: 问题1:在板子上跑的程序都显示 can not find qvfb & &之类,可是我只是想让它在板子上跑在 FrameBuffer 之上啊? 解决:在编译 libminigui 的时候,把 [ ] Use incore (built-in) resource & & & &//建议不要选这个,老有问题 [ ] & NEWGAL engine on Qt Virtual FrameBuffer & & //建议不要选这个,不然老让你用qvfb 问题2:编译的时候老出现 &unreferenced to vbf_Courier8x8() &之类的问题 解决: [ ] Var bitmap font &//千万不要选这个,不然会出现 unreferenced vfb_Courier8x8() 之类的错误 问题3:一切都搞定了,可是执行 mginit() 的时候就崩溃了,把所有的寄存器值打印了出来,然后显示了个 Abort() 就退出了! 解决: [ ] IME (GB2312) Intelligent Pinyin module & //千万不要选这个,不然后面你的 mginit 程序一启动就崩溃了 问题4: 为什么我执行 helloword 就显示 &Can not attach shared resource!& 解决: 注意: 因为你的 minigui 是按 Lite 模式编译的,如果必须 mginit 首先运行起来,你其它的程序(比如 bomb ,或是 helloword)才能执行,如果 mginit 没有运行起来你就执行 helloword 的话,就会显示错误 & Can not attach shared resource ! & 问题5:怎么把自己的程序加到 minigui 的 taskbar 上去,并且排在前面?? 解决: 查看 mginit 目录下的 mginit.rc 文件,里面就是配置,我想你能看明白的 :) 问题6:为什么我的程序显示 can not find libminigui.so ?? 解决:你是否忘了在 etc/ld.so.conf 中加入 /usr/local/lib ,并且执行 ldconfig 程序? 看前面说的方法 好了,就写这么多吧,希望对新手有所帮助! Singlewolfyu (大漠孤狼) 写于 清华 FIT 4-305
把我写的另一篇关于 IAL 校正的文章也归并到这个贴子里来,算是做个汇总吧,原贴可以在论坛中搜 singlewolfyu 的文章就可以找到,原贴里有一些我上传的附件,有兴趣可以去下载,这里就不上传了! 希望这篇文章能对大家有用! 带屏幕校正功能的 2410 的 IAL 作者:大漠孤狼 & & & & & & & &E-MAIL: 前几天成功的把 MiniGUI 移植到板子上了,顺利的跑起来了。我用的是 SMDK2410 的 IAL 程序,可是还有一些问题,如下: 1:点在触摸屏上不动,可以见到 Cusor 在点的位置附近老是跳动,而且点的位置不准, 2:经常点 MiniGUI 的菜单或是按钮的时候,MiniGUI 没有反应,经printf 出来,发现菜单有时候收不到 MSG_COMMAND 消息,有时候能收到,就是说很不稳定 3:经常点击触摸屏的手离开后,Cursor 就消失了 经过调试后发现了原因,如下: 1:由于用的触摸屏是比较便宜的那种,所谓便宜没好货,触摸屏的采样很不稳定,我的屏是 3 寸屏,分辨率是 240x320 16-pp 的那种,可是我点击触摸屏从驱动读出来的值却是 900 多,800 多,而且还不是简单的线性关系,比如我点 X 轴 120 处,值为 400 ,我点X轴 239 处值为 900 ,晕死,如果用原来的 SMDK 2410 IAL 程序,根本无法正常工作 2:便宜屏还有个问题,就是在刚开始按触摸屏和快要放手时,这一头一尾两种情况下,采样值根本就是错误的,比如我按在 X 轴 120 &处,刚开始得到的值是 230 ,然后是 250,400 ,401,398,403 &&402,100,101 ,这样的序号,可以看到,在刚开始和快结束时采到的值根本是错误的,这就是为什么我说&手一离开触摸屏,Cusor就消失&的原因为了,因为这时候 Cusor 跑到错误的坐标值上去了,当然就消失了 3:经常点 MiniGUI 的菜单却没有响应,其实还是上面 2 的原因,菜单的响应是当你的手离开触摸屏后,会产生一个 MSG_LBUTTONUP 消息,在这个消息中会调用 PtInRect()检查这时候的点击位置是否在菜单上,如果在的话,菜单就会触发一个 MSG_COMMAND 消息,于时菜单就会显示出来,其实 MiniGUI 中对所有的点击都是这样处理的。(自己看看 MiniGUI 的源代码就会明白了)。因为我的便宜屏在手快要离开触摸屏时得到的坐标是错误的,所以这时候 PtInRect() 就会返回错误的值,就好像我点在屏的别的地方了一样,所以这时候菜单根本得不到消息。 根据以上原因,我对 MiniGUI &1.3.3 版本中的 2410 的 IAL 程序进行了修改,使得它在我的 便宜屏 上一样可以正常工作。它提供了去抖动功能,就是点击时一头一尾那两下的不准确的值不能要,同时提供了一个方便的屏幕校准程序,你只需要做小小的修改就可以校准让它在你的 便宜屏 上很好的正常工作了。 新程序的使用方法: 在 2410.c 中定义了两个数组,如下 typedef struct mPoint { & & &int & & &x, & & & & & & & & & & & & & & & & & & & & & & & & & &} mPOINT ; static mPOINT ts_position[4]={ {940,926},{940,102},{96,104},{120,940} }; static mPOINT display_position[4]={ {0,0},{0,319},{239,319},{239,0} }; ts_position 意思为 TouchScreen 的 位置 display_position 意思为屏幕上显示的 位置 比如我前面说的,我的屏幕是 240x320 的,我点四个角 {0,0},{0,319},{239,319},{239,0} ,从触屏上读出来的数据分别为 {940,926},{940,102},{96,104},{120,940} ,填入这两个数就行 所以使用方法就是,你自己取四个点(其实只要3个点就够了,呵),点这四个点,得到相应的触摸屏读出来的值,把这些数据填到这两个数组中,OK,你的 触摸屏 就可以正常工作了 :) 后面附一个 readpos.c &的程序,你可以执行它,然后点击触摸屏,它会显示出触摸屏读出来的值。 程序: 2410_带触摸屏校正功能.c /* ** $Id: 2410.c,v 1.4
12:15:37 weiym Exp $ ** ** 2410.c: Low Level Input Engine for SMDK2410 Dev Board. ** ** Copyright (C) 2003 Feynman Software. */ /* ** This prog you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software F either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. &See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** alo if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA & &USA */ #include &stdio.h& #include &stdlib.h& #include &string.h& #include &unistd.h& #include &fcntl.h& #include &common.h& #ifdef _SMDK2410_IAL #include &sys/ioctl.h& #include &sys/poll.h& #include &sys/types.h& #include &sys/stat.h& #include &linux/kd.h& #include &sys/time.h& &/* i add it here */ #include &math.h& #include &sys/poll.h& #include &sys/types.h& #include &ial.h& #include &2410.h& typedef struct mPoint { & & & & & & & & & & & int & & &x, & & & & & & & & & & & & & & & & & & & & & & & & & &} mPOINT ; static mPOINT ts_position[4]={ {940,926},{940,102},{96,104},{120,940} & & & & & & & & & & & & & & &}; static mPOINT display_position[4]={ {0,0},{0,319},{239,319},{239,0} & & & & & & & & & & & & & & & & }; typedef struct Matrix { /* This arrangement of values facilitates * &calculations within getDisplayPoint() */ & & & & & & & & & & & int & & &An, & & /* A = An/Divider */ & & & & & & & & & & & & & & & &Bn, & & /* B = Bn/Divider */ & & & & & & & & & & & & & & & &Cn, & & /* C = Cn/Divider */ & & & & & & & & & & & & & & & &Dn, & & /* D = Dn/Divider */ & & & & & & & & & & & & & & & &En, & & /* E = En/Divider */ & & & & & & & & & & & & & & & &Fn, & & /* F = Fn/Divider */ & & & & & & & & & & & & & & & &D & & & & & & & & & &} mMATRIX ; static mMATRIX m_ int setCalibrationMatrix( mPOINT * display, & & & & & & & & & & & & & & & &mPOINT * screen, & & & & & & & & & & & & & & & &mMATRIX * matrix) ; int getDisplayPoint( mPOINT * display, & & & & & & & & & & & & & mPOINT * screen, & & & & & & & & & & & & & mMATRIX * matrix ) ; /* for data reading from /dev/ts */ typedef struct { & uns & & & } TS_EVENT; static unsigned char state [NR_KEYS]; static int ts = -1; static int mousex = 0; static int mousey = 0; static TS_EVENT ts_ #undef _DEBUG /************************ &Low Level Input Operations **********************/ /* * Mouse operations -- Event */ static int mouse_update(void) { & return 1; } static void mouse_getxy(int *x, int* y) { #ifdef _DEBUG & printf (&mousex = %d, mousey = %d/n&, mousex, mousey); #endif & if (mousex & 0) mousex = 0; & if (mousey & 0) mousey = 0; & if (mousex & 239) mousex = 239; & if (mousey & 319) mousey = 319; & *x = & *y = } static int mouse_getbutton(void) { &return ts_event. } #ifdef _LITE_VERSION static int wait_event (int which, int maxfd, fd_set *in, fd_set *out, fd_set *except, & & & & & & & struct timeval *timeout) #else static int wait_event (int which, fd_set *in, fd_set *out, fd_set *except, & & & & & & & struct timeval *timeout) #endif { & fd_set & int & &retvalue = 0; & int & &e; static int last_pressure=0; & if (!in) { & & & in = & & & & FD_ZERO (in); & } & if ((which & IAL_MOUSEEVENT) && ts &= 0) { & & & FD_SET (ts, in); #ifdef _LITE_VERSION & & & if (ts & maxfd) maxfd = #endif & } #ifdef _LITE_VERSION & e = select (maxfd + 1, in, out, except, timeout) ; #else & e = select (FD_SETSIZE, in, out, except, timeout) ; #endif & if (e & 0) { & & & if (ts &= 0 &&& FD_ISSET (ts, in) ) { & & & & & FD_CLR (ts, in); & & & & & ts_event.x=0; & & & & & ts_event.y=0; & & & & & read (ts, &ts_event, sizeof (TS_EVENT)); & & & & & &if(last_pressure==0) & & & & &{ & & & & & & read(ts,&ts_event,sizeof(TS_EVENT)); & & & & & & read(ts,&ts_event,sizeof(TS_EVENT)); &} & & & & & & & & & & if (ts_event.pressure & 0 ) { & & & & & & & & & & & int new_x; & & & & & & & int new_y; mPOINT ts_point,display_ & & & & & & & & & & & & & & ts_point.x=ts_event.x; & & & & & & & ts_point.y=ts_event.y; & & & & & & & & & & & & & & & getDisplayPoint(&display_point,&ts_point,&m_matrix); & & & & & & & & & & & & & & & new_x = display_point.x; & & & & & & & new_y = display_point.y; & & & & & & & if(last_pressure==0 || (last_pressure&0 && abs(new_x-mousex)&7)) & & & & & & & & & & & mousex=new_x; & & & & & & & if(last_pressure==0 || (last_pressure&0 && abs(new_y-mousey)&7)) & & & & & & & & & & & mousey=new_y; /* printf(&ts_x=%d,ts_y=%d/n&,ts_event.x,ts_event.y); & & & & & & & printf(&mounsex=%dmousey=%d/n&,mousex,mousey); */ & & & & & } #ifdef _DEBUG & & & & & if (ts_event.pressure & 0) { & & & & & & & printf (&mouse down: ts_event.x = %d, ts_event.y = %d/n&, ts_event.x, ts_event.y); & & & & & } #endif & & & & & & & & & & ts_event.pressure = ( ts_event.pressure & 0 ? IAL_MOUSE_LEFTBUTTON : 0); & & & & & & & & last_pressure=ts_event. /* & & printf(&pressure=%d/n&,ts_event.pressure); */ & & & & & retvalue |= IAL_MOUSEEVENT; & & & } & } & else if (e & 0) { & & & return -1; & } & } BOOL Init2410Input (INPUT* input, const char* mdev, const char* mtype) { & ts = open (&/dev/ts&, O_RDONLY); & if (ts & 0) { & & & fprintf (stderr, &2410: Can not open touch screen!/n&); & & & return FALSE; & } & input-&update_mouse = mouse_ & input-&get_mouse_xy = mouse_ & input-&set_mouse_xy = NULL; & input-&get_mouse_button = mouse_ & input-&set_mouse_range = NULL; & input-&wait_event = wait_ & mousex = 0; & mousey = 0; & ts_event.x = ts_event.y = ts_event.pressure = 0; setCalibrationMatrix(&display_position,&ts_position,&m_matrix); & & & return TRUE; } void Term2410Input(void) { & if (ts &= 0) & & & close(ts); & & } #endif /* _SMDK2410_IAL */ int setCalibrationMatrix( mPOINT * displayPtr, & & & & & & & & & & & & mPOINT * screenPtr, & & & & & & & & & & & & mMATRIX * matrixPtr) { & int &retvalue = 0 ; & & matrixPtr-&Divider = ((screenPtr[0].x - screenPtr[2].x) * (screenPtr[1].y - screenPtr[2].y)) - & & & & & & & & & & & &((screenPtr[1].x - screenPtr[2].x) * (screenPtr[0].y - screenPtr[2].y)) ; & if( matrixPtr-&Divider == 0 ) & { & & & retvalue = -1 ; & } & else & { & & & matrixPtr-&An = ((displayPtr[0].x - displayPtr[2].x) * (screenPtr[1].y - screenPtr[2].y)) - & & & & & & & & & & & ((displayPtr[1].x - displayPtr[2].x) * (screenPtr[0].y - screenPtr[2].y)) ; & & & matrixPtr-&Bn = ((screenPtr[0].x - screenPtr[2].x) * (displayPtr[1].x - displayPtr[2].x)) - & & & & & & & & & & & ((displayPtr[0].x - displayPtr[2].x) * (screenPtr[1].x - screenPtr[2].x)) ; & & & matrixPtr-&Cn = (screenPtr[2].x * displayPtr[1].x - screenPtr[1].x * displayPtr[2].x) * screenPtr[0].y + & & & & & & & & & & & (screenPtr[0].x * displayPtr[2].x - screenPtr[2].x * displayPtr[0].x) * screenPtr[1].y + & & & & & & & & & & & (screenPtr[1].x * displayPtr[0].x - screenPtr[0].x * displayPtr[1].x) * screenPtr[2]. & & & matrixPtr-&Dn = ((displayPtr[0].y - displayPtr[2].y) * (screenPtr[1].y - screenPtr[2].y)) - & & & & & & & & & & & ((displayPtr[1].y - displayPtr[2].y) * (screenPtr[0].y - screenPtr[2].y)) ; & & & & matrixPtr-&En = ((screenPtr[0].x - screenPtr[2].x) * (displayPtr[1].y - displayPtr[2].y)) - & & & & & & & & & & & ((displayPtr[0].y - displayPtr[2].y) * (screenPtr[1].x - screenPtr[2].x)) ; & & & matrixPtr-&Fn = (screenPtr[2].x * displayPtr[1].y - screenPtr[1].x * displayPtr[2].y) * screenPtr[0].y + & & & & & & & & & & & (screenPtr[0].x * displayPtr[2].y - screenPtr[2].x * displayPtr[0].y) * screenPtr[1].y + & & & & & & & & & & & (screenPtr[1].x * displayPtr[0].y - screenPtr[0].x * displayPtr[1].y) * screenPtr[2]. & } & return( retvalue ) ; } /* end of setCalibrationMatrix() */ int getDisplayPoint( mPOINT * displayPtr, & & & & & & & & & &mPOINT * screenPtr, & & & & & & & & & &mMATRIX * matrixPtr ) { & int &retvalue = 0 ; & if( matrixPtr-&Divider != 0 ) & { & & & & & /* Operation order is important since we are doing integer */ & & & & & /* &math. Make sure you add all terms together before & & &*/ & & & & & /* &dividing, so that the remainder is not rounded off & & */ & & & & & /* &prematurely. & & & & & & & & & & & & & & & & & & & & & */ & & & displayPtr-&x = ( (matrixPtr-&An * screenPtr-&x) + & & & & & & & & & & & & (matrixPtr-&Bn * screenPtr-&y) + & & & & & & & & & & & & &matrixPtr-&Cn & & & & & & & & & & & ) / matrixPtr-&D & & & displayPtr-&y = ( (matrixPtr-&Dn * screenPtr-&x) + & & & & & & & & & & & & (matrixPtr-&En * screenPtr-&y) + & & & & & & & & & & & & &matrixPtr-&Fn & & & & & & & & & & & ) / matrixPtr-&D & } & else & { & & & retvalue = -1 ; & } & return( retvalue ) ; } /* end of getDisplayPoint() */ Readpos.c 程序,帮助你读取触摸屏的值 #include &stdio.h& typedef struct { & uns & & & } TS_EVENT; static TS_EVENT ts_
int main() { & ts = open (&/dev/ts&, 0); & if (ts & 0) { & & & fprintf (stderr, &2410: Can not open touch screen!/n&); & & & return 0; & } while(1) & { & & & if( & & & read (ts, &ts_event, sizeof (TS_EVENT))) & & &{ & & & & &printf(&X=%d,Y=%d,Pressure=%d /n&,ts_event.x,ts_event.y,ts_event.pressure); & & & } & & & } } 大漠孤狼 &
&写于 清华 FIT 4-305
[]   []   []   []   []
此文章相关评论:
该文章有<font color="#ff个相关评论如下:()
我现在头疼死了,dummyial很正常,但挂上我自己的ial就提示abort,能向你请教吗?我的邮箱:我的QQ:请大虾帮帮我吧
我想请教搂主一件事:我在交叉编译jpeg库时,提示信息说找不到./libtool,于是我下载了一个libtool安装包,然后交叉编译libtool,改变configure文件里的CC为交叉编译器,配制可通过,然后make的时候就死活过不去了楼主有没有遇到这种情况?非常感谢!
一般情况下用 [cdp@cdpserver jpeg-6b]$ ./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ --host=arm-linux --enable-shared --enable-static --host=arm-linux &来指定交叉编译选项,可是这里死活它不认,所以改用别的方法,如下 [user]# ./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ CC=arm-linux-gcc --enable-shared --enable-static [user]# make
我就用./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ --host=arm-linux --enable-shared --enable-static 是可以的 但是编译libminigui库的时候不支持jpeg 也试了./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ CC=arm-linux-gcc --enable-shared --enable-static 可是和楼上的说的一样 可以configure 但是一make 就出错 请问楼主是怎么回事!
10:26am相关附件: (共 9896 字节)
./libtool &不用去下载的,是你的编译器路径配置不对
比如我把 arm-linux-gcc 装在 /usr/local/arm/2.95.3/bin 下,就把这个路径加到你的 PATH 环境变量中去
这样就行了
照着我写的做,我是一步一步试过的,没问题
按我说的方法先把 jpeg 库编译通过,然后安装到 /usr/local/arm/2.95.3/arm-linux/ [include,lib] &这两个目录下去,不要装在了 /usr/local/arm/2.95.3/ [include,lib] 目录下,不然就找不到这个库
同时在编译 libminigui 时记着把 /usr/lib 目录下的 libjpeg.so 先保存一下mv libjpeg.so libjpeg.so_back然后把你编译好的 arm 的 libjpeg.so 链接到这里ln -s //usr/local/arm/2.95.3/arm-linux/lib/libjpeg.so &./libjpeg.so
因为MiniGUI 死活就只检查/usr/lib 目录下,当它发现你的 /usr/lib/libjpeg.so 是为 i386 编译的,而不是 arm 时,它就不把 jpeg 库编译进去
做完以上两步后,然后在 libminigui 目录下 make menuconfig选上 jpeg 库支持,然后它会检查你的系统,这时候就能找到为 arm 编译的 libjpeg.so 库了
不是啊,我察看环境变量:$PATH,显示有/opt/host/armv4l/bin(交叉编译器装在这里),而且之前CC=armv4l-unknown-linux-gcc ./configure ...是可以通过的,要是因为环境配置的话configure应该过不去
楼主辛苦了写这么详细,真不容易啊应该给精了
我也遇到了jpeg库的老去/usr/lib下找的问题了我直接拷了一份arm的然后把系统的给覆盖了不多那么一来好多东西不能用,所以用完还得换回去,挺郁闷的
楼主,我按您所写的网址,下载不到png库,网上也没有搜到同名的!没法继续进行,还有那里可以下载亚?
下面引用由yangyi在
08:44am 发表的内容: 我想请教搂主一件事:我在交叉编译jpeg库时,提示信息说找不到./libtool,于是我下载了一个libtool安装包,然后交叉编译libtool,改变configure文件里的CC为交叉编译器,配制可通过,然后make的时候就死活过不去 ...
是你的libtool路径不对,用ln把你的交叉编译器下的libtool链接到当前目录就可以了;
不知道楼主有没有移植到开发板上尝试过没有?我在移植到240*320,16bit的开发板时,发现颜色显示不对,修改了newgal目录下的Pixels.c文件中的
Uint32 GAL_MapRGB(GAL_Pixelformat *format, Uint8 r, Uint8 g, Uint8 b){if ( format-&palette == NULL ) {return (r && 3) && 11& & &| (g && 2) && 5& & &| (b && 3) && 0;& & &//return (r && format-&Rloss) && format-&Rshift// & & & | (g && format-&Gloss) && format-&Gshift// & & & | (b && format-&Bloss) && format-&Bshift// & & & | format-&A} else {& & & if (format-&DitheredPalette)& & & & &return GAL_FindDitheredColor (format-&BitsPerPixel, r, g, b);& & & else& & & & &return GAL_FindColor(format-&palette, r, g, b);}}能正常显示颜色了,但是在装载带有alpha通道的png图片时,图片颜色又不对了,可能需要修改Uint32 GAL_MapRGBA(GAL_Pixelformat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a)函数,但不知道怎么弄,不知道楼主有没有遇到过?
楼主我在进行到make menuconfig的
checking for FrameBuffer console support... yeschecking for TT_FreeType_Version in -lttf... yes & & &//True Type字体checking for jpeg_std_error in -ljpeg... yes & & & & & // jpeg 支持checking for png_check_sig in -lpng... yes & & & & & //png 图形支持,重要!!!checking for pow in -lm... yes
的时候,别的都显示yes只有checking for png_check_sig in -lpng... no可是我去 /usr/local/arm/2.95.3/arm-linux/lib中查看已经存在libpng.a libpng.so & &libpng.so.2 libpng.so.2.1.0.10rc1 &而且/usr/local/arm/2.95.3/arm-linux/include中也已经存在相对应的.h文件
为什么还显示no呢?请楼主和各位高人帮忙!
在 /usr/lib &下建立一个 libpng.so 指向 你编译好的适用 arm 的 png 库
仔细看我写的,里面有写要建立 link
To wayner1 &:
我觉得不会是 MiniGUI 的问题,会不会是你的 LCD 的驱动程序有问题,检查一下驱动程序吧,或是你的 LCD 硬件有问题
移植成功感谢楼主
不是LCD的问题,我的驱动和硬件在1.6版本上运行一切正常,只在1.3版本上有问题。 因为1.6的开源版本没有使用newgal,不支持png图片的透明通道。但1.3版本却可以支持,但显示有问题。
下面引用由singlewolfyu在
05:17pm 发表的内容: To wayner1 &: 我觉得不会是 MiniGUI 的问题,会不会是你的 LCD 的驱动程序有问题, 检查一下驱动程序吧,或是你的 LCD 硬件有问题
似乎有人碰到过同样的问题,查看下面链接:
和我的问题相同
我是严格按照楼主的方式来的可是出现如下信息在安装完所有的库之后make menuconfigmake
/usr/local/arm/2.95.3/arm-linux/bin/ld: template.lo: Relocations in generic ELF (EM: 3)template.lo: could not read symbols: File in wrong formatcollect2: ld returned 1 exit statusmake[3]: *** [libminigui.la] Error 1make[2]: *** [all-recursive] Error 1make[1]: *** [all-recursive] Error 1make: *** [all] Error 2
这是怎么回事请楼主和其他高手指教!
template.lo
用 file 命令查看一下这个文件,肯定不是 ARM 指令集的,所以 ld 不认它的格式,把这个重新用 arm-linux-gcc 编译一下
赞一下楼主,确实是相当有帮助
楼主,我按您所写方法移植,库文件太大,我的ramdisk只有8M,这么办
我在装zlib库./ configure 时出现错误 hecking for vsnprintf() in stdio.h... No.&WARNING: vsnprintf() not found, falling back to vsprintf(). zlib&can build but will be open to possible buffer-overflow security&vulnerabilities.然后make 时出现错误gcc -O3 -DNO_vsnprintf -DUSE_MMAP -o example example.o -L. libz.a/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o): In function `__do_global_ctors':__main.o(.text+0xc4): undefined reference to `__CTOR_LIST__'/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.data+0x0): undefined reference to `__DTOR_LIST__'collect2: ld returned 1 exit status
你 好按照你 说的 方法进行zlib库编译./configureChecking for vsnprintf() in stdio.h... No.&WARNING: vsnprintf() not found, falling back to vsprintf(). zlib&can build but will be open to possible buffer-overflow security&vulnerabilities.
make的 时候出现错误gcc -O3 -DNO_vsnprintf -DUSE_MMAP -o example example.o -L. libz.a/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o): In function `__do_global_ctors':__main.o(.text+0xc4): undefined reference to `__CTOR_LIST__'/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.data+0x0): undefined reference to `__DTOR_LIST__'该在那里定义??
楼主你好,我按您所写的网址,下载不到png库,网上也没有搜到同版本的!还有那里可以下载呀? &或能不能发一个给我呢?谢谢!还有lz能提供你这个交叉编译的makefile共享吗?
At the first step ,when I make the minigui-1.3.3, the error is :/usr/include/asm/byteorder.h:6:2: warning: #warning using p include &endian.h& instead!stretch.c:265:47: missing terminating & characterstretch.c:267:25: missing terminating & charactermake[3]: *** [stretch.lo] Error 1make[3]: Leaving directory `/opt/st2410/libminigui-1.3.3/src/newgal'make[2]: *** [install-recursive] Error 1make[2]: Leaving directory `/opt/st2410/libminigui-1.3.3/src/newgal'make[1]: *** [install-recursive] Error 1make[1]: Leaving directory `/opt/st2410/libminigui-1.3.3/src'make: *** [install-recursive] Error 1
What's wrong with it?I'm sorry .I can't input Chinese in the linux system.
请问楼主:template.lo如何重新用 arm-linux-gcc 编译呢? 谢谢
谢谢楼主,!!!
[这个贴子最后由simin168在
03:12pm 第 1 次编辑]谢谢!!!
jpeg.c:68: jpeglib.h: No such file or directoryjpeg.c:69: jerror.h: No such file or directoryjpeg.c:75: field `pub' has incomplete typejpeg.c:78: parse error before `JOCTET'jpeg.c:78: warning: no semicolon at end of struct or unionjpeg.c:79: warning: type defaults to `int' in declaration of `start_of_file'jpeg.c:79: warning: data definition has no type or storage classjpeg.c:80: warning: type defaults to `int' in declaration of `my_source_mgr'jpeg.c:80: warning: data definition has no type or storage classjpeg.c:82: parse error before `*'jpeg.c:82: warning: type defaults to `int' in declaration of `my_src_ptr'jpeg.c:82: warning: data definition has no type or storage classjpeg.c:91: parse error before `cinfo'jpeg.c:92: warning: function declaration isn't a prototypejpeg.c: In function `init_source':jpeg.c:93: `my_src_ptr' undeclared (first use in this function)jpeg.c:93: (Each undeclared identifier is reported only oncejpeg.c:93: for each function it appears in.)jpeg.c:93: parse error before `src'jpeg.c:99: `src' undeclared (first use in this function)jpeg.c: At top level:jpeg.c:107: parse error before `fill_input_buffer'jpeg.c:107: parse error before `cinfo'jpeg.c:108: warning: return-type defaults to `int'jpeg.c:108: warning: function declaration isn't a prototypejpeg.c: In function `fill_input_buffer':jpeg.c:109: `my_src_ptr' undeclared (first use in this function)jpeg.c:109: parse error before `src'jpeg.c:112: `src' undeclared (first use in this function)jpeg.c:116: warning: implicit declaration of function `ERREXIT'jpeg.c:116: `cinfo' undeclared (first use in this function)jpeg.c:116: `JERR_INPUT_EMPTY' undeclared (first use in this function)jpeg.c:117: warning: implicit declaration of function `WARNMS'jpeg.c:117: `JWRN_JPEG_EOF' undeclared (first use in this function)jpeg.c:119: `JOCTET' undeclared (first use in this function)jpeg.c:119: parse error before `0xFF'jpeg.c:120: parse error before `JPEG_EOI'jpeg.c:110: warning: `nbytes' might be used uninitialized in this functionjpeg.c: At top level:jpeg.c:136: parse error before `cinfo'jpeg.c:137: warning: function declaration isn't a prototypejpeg.c: In function `skip_input_data':jpeg.c:138: `my_src_ptr' undeclared (first use in this function)jpeg.c:138: parse error before `src'jpeg.c:144: `num_bytes' undeclared (first use in this function)jpeg.c:145: `src' undeclared (first use in this function)jpeg.c:147: `cinfo' undeclared (first use in this function)jpeg.c: At top level:jpeg.c:175: parse error before `cinfo'jpeg.c:176: warning: function declaration isn't a prototypejpeg.c:186: parse error before `cinfo'jpeg.c:187: warning: function declaration isn't a prototypejpeg.c: In function `my_jpeg_data_src':jpeg.c:188: `my_src_ptr' undeclared (first use in this function)jpeg.c:188: parse error before `src'jpeg.c:197: `cinfo' undeclared (first use in this function)jpeg.c:199: `j_common_ptr' undeclared (first use in this function)jpeg.c:199: parse error before `cinfo'jpeg.c:201: `src' undeclared (first use in this function)jpeg.c:201: parse error before `cinfo'jpeg.c:202: `JOCTET' undeclared (first use in this function)jpeg.c:202: parse error before `)'jpeg.c:203: parse error before `cinfo'jpeg.c:207: parse error before `cinfo'jpeg.c:211: `jpeg_resync_to_restart' undeclared (first use in this function)jpeg.c:213: `infile' undeclared (first use in this function)jpeg.c: In function `load_jpg':jpeg.c:228: storage size of `cinfo' isn't knownjpeg.c:229: storage size of `jerr' isn't knownjpeg.c:263: warning: implicit declaration of function `jpeg_std_error'jpeg.c:266: warning: implicit declaration of function `jpeg_create_decompress'jpeg.c:272: warning: implicit declaration of function `jpeg_read_header'jpeg.c:275: `JCS_GRAYSCALE' undeclared (first use in this function)jpeg.c:275: `JCS_RGB' undeclared (first use in this function)jpeg.c:287: `j_common_ptr' undeclared (first use in this function)jpeg.c:287: `JPOOL_IMAGE' undeclared (first use in this function)jpeg.c:288: `JDIMENSION' undeclared (first use in this function)jpeg.c:288: parse error before `cinfo'jpeg.c:312: warning: implicit declaration of function `jpeg_calc_output_dimensions'jpeg.c:341: warning: implicit declaration of function `jpeg_start_decompress'jpeg.c:345: `JSAMPROW' undeclared (first use in this function)jpeg.c:345: parse error before `rowptr'jpeg.c:348: `rowptr' undeclared (first use in this function)jpeg.c:349: warning: implicit declaration of function `jpeg_read_scanlines'jpeg.c:355: warning: implicit declaration of function `jpeg_finish_decompress'jpeg.c:358: warning: implicit declaration of function `jpeg_destroy_decompress'jpeg.c:229: warning: unused variable `jerr'jpeg.c:228: warning: unused variable `cinfo'make[3]: *** [jpeg.lo] Error 1make[3]: Leaving directory `/opt/sam2410/libminigui-1.3.3/src/mybmp'make[2]: *** [all-recursive] Error 1make[2]: Leaving directory `/opt/sam2410/libminigui-1.3.3/src'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/opt/sam2410/libminigui-1.3.3'make: *** [all] Error 2[root@localhost libminigui-1.3.3]# cd $HOME[root@localhost root]# vi .bashrc
出了错了.在
[user]# cd libminigui-1.3.3[user]# &make menuconfig
不得不顶 楼主简直就想是漆黑中的荧火虫让我看到 黎明就要来了 。。我自己估计摸索了2周,也配置不好环境 ,可能是版本的问题,用的是 1。6。9的 。老出错。
楼主,我用的是libminigui-1.62,在交叉编译时,就是无法执行make menuconfig,所以我 只有用./configure配置,命令如下:
edward@gl:~/soft/libminigui-str-1.6.2& ./configure --prefix=/opt/uClinux/bfin-uclinux --build=i386-linux --host=bfin-uclinux-gcc--target=bfin-uclinux-gcc --with-osname=uclinux --enable-lite --disable-micemoveable --disable-video-qvfb --disable-vbfsupport --disable-imegb2312 --disable-imegb2312pinyin
却出现了下面的错误:checking build system type... i386-pc-linux-gnuchecking host system type... Invalid configuration `/bfin-uclinux-gcc': machine `/bfin-uclinux' not recognizedconfigure: error: /bin/sh ./config.sub/bfin-uclinux-gcc failed为什么会这样呢?清指教~~
楼主,我在./configure的时出现了 error:cannot guess build type:you must specify 到底是什么问题啊?我的邮箱是password_
按照你上面的步骤开发环境搭建成功,但是在目标板上执行出现如下错误,请指教
./helloword:error while loading shared libraries:/lib/libminigui-1.3.so.3:undefined symbol:g_SyslogFot
大侠,我按照你的步骤把程序移植到开发板上了,可是在执行mginit时,老报错:can not load shared resource! 我已经调了一周还是解决不了,望大侠指点呀
楼主和各位高手:& &在装zlib库的时候,楼主说要手动临时把 gcc 修改成指向我们的交叉编译器arm-linux-gcc 文中说:[Root]# cd /usr/bin[Root]# mv gcc gcc_back[Root]# ln -s /usr/local/arm/2.95.3/bin/arm-linux-gcc ./gcc[Root]# mv ld ld_back[Root]# ln -s /usr/local/arm/2.95.3/bin/arm-linux-ld ./ld
用完之后要改回去,请问是不是这么改回去:[Root]# cd /usr/bin[Root]# mv gcc_back gcc[Root]# ln -s /usr/bin/gcc ./gcc[Root]# mv ld_back ld[Root]# ln -s /usr/bin/ld ./ld我不能确定,向各位请教一下
楼主和各位高手:& 在装zlib库的时候,楼主说要手动临时把 gcc 修改成指向我们的交叉编译器arm-linux-gcc 文中说:[Root]# cd /usr/bin[Root]# mv gcc gcc_back[Root]# ln -s /usr/local/arm/2.95.3/bin/arm-linux-gcc ./gcc[Root]# mv ld ld_back[Root]# ln -s /usr/local/arm/2.95.3/bin/arm-linux-ld ./ld用完之后要改回去,请问是不是这么改回去:[Root]# cd /usr/bin[Root]# mv gcc_back gcc[Root]# ln -s /usr/bin/gcc ./gcc[Root]# mv ld_back ld[Root]# ln -s /usr/bin/ld ./ld我不能确定,向各位请教一下
&同时修改 /opt/rootfs/etc/ld.so.conf ,在里面最后新加入一行 &/usr/local/lib
然后执行 [Root] ldconfig &r /opt/rootfs & & //把 rootfs 当成根目录,执行&
我的不能通过,为啥?
如何增加对EXIF图像的支持?
下面引用由ds在
10:55am 发表的内容: 楼主和各位高手: & 在装zlib库的时候,楼主说要手动临时把 gcc 修改成指向我们的交叉编译器arm-linux-gcc 文中说: # cd /usr/bin# mv gcc gcc_back ...
直接把名字改回去即可,
我在PPC开发环境下安装MINIGUI,出现以下错误,大家帮忙看看啊[root@localhost libminigui-1.3.3]# make menuconfigmake -C scripts/lxdialog -f makefile.lx allmake[1]: Entering directory `/gui/libminigui-1.3.3/scripts/lxdialog'make[1]: Leaving directory `/gui/libminigui-1.3.3/scripts/lxdialog'/bin/sh scripts/Menuconfig configs/config.inUsing defaults found in .configPreparing scripts: functions, parsing..............done.Saving your MiniGUI configuration...install prefix = /LinuPPC/CDK/bincompiler = ppc-linux-gcctarget = ppc-linuxhost = ppc-linuxchecking build system type... i386-pc-linux-gnuchecking host system type... powerpc-unknown-linux-gnuchecking target system type... powerpc-unknown-linux-gnuchecking for ppc-linux-gcc... ppc-linux-gccchecking for C compiler default output... configure: error: C compiler cannot create executablesSee `config.log' for more details.*** End of MiniGUI configuration.*** Next, you must run 'make'.
[root@localhost libminigui-1.3.3]# make/bin/sh ./config.status --recheck./config.status: ./config.status: 没有那个文件或目录make: *** [config.status] Error 127
config.log文件内容如下:This file contains any messages produced by compilers whilerunning configure, to aid debugging if configure makes a mistake.
It was created by configure, which wasgenerated by GNU Autoconf 2.57. &Invocation command line was
&$ ./configure --prefix=/LinuxPPC/CDK/bin --target=ppc-linux --host=ppc-linux --enable-lite --disable-micemoveable --enable-debug --enable-msgstr --disable-nativegal --disable-videoqvfb --disable-videoecoslcd --enable-mpc823ial --disable-nativeps2 --disable-nativeimps2 --disable-nativems --disable-nativems3 --disable-vbfsupport --disable-type1support --disable-jpgsupport --disable-pngsupport --disable-imegb2312py --build=i386-linux
## --------- #### Platform. #### --------- ##
hostname = localhost.localdomainuname -m = i686uname -r = 2.4.20-8uname -s = Linuxuname -v = #1 Thu Mar 13 17:54:28 EST 2003
/usr/bin/uname -p = unknown/bin/uname -X & & = unknown
/bin/arch & & & & & & &= i686/usr/bin/arch -k & & & = unknown/usr/convex/getsysinfo = unknownhostinfo & & & & & & & = unknown/bin/machine & & & & & = unknown/usr/bin/oslevel & & & = unknown/bin/universe & & & & &= unknown
PATH: /usr/kerberos/sbinPATH: /usr/kerberos/binPATH: /usr/local/sbinPATH: /usr/local/binPATH: /sbinPATH: /binPATH: /usr/sbinPATH: /usr/binPATH: /usr/X11R6/binPATH: /sbinPATH: /usr/localPATH: /usr/local/binPATH: /root/binPATH: /sbinPATH: /usr/localPATH: /usr/local/binPATH: /sbinPATH: /usr/localPATH: /usr/local/binPATH: /sbinPATH: /usr/localPATH: /usr/local/bin
## ----------- #### Core tests. #### ----------- ##
configure:1636: checking build system typeconfigure:1654: result: i386-pc-linux-gnuconfigure:1662: checking host system typeconfigure:1676: result: powerpc-unknown-linux-gnuconfigure:1684: checking target system typeconfigure:1698: result: powerpc-unknown-linux-gnuconfigure:1721: checking for ppc-linux-gccconfigure:1747: result: ppc-linux-gccconfigure:2029: checking for C compiler versionconfigure:2032: ppc-linux-gcc --version &/dev/null &&5./configure: line 1: ppc-linux-gcc: command not foundconfigure:2035: $? = 127configure:2037: ppc-linux-gcc -v &/dev/null &&5./configure: line 1: ppc-linux-gcc: command not foundconfigure:2040: $? = 127configure:2042: ppc-linux-gcc -V &/dev/null &&5./configure: line 1: ppc-linux-gcc: command not found //为什么显示找不到configure:2045: $? = 127configure:2069: checking for C compiler default outputconfigure:2072: ppc-linux-gcc & &conftest.c &&&5./configure: line 1: ppc-linux-gcc: command not foundconfigure:2075: $? = 127configure: failed program was:| #line 2048 &configure&| /* confdefs.h. &*/| | #define PACKAGE_NAME &&| #define PACKAGE_TARNAME &&| #define PACKAGE_VERSION &&| #define PACKAGE_STRING &&| #define PACKAGE_BUGREPORT &&| /* end confdefs.h. &*/| | int| main ()| {| | & ;| & return 0;| }configure:2114: error: C compiler cannot create executablesSee `config.log' for more details.
## ---------------- #### Cache variables. #### ---------------- ##
ac_cv_build=i386-pc-linux-gnuac_cv_build_alias=i386-linuxac_cv_env_CC_set=setac_cv_env_CC_value=ppc-linux-gccac_cv_env_CFLAGS_set=ac_cv_env_CFLAGS_value=ac_cv_env_CPPFLAGS_set=ac_cv_env_CPPFLAGS_value=ac_cv_env_CPP_set=setac_cv_env_CPP_value='gcc -E'ac_cv_env_LDFLAGS_set=ac_cv_env_LDFLAGS_value=ac_cv_env_build_alias_set=setac_cv_env_build_alias_value=i386-linuxac_cv_env_host_alias_set=setac_cv_env_host_alias_value=ppc-linuxac_cv_env_target_alias_set=setac_cv_env_target_alias_value=ppc-linuxac_cv_host=powerpc-unknown-linux-gnuac_cv_host_alias=ppc-linuxac_cv_prog_CC=ppc-linux-gccac_cv_target=powerpc-unknown-linux-gnuac_cv_target_alias=ppc-linux
## ----------------- #### Output variables. #### ----------------- ##
ACLOCAL=''ADS_IAL_ENGINE_FALSE=''ADS_IAL_ENGINE_TRUE=''ALLOCA=''AMDEPBACKSLASH=''AMDEP_FALSE=''AMDEP_TRUE=''AMTAR=''AUTOCONF=''AUTOHEADER=''AUTOMAKE=''AWK='gawk'BIG5_SUPPORT_FALSE=''BIG5_SUPPORT_TRUE=''CC='ppc-linux-gcc'CCDEPMODE=''CFLAGS=''CPP='gcc -E'CPPFLAGS=''DEFS=''DEPDIR=''DUMMY_IAL_ENGINE_FALSE=''DUMMY_IAL_ENGINE_TRUE=''ECHO='echo'ECHO_C=''ECHO_N='-n'ECHO_T=''EGREP=''EP7211_IAL_ENGINE_FALSE=''EP7211_IAL_ENGINE_TRUE=''EUCKR_SUPPORT_FALSE=''EUCKR_SUPPORT_TRUE=''EXEEXT=''FLAT_WINDOW_STYLE_FALSE=''FLAT_WINDOW_STYLE_TRUE=''GB18030_SUPPORT_FALSE=''GB18030_SUPPORT_TRUE=''GBK_SUPPORT_FALSE=''GBK_SUPPORT_TRUE=''GB_SUPPORT_FALSE=''GB_SUPPORT_TRUE=''GIF_FILE_SUPPORT_FALSE=''GIF_FILE_SUPPORT_TRUE=''HAS_FREETYPE2_FALSE=''HAS_FREETYPE2_TRUE=''HELIO_IAL_ENGINE_FALSE=''HELIO_IAL_ENGINE_TRUE=''IME_GB2312_PINYIN_SUPPORT_FALSE=''IME_GB2312_PINYIN_SUPPORT_TRUE=''IME_GB2312_SUPPORT_FALSE=''IME_GB2312_SUPPORT_TRUE=''INSTALL_DATA=''INSTALL_PROGRAM=''INSTALL_SCRIPT=''INSTALL_STRIP_PROGRAM=''IPAQ_IAL_ENGINE_FALSE=''IPAQ_IAL_ENGINE_TRUE=''JPG_FILE_SUPPORT_FALSE=''JPG_FILE_SUPPORT_TRUE=''LBM_FILE_SUPPORT_FALSE=''LBM_FILE_SUPPORT_TRUE=''LDFLAGS=''LIBGGI_ENGINE_FALSE=''LIBGGI_ENGINE_TRUE=''LIBOBJS=''LIBS=''LIBTOOL=''LIB_VCONGUI_FALSE=''LIB_VCONGUI_TRUE=''LITE_VERSION_FALSE=''LITE_VERSION_TRUE=''LN_S=''LTLIBOBJS=''LT_AGE='0'LT_CURRENT='3'LT_RELEASE='1.3'LT_REVISION='0'MAKEINFO=''MISC_ABOUTDLG_FALSE=''MISC_ABOUTDLG_TRUE=''MiniGUI_BINARY_AGE='0'MiniGUI_INTERFACE_AGE='0'MiniGUI_MAJOR_VERSION='1'MiniGUI_MICRO_VERSION='3'MiniGUI_MINOR_VERSION='3'MiniGUI_VERSION='1.3.3'NATIVE_GAL_ENGINE_FALSE=''NATIVE_GAL_ENGINE_TRUE=''NATIVE_IAL_ENGINE_FALSE=''NATIVE_IAL_ENGINE_TRUE=''OBJEXT=''PACKAGE=''PACKAGE_BUGREPORT=''PACKAGE_NAME=''PACKAGE_STRING=''PACKAGE_TARNAME=''PACKAGE_VERSION=''PATH_SEPARATOR=':'PCX_FILE_SUPPORT_FALSE=''PCX_FILE_SUPPORT_TRUE=''PNG_FILE_SUPPORT_FALSE=''PNG_FILE_SUPPORT_TRUE=''PX255B_IAL_ENGINE_FALSE=''PX255B_IAL_ENGINE_TRUE=''RANLIB=''RBF_SUPPORT_FALSE=''RBF_SUPPORT_TRUE=''SET_MAKE=''SHELL='/bin/sh'SHIFTJIS_SUPPORT_FALSE=''SHIFTJIS_SUPPORT_TRUE=''STAND_ALONE_FALSE=''STAND_ALONE_TRUE=''STRIP='strip'SVGALIB_ENGINE_FALSE=''SVGALIB_ENGINE_TRUE=''SYSTEM_LIBS=''TFSTB_IAL_ENGINE_FALSE=''TFSTB_IAL_ENGINE_TRUE=''TGA_FILE_SUPPORT_FALSE=''TGA_FILE_SUPPORT_TRUE=''THOR_IAL_ENGINE_FALSE=''THOR_IAL_ENGINE_TRUE=''TTF_SUPPORT_FALSE=''TTF_SUPPORT_TRUE=''TYPE1_SUPPORT_FALSE=''TYPE1_SUPPORT_TRUE=''UJIS_SUPPORT_FALSE=''UJIS_SUPPORT_TRUE=''USE_NEWGAL_FALSE=''USE_NEWGAL_TRUE=''VBF_SUPPORT_FALSE=''VBF_SUPPORT_TRUE=''VERSION=''VGA16_GAL_ENGINE_FALSE=''VGA16_GAL_ENGINE_TRUE=''VIDEO_CFLAGS=''VIDEO_DRIVERS=''VIDEO_SUBDIRS=''VR4181_IAL_ENGINE_FALSE=''VR4181_IAL_ENGINE_TRUE=''ac_ct_CC=''ac_ct_RANLIB=''ac_ct_STRIP=''am__include=''am__quote=''bindir='${exec_prefix}/bin'build='i386-pc-linux-gnu'build_alias='i386-linux'build_cpu='i386'build_os='linux-gnu'build_vendor='pc'datadir='${prefix}/share'exec_prefix='NONE'host='powerpc-unknown-linux-gnu'host_alias='ppc-linux'host_cpu='powerpc'host_os='linux-gnu'host_vendor='unknown'includedir='${prefix}/include'infodir='${prefix}/info'install_sh=''libdir='${exec_prefix}/lib'libexecdir='${exec_prefix}/libexec'localstatedir='${prefix}/var'mandir='${prefix}/man'oldincludedir='/usr/include'prefix='/LinuxPPC/CDK/bin'program_transform_name='s,x,x,'sbindir='${exec_prefix}/sbin'sharedstatedir='${prefix}/com'sysconfdir='${prefix}/etc'target='powerpc-unknown-linux-gnu'target_alias='ppc-linux'target_cpu='powerpc'target_os='linux-gnu'target_vendor='unknown'
## ----------- #### confdefs.h. #### ----------- ##
#define PACKAGE_BUGREPORT &&#define PACKAGE_NAME &&#define PACKAGE_STRING &&#define PACKAGE_TARNAME &&#define PACKAGE_VERSION &&
configure: exit 77
各位好:& &小弟刚刚接触minigui仅仅一两天时间,有许多地方实在不明白,希望各位大侠给个指点,问题如下: & &1:引用楼主大侠的原语:&假设你已经有一个可以在板子上跑的 Linux 系统了,并且已经有一个可以用的根文件系统了.&& & &请问minigui的库以及资源还有配置文件应该存放在这个根文件系统的什么位置呢?& 2: &mkdir &p /opt/rootfs/usr/local/[lib,etc] && & & 这一句实在不明白是什么意思啊.& 3:&同时修改 /opt/rootfs/etc/ld.so.conf ,在里面最后新加入一行 &/usr/local/lib && & &刚建立的目录怎么会有ld.so.conf这个文件呢?实在不明白啊.& 4:&mknod /dev/ttyp5 c 3 5mknod /dev/ptyp5 c 2 5
cd /usr/local/lib/shared/miniguiapps/mginit./mgini&& & 是加在linuxrc文件的后面吗?可是刚建立的/opt/rootfs不会有linuxrc文件啊,& 5:&如果运行时显示没有 mknod 命令,请检查一下你的 busybox 的配置 :) && &不知道如何检查啊.& 小弟愚昧,感觉问的问题应该挺幼稚的,但是我却不知道如何解决,还请各位大侠指教.& 谢谢!
再补上一个问题啊:& &&checking for jpeg_std_error in -ljpeg... yes & & & & & // jpeg 支持&& &这里不管怎么做,死活都是&no&,大侠们啊,赶紧现身指点一下小弟哦,头晕啊.
看看,看能不能按照这个方法,移植到ARM7板子上,uClinux系统下
写的太好了看来也是牛人一个啊我编译支持jpeg结果 libminigui库很大啊 ,有2m &,我的板子放库的ramdisk文件系统空间不够,我把库移到其他地方,然后ramdisk底下建一个指向我放库的地方,结果还是不行,如果在ld.so.conf下面在添加一个放库的目录不知道行不行,不过在开发板的文件系统下好象没有ld.so.conf这个?
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:22247次
排名:千里之外
原创:15篇
转载:17篇
(2)(1)(3)(7)(8)(9)(2)}

我要回帖

更多关于 捷安特骑行手套 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信