porting-minigui-to-mini2440
Then we can compile the library libminigui
./configure --host=arm-linux --enable-jpgsupport=yes --enable-pngsupport=yes –enable- gifsupport=yes --disable-lite --prefix=/usr/local/arm/2.95.3/arm-linux --enable-smdk2410ial=yes
make
make install
Then the following libraries and ressources must be ported as well:
ZLIB library
PNG library
jpeg library
libttf library
MINIGUI resource files
1) ZLIB
The ZLIB library is essential as it is the basement of porting other libraries. First download the ZLIB source code at http://www.zlib.net/zlib-1.2.3.tar.gz to /home/miniguilib and untar it. Then do the following to link the GCC:
# ln -s /usr/local/arm/2.95.3/bin/arm-linux-gcc ./gcc
# mv ld ld_back
# ln -s /usr/local/arm/2.95.3/bin/arm-linux-ld ./ld
Then, enter the ZLIB directory to configure the Makefile:
./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ --shared
Note: normally the --prefix configures the install directory or out put paths, therefore the library files will be installed to /usr/local/arm/2.95.3/arm-linux/[lib,include]
Then
make
make install
2) PNG library
Download the source code at http://superb-east.dl.sourceforge.net/sourceforge/libpng/libpng-1.0.10rc1.tar.gz to /home/miniguilib and untar it.
As the LIBPNG does not provide configure script, we have to modify the makefile by hand. Copy a similar makefile to the source code directory
cp scripts/makefile.linux Makefile
Then modify the make file:
CC=arm-linux-gcc
Prefix=/usr/local/arm/2.95.3/arm-linux
ZLIBLIB = /usr/local/arm/2.95.3/arm-linux/lib //specify the location of ZLIB
ZLIBINC = /usr/local/arm/2.95.3/arm-linux/include //specify the location of Include
save the makefile,
make
make install
We will see the library files in the specified directories.
3) JPEG library
Download the JPEG library at ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
Enter the JPEG directory and configure:
./configure --prefix=/usr/local/arm/2.95.3/arm-linux/ CC=arm-linux-gcc --enable-shared --enable-static
--prefix=the installation directory
CC=cross compiler
--enable-static -enable-shared=build static and shared library
Then make a directory:
mkdir –p /usr/local/arm/2.95.3/arm-linux/man/man1
then
make
make install
4) libttf
libttf is a support library for TrueType font, download it here: http://nchc.dl.sourceforge.net/sourceforge/freetype/freetype-1.3.1.tar.gz. With this library we have to compile and install it all by hand.
First make a directory for all the necessary source files:
mkdir –p /home/miniguilib/libttf/extend
copy the following files:
cp freetype-1.3.1/lib/* freetype-1.3.1/lib/arch/ansi/* libttf/
cp freetype-1.3.1/lib/extend/* libttf/extend/
cp freetype-1.3.1/lib/* freetype-1.3.1/lib/arch/ansi/* libttf/
cd libttf
Then compile:
arm-linux-gcc -c -fPIC -O2 freetype.c //Yes, this is only .c file we need to compile, as it contains all of the other .c files
arm-linux-gcc -c -fPIC -O2 -I./ extend/*.c //compile all the .c files in "extend"
arm-linux-gcc --shared -o libttf.so *.o //build the final static link library
cp libttf.so /usr/local/arm/2.95.3/arm-linux/lib
5) MINIGUI resource files
The resource files include some basic fonts, icons, bitmaps, cursors and so on. Untar the minigui-res-1.6.tar.gz, modify the file "configure.linux", specify the TOPDIR=/minigui/miniguitmp, then execute
make install
Make Filesystem
First please make sure that the support for FrameBuffer LCD driver is disabled in the kernel.
Then copy the following files:
Copy the library files in "/usr/local/arm/2.95.3/arm-linux/lib" to the "/usr/lib" in the rootfs, copy the directory "
/minigui/miniguitmp/usr/local/lib/minigui" to "root_minigui/usr/lib", then modify the file "/minigui/miniguitmp/etc/MiniGUI.cfg":
find
ial_engine=console
mdev=/dev/mouse
modify them to:
ial_engine=SMDK2410
mdev=/dev/ts
Then save and quit.
Copy the file "/minigui/miniguitmp/etc/MiniGUI.cfg" to the directory "/rootfs/usr/local/".
By now we have finished porting MINIGUI graphic interface. In case that the following error information shows upon running the MINIGUI:
GAL fbcon engine: Can't open /dev/tty0: No such file or directory
GAL: Init GAL engine failure: fbcon.
GDI: Can not initialize graphics engine!
we need to execute:
[root@Hiteg /]# mknod /dev/tty0 c 4 0