在海思hi3520上移植minigui3.0

首先從官網上下載以下幾個包: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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章