http://blog.csdn.net/nbda1121440/article/details/8532221
首先从官网上下载以下几个包:libminigui-gpl-3.0.12.tar.gz,minigui-res-be-3.0.12.tar.gz,mg-samples-3.0.12.tar.gz,zlib-1.2.2.tar.gz,libpng-1.2.37.tar.gz,libmgplus-1_2_4.tar.gz,freetype-2.3.9-fm20100818.tar.gz,jpegsrc.v7.tar.gz。
安装libz
./configure --prefix=/home/server/zjf/workspace/usr/
修改Makefile文件,将所有的gcc修改为arm-hismall-linux-gcc,替换命令:
:1,$s/gcc/arm-hismall-linux-gcc/g
make
make install
安装libpng
export CFLAGS=/home/server/zjf/workspace/usr/include/
export LDFLAGS=/home/server/zjf/workspace/usr/lib
./configure --prefix=/home/server/zjf/workspace/usr/ --host=arm-hismall-linux
make
make install
安装freetype
./configure --prefix=/home/server/zjf/workspace/usr/ --host=arm-hismall-linux
make
make install
安装jpeg
./configure --prefix=/home/server/zjf/workspace/usr/ --host=arm-hismall-linux
make
make install
安装libminigui-gpl
./configure --prefix=/home/server/zjf/workspace/usr/ --host=arm-hismall-linux
修改src/newgal/pcxvfb/Makefile.in,将第195行的-I/usr/include注释掉
make
make install
安装libmgplus
export PKG_CONFIG_PATH=/home/server/zjf/workspace/usr/lib/pkgconfig/
export CPPFLAGS=-I/home/server/zjf/workspace/usr/include
./configure --prefix=/home/server/zjf/workspace/usr/ --host=arm-hismall-linux
make
make install
安装minigui-res
./configure --prefix=/home/server/zjf/workspace/usr/ --host=arm-hismall-linux
make
make install
编译mg-sample
./configure --host=arm-hismall-linux
export cFLAGS=/home/server/zjf/workspace/usr/include/:/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/usr/include/
至此,该安装的东西都已经安装好了,但是运行mg-sample中的例子却无法成功运行,因为hi3520的fbcon与linux的fbcon不同,需要在minigui中修改
1、复制vo_open.c和vo_open.h至libminigui_ths/src/newgal/fbcon目录下
2、修改该目录下的Makefile.am,在最后加入vo_open.c和vo_open.h
3、把platform文件夹复制到/home/server/zjf/workspace/usr下
4、Makefile.in里,在FBCON_SRCS中加入vo_open.c和vo_open.h,在am__objects_1中加入vo_open.lo
5、打开fbvideo.c,在FB_VideoInit函数中加入
- if(HI_SUCCESS != MppSysInit())
- {
- return -1;
- }
- if(HI_SUCCESS != EnableVoDev(HD))
- {
- MppSysExit();
- return -1;
- }
在fbvideo.c开头添加头文件
- #include "hifb.h
- #include "vo_open.h
6、
export CFLAGS="-I/home/server/zjf/workspace/usr/include -I/home/server/zjf/workspace/usr/platform/include"
export LDFLAGS="-L/home/server/zjf/workspace/usr/lib -L/home/server/zjf/workspace/usr/platform/lib"
7、重新编译libminigui_ths
-
顶
- 0
-
踩
- 0