[琪琪雜貨舖]

2016年2月14日 星期日

【CHICHI ETUTOR@ARM/MIPS/PPC】MINIGUI 





Introduction

MiniGUI is a GUI system with support for real-time and embedded operating systems,
and aims to be fast, stable, light-weight and cross-platform.
It was first released under the GNU GPL in 1999, and
has since offered a commercial version with more features,
including support for operating systems other than Linux and eCos.
MiniGUI has been widely used in handheld terminals, portable media players, and industry instruments.




1. download relevant files

you can download from day7

libminigui-1.6.10.tar.gz  , the minugui library

mg-samples-1.6.10.tar.gz , the demo examples

minigui-res-1.6.10.tar.gz , the resource need by minigui like images, cursor, .....


2. create folder named "minigui" and copy all compressed file to it


~/minigui# ls
libminigui-1.6.10.tar.gz  mg-samples-1.6.10.tar.gz  minigui-res-1.6.10.tar.gz


3. create folder named "miniguitmp" for future files storage

~/minigui# mkdir miniguitmp

~/minigui# ls
  libminigui-1.6.10.tar.gz  mg-samples-1.6.10.tar.gz  minigui-res-1.6.10.tar.gz  miniguitmp


4. decompress all files in folder "minigui"

~/minigui# tar zxvf libminigui-1.6.10.tar.gz

~/minigui# tar zxvf mg-samples-1.6.10.tar.gz

~/minigui# tar zxvf minigui-res-1.6.10.tar.gz

~/minigui# ls
        libminigui-1.6.10  libminigui-1.6.10.tar.gz  mg-samples-1.6.10  mg-samples-1.6.10.tar.gz  minigui-res-1.6.10  minigui-res-1.6.10.tar.gz  miniguitmp





5. ./configure ,make and make install "minigui" library


~/minigui/libminigui-1.6.10# ./configure --build=arm --host=arm-linux --target=arm-linux --prefix=/root/minigui/miniguitmp

~/minigui/libminigui-1.6.10# make -j4

~/minigui/libminigui-1.6.10# make install

*chekc the files in miniguitmp

~/minigui/miniguitmp# ls
etc  include  lib




6. install "minigui resource"

~/minigui# cd minigui-res-1.6.10

~/minigui/minigui-res-1.6.10# vim config.linux

*find the TOPDIR= and modify as below (to store the res files to miniguitmp)
=========================================
# NOTE: This directory must exist when you start the install.
# NOTE: Don't modify TOPDIR.
TOPDIR= /root/minigui/miniguitmp
=========================================

~/minigui/minigui-res-1.6.10#make install

*check if there is "usr" folder generated here

~/minigui/miniguitmp# ls
                etc  include  lib usr




7. change the /miniguitmp/etc MiniGUI.cfg and then copy to ~/root_mkfs/etc

[system]
# GAL engine and default options
gal_engine=fbcon
defaultmode=800x480-16bpp

# IAL engine
ial_engine=console
mdev=/dev/input/mice
mtype=IMPS2

[fbcon]
defaultmode=800x480-16bpp

[qvfb]
defaultmode=640x480-16bpp
display=0


~/minigui/miniguitmp/etc# cp MiniGUI.cfg ~/root_mkfs/etc



8.copy the library/header files to ~/root_mkfs/lib and toolchain
       
~/minigui/miniguitmp/lib# cp -rf * ~/root_mkfs/lib

~/minigui/miniguitmp/lib# cp -rf * /usr/local/arm/arm-2009q3/arm-none-linux-gnueabi/libc/usr/lib

~/minigui/miniguitmp/include# cp -rf * /usr/local/arm/arm-2009q3/arm-none-linux-gnueabi/libc/usr/include


9 To Generate MINIGUI demo examples

~/minigui# cd mg-samples-1.6.10


~/minigui/mg-samples-1.6.10# ./configure --build=arm --host=arm-linux --target=arm-linux --prefix=/root/minigui/miniguitmp



~/minigui/mg-samples-1.6.10/src# vim Makefile


change

CC = arm-linux-gcc

to
CC = arm-linux-gcc -I/root/minigui/miniguitmp/include -L/root/minigui/miniguitmp/lib
================================

change
CFLAGS = -O2 -Wall -Wstrict-prototypes -pipe -D_REENTRANT

to

CFLAGS = -O2
================================

change

LIBOBJS =

to
LIBOBJS = -lminigui -lmgext -lm -lpthread -ljpeg
================================

change
LIBS = -lpthread -lminigui -lm

to

LIBS = -lminigui -lmgext -lm -lpthread -ljpeg
================================

change
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

to

COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -lminigui -lmgext -lm -lpthread -ljpeg
================================




~/minigui/mg-samples-1.6.10/src# make clean

~/minigui/mg-samples-1.6.10/src# make -j4

*then , there are demo example files like "helloworld" shown in the foldes

~/minigui/mg-samples-1.6.10/src# cp helloworld ~/root_mkfs

[Qt210 side]

*boot to console then execute "helloworld"

[root@QT210 /]# ./helloworld
[ 1682.370000] wm97xx-ts 0-0:WM9713: No IRQ specified

*then , there should be windows-like helloworld message shonw on the screen


*you might meet problem like these. plesae make sure the file "MiniGUI.cfg" is configured correctly
=======================================================
[root@QT210 /]# ./helloworld
NEWGAL: Video mode smaller than requested.
NEWGAL: Set video mode failure.
InitGUI: Can not initialize graphics engine!
========================================================
=======================================================
[root@QT210 /]# ./helloworld
QVFB IAL engine: can not open mouse pipe.
IAL: Init IAL engine failure.
InitGUI: Low level event initialization failure!
InitGUI failure when using /etc/MiniGUI.cfg as cfg file.
======================================================

0 意見:

張貼留言

[琪琪雜貨舖]