Detailed description about successfully porting MiniGUI to mini2440

Source: Internet
Author: User

Refer to network articles to port MiniGUI to 2440 Embedded Network blog

Author: Liu Qiqi location: digital computing department of Nanning Teachers College

MiniGUI 1.3.3 detailed transplantation, Author: Desert Lone Wolf

Note:

Because we want to use MiniGUI as a PDA, We need to port MiniGUI to my Development Board MiniGUI. The transplantation is successful. It supports PNG, JPG, mouse, and touch screen, but the touch screen is inaccurate and needs to be positive, the original version is intended to use tslib.1.3. After the transplantation is successful, MiniGUI needs to use it as ial and libminigui1.6.10/RES/ial/2410. C is modified and smdk2410 is used as its ial, but it is found that 2410.c, 1.3.33 is not released in 1.6.10.

Hardware environment:

 

 

Hardware environment:

HOST: x86pc

Target: friendly arm mini2440 Development Board

Software environment:

HOST: RedHat Linux 9.0 (fully installed) under vmwarevm)

Target: Arm-Linux kernel: linux-2.6.13

Crosstool: arm-linux-gcc-3.4.1

2. Prepare the following source code package (download)

Http://www.minigui.org/downloads

Development Library: libminigui-1.6.10.tar.gz

Resource file: minigui-res-1.6.10.tar.gz

Example: mg-samples-str-1.6.10.tar.gz

3. Compile and install

(1) Preparations

Create a working directory in RedHat Linux 9.0

[Root @ localhost/] # mkdir/MiniGUI working directory

[Root @ localhost/] # mkdir/MiniGUI/compressed/MiniGUI/source

[Root @ localhost/] # cd/MiniGUI/compressed enter the working directory

Note: Put the source code package downloaded in step 1 to this directory, that is,/MiniGUI/compressed.

(2)compile and install minigui-res-1.6.10.tar.gz

Description: resources used by MiniGUI, including basic fonts, icons, bitmaps, and mouse cursors.

[Root @ localhost compressed] # tar xzvf minigui-res-1.6.10.tar.gz-C ../source

[Root @ localhost compressed] # CD ../source/minigui-res-1.6.10

[Root @ localhost minigui-res-1.6.10] # make install

Put the generated ...... Copy all files under the/MiniGUI/RES directory to the Development Board. The directory on the Development Board is as follows:/usr/local/lib/MiniGUI/RES /......, In fact, this directory is consistent with the directory of the corresponding content in the configuration file MiniGUI. cfg to find the corresponding resources.

(3) Support for JPEG and PNG

First install the zlib library, which is the basis for compiling the subsequent libraries.

Http://www.zlib.net/zlib-1.2.3.tar.gz more than 400 K, download it, download to the directory/opt/mini2440

[User] # tar zxf zlib-1.2.3.tar.gz

Because the configure script of the zlib library does not support cross-compilation options, you have to use it on your own. manually modify GCC to point to our cross-compiler Arm-Linux-gcc

[Root] # cd/usr/bin

[Root] # mv GCC gcc_back

[Root] # ln-S/usr/local/ARM/3.4.1/bin/ARM-Linux-GCC./GCC

[Root] # mv LD ld_back

[Root] # ln-S/usr/local/ARM/3.4.1/bin/ARM-Linux-lD./LD

OK, return to the/opt/mini2410/zlib-1.2.3 directory after modification

[User] #./configure -- prefix =/usr/local/ARM/3.4.1/ARM-Linux/-- shared

Note: The configuration points to the/usr/local/ARM/3.4.1/ARM-Linux/directory, which will be automatically installed in/usr/local/ARM/3.4.1/ARM-Linux/[include, lib] Directory, do not install the wrong directory, otherwise the library will not be found later

[User] # Make

[Root] # make install

Check the directory/usr/local/ARM/3.4.1/ARM-Linux/[include, lib] After installation. If zlib is not found in include. header files such as H, without libz in Lib. so.1.2.3, copy them to these directories manually, and remember to copy all *. h must be copied. Use CP-A libz to copy the database. */.... /Lib. Use the-A option.

Remember to change the modified GCC back. Otherwise, an error will occur later !!!!!

Install the PNG Library. This is used to display PNG images. Many images in MiniGUI are PNG. Without this library, your MiniGUI will not work properly. Remember to remember!

Http://superb-east.dl.sourceforge.net/sourceforge/libpng/libpng-1.0.10rc1.tar.gz

In other words, do not use the latest database. The latest database may be faulty. If you use this old database, it will be okay.

[User] # tar zxf libpng-1.0.10rc1.tar.gz

[User] # cd libpng-1.0.10rc1

Libpng does not provide a valid configure script, so you have to change the MAKEFILE file by yourself.

[User] # cp scripts/makefile. Linux makefile // copy a makefile under scripts and change it by yourself

[User] # vi makefile // manually modify

Cc = arm-Linux-GCC // modify here

# Where "make install" puts LibPNG. A, LibPNG. So *, PNG. h and pngconf. h

Prefix =/usr/local/ARM/3.4.1/ARM-Linux // modify here

# Where the zlib library and include files are located

# Zliblib =/usr/local/lib

# Zlibinc =/usr/local/include

Zliblib =/usr/local/ARM/3.4.1/ARM-Linux/lib // modify here

Zlibinc =/usr/local/ARM/3.4.1/ARM-Linux/include // modify here

Okay, save it, and compile it.

[User] # Make

[User] # make install

If there is an error, check which of the above steps is not correct :), especially the installation of zlib

As mentioned above, check whether the/usr/local/ARM/3.4.1/ARM-Linux/[include, lib] directory has been successfully installed. If not, then copy the compiled items. Remember, copy the *. h and. So files.

OK. Install the JPEG library now.

Http://www.minigui.org/downloads to download it yourself

[User] # tar zxf restart src.v6b.tar.gz

[User] # cd jpeg-6b

[User] #./configure-help // you can view its configuration options

First, compile it on the local machine, mainly because the configure file is designed incorrectly. You must first compile a dummy with GCC. c file, and then compile it later. Otherwise, the libtool will not be able to find any errors.

[User] #./configure -- enable-shared -- enable-static

After the local machine passes normal compilation, [user] # Make clean is cleared, and then cross-compilation is executed.

Usually use [CDP @ cdpserver jpeg-6b] $. /configure -- prefix =/usr/local/ARM/3.4.1/ARM-Linux/-- Host = arm-Linux -- enable-shared -- enable-static

-- Host = arm-Linux to specify the cross-compilation option, but it does not recognize it here, so use another method, as shown below:

[User] #./configure -- prefix =/usr/local/ARM/3.4.1/ARM-Linux/CC = arm-Linux-GCC -- enable-shared -- enable-static

[User] # Make

Create a directory in arm-Linux before installation. Otherwise, an error occurs during installation.

[Root] # mkdir-P/usr/local/ARM/3.4.1/ARM-Linux/man/Man1

[Root] # make install // OK

Similarly, check whether the installation is successful :)

Next, you can compile libminigui.

(4)compile and install libminigui-1.6.10.tar.gz

Description: source code of the MiniGUI function library.

[Root @ localhost minigui-res-1.6.10] # cd/MiniGUI/compressed

[Root @ localhost compressed] # tar xzvf libminigui-1.6.10.tar.gz-C ../source

[Root @ localhost compressed] # CD ../source/libminigui-1.6.10

[Root @ localhost libminigui-1.6.10] #. /configure -- prefix =/home/-- Host = arm-Linux -- target = arm-Linux -- Build = i386-linux cc = arm-Linux-GCC -- With-osname = Linux --- style = classic -- With-targetname = fbcon -- enable-autoial -- enable-commial -- enable-rbf16 -- disable-vbfsupport

[Root @ localhost libminigui-1.6.10] # Make

[Root @ localhost libminigui-1.6.10] # make install

Copy all the library files under the/home/lib directory (Note: -- prefix =/home/) to the/lib directory on the Development Board, and set MiniGUI under/home/etc. copy CFG to the/etc directory on the Development Board.

Note: -- disable-vbfsupport must pay attention to this option. Otherwise, when running the sample program on the Development Board, the system prompts that VaR bitmap font cannot be found, in fact, there is no var bitmap font library in the/usr/local/lib/MiniGUI/RES/font directory on the development board. I have not studied how to support it. You can use./configure-h to view other options and control the corresponding functions based on your Development Board and project requirements.

(4) Compile mg-samples-str-1.6.10.tar.gz

Same principle:

Extract

[……] #./Configure-host = arm-Linux

[……] # Make

Copy the generated Executable File helloworld to the/usr/local/sbin directory on the Development Board.

(6) Configuration

First, create the lD. So. conf file in the/etc directory of the Development Board and add the following content:

/Usr/local/lib

/Usr/lib

/Lib # actually add the library file directory. The purpose is to find the corresponding library file when running helloworld. The other two library directories are optional. I added it, it is for system expansion.

Second: Modify the/etc/MiniGUI. cfg file on the Development Board.

Open it in the editor and change the following content:

[System]

# Gal engine and default options

Gal_engine = fbcon

# Ial Engine

Ial_engine = cosole

Mdev =/dev/input/Mice

Mtype = imsp2

[Fbcon]

Defaultmode = 240x320-16bpp # My LCD display is a portrait screen of X pixels.

If it is inconsistent with the above content, compare it with your own Development Board and modify it.

Third:

Add the following content to the/etc/init. d/RCS script file:

/Bin/ln-S/dev/VC/0/dev/tty0

If this parameter is not added, the following error occurs: newgal> fbcon: Can ''' t open/dev/tty0: no such file or directory

Newgal: Set video mode failure.

Initgui: Can not initialize graphics engine!

Note: Associate fbcon with your frambuffer device.

4. Test

Run the following command to cross-compile your own PDA on the Super Terminal:

[……] #/Usr/local/sbin/PDA

Or

Add the following content to the/etc/init. d/RCS script file:

/Usr/local/sbin/PDA &

Haha, the MiniGUI is running, and I feel quite comfortable. Even if the migration is successful, but there is no use value, you need to continue to add some features of the MiniGUI, and you need to write the corresponding application and the corresponding driver of the Linux kernel. Although it is open-source, it provides limited functions, but it can be used as learning.

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/huangsihua/archive/2009/03/08/3969802.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.