Install MiniGUI 1.3.3 In Debian

Source: Internet
Author: User

1. Download an object
Libminigui-1.3.3.tar.gz
Mg-samples-1.3.0.tar.gz (example)
Minigui-res-1.3.3.tar.gz (resources)
Qvfb-1.1.tar.gz (Virtual Frame Buffer)

Ii. Compile source code

[Note]: 1. Since the instance program is installed,/usr/local/lib/libminigui. So: Undefined reference to 'pthread _ kill_other_threads_np 'will appear'
We recommend that you first comment out./libminigui-1.3.3/src/kernel/init. C: 435: pthread_kill_other_threads_np.

2. Make menuconfig under the libminigui-1.3.3 directory, requires ncurses library support (APT-Get install libncurses5-dev ).

 2.1. Compile libminigui

Libminigui-1.3.3 # Make menuconfig

If you are not clear about the configuration options, you can refer to Section B in "Linux/uClinux + MiniGUI: Embedded system development principles, tools and processes. Keep the default configuration here, exit the configuration page, and save the settings.

If the following error occurs, run./configure and run make saving your MiniGUI configuration... scripts/mkconfig: 33: syntax error: "(" unexpected

Then execute make to compile:

Save the configuration parameters after selecting the required parameters.
Execute make to compile.

Problems encountered during compilation:
2.1.1. varbitmap. C: 248: Error: static declaration of 'var _ bitmap_font_ops 'follows non-static Declaration
Varbitmap. h: 38: Error: previous declaration of 'var _ bitmap_font_ops 'was here
Make [4]: *** [varbitmap. Lo] Error 1
Make [4]: Leaving directory '~ /Download/MiniGUI/minigui1.3.x/soures/libminigui-1.3.3/src/font'
Make [3]: *** [All-recursive] Error 1
Make [3]: Leaving directory '~ /Download/MiniGUI/minigui1.3.x/soures/libminigui-1.3.3/src/font'
Make [2]: *** [All-recursive] Error 1
Make [2]: Leaving directory '~ /Download/MiniGUI/minigui1.3.x/soures/libminigui-1.3.3/src'
Make [1]: *** [All-recursive] Error 1
Make [1]: Leaving directory '~ /Download/MiniGUI/minigui1.3.x/soures/libminigui-1.3.3'
Make: *** [all] Error 2

Solution (3 ):
1) run make menuconfig again and remove the "Var bitmap font" option in "font options:
│ [*] Raw bitmap font │
│ [] Var bitmap font │
│ [*] INCORE font sansserif │
│ [*] INCORE font courier │
│ [*] INCORE font symbol │
│ [*] INCORE font vgas │
│ [*] QT prerendered font │
│ [*] TrueType font │
│ [*] Adobe type1 font │

2) modify the src/font/varbitmap. c file and change static to extern.
249 extern fontops var_bitmap_font_ops = {// change static to extern

3) install freetype-1.3.1

2.1.2. In file included from defkeymap. C: 15:
Keyboard. h: 43: Error: Expected ') 'before' *' token
Keyboard. h: 49: Error: Expected specifier-qualifier-list before 'init _ kbd_layout'
Keyboard. h: 52: Error: Expected ') 'before' * 'token
Defkeymap. C: 17: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' plain _ map'
Defkeymap. C: 36: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' shift _ map'
Defkeymap. C: 55: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' altgr _ map'
Defkeymap. C: 74: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' CTRL _ map'
Defkeymap. C: 93: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' shift _ ctrl_map'
Defkeymap. C: 112: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' alt _ map'
Defkeymap. C: 131: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' CTRL _ alt_map'
Defkeymap. C: 150: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' * 'token
Defkeymap. C: 267: Error: Expected ') 'before' *' token

Cause and modification method:
The reason is that ushort and u_short are not defined in the Code. Add the definition in keyboard. h:
Typedef unsigned short u_short;
Modify the following two source files and change ushort to u_short.
Src/GUI/keyboard. h
Src/GUI/defkeymap. c

2.1.3. gcc-dhave_config_h-I. -I. -I .. /.. /.. -I .. /.. /.. /include-I .. /.. /include-I .. /-g-O2-d1_minigui_lib _-wall-wstrict-prototypes-pipe-MT fbvideo. lo-MD-MP-MF. deps/fbvideo. TPO-C fbvideo. c-FPIC-dpic-o. libs/fbvideo. lo
Fbvideo. C: 19: 63: Error: ASM/page. h: no such file or directory
Fbvideo. C: In function 'fb _ videoinit ':
Fbvideo. C: 368: Error: 'page _ size' undeclared (first use in this function)
Fbvideo. C: 368: Error: (each undeclared identifier is reported only once
Fbvideo. C: 368: Error: for each function it appears in .)
Make [4]: *** [fbvideo. Lo] Error 1
Make [4]: Leaving directory '/home/epic/arm2440/MiniGUI/2.0.x/libminigui-2.0.3-linux/src/newgal/fbcon'
Make [3]: *** [All-recursive] Error 1
Make [3]: Leaving directory '/home/epic/arm2440/MiniGUI/2.0.x/libminigui-2.0.3-linux/src/newgal'
Make [2]: *** [All-recursive] Error 1
Make [2]: Leaving directory '/home/epic/arm2440/MiniGUI/2.0.x/libminigui-2.0.3-linux/src'
Make [1]: *** [All-recursive] Error 1
Make [1]: Leaving directory '/home/epic/arm2440/MiniGUI/2.0.x/libminigui-2.0.3-linux'
Make: *** [all] Error 2

Cause and modification method:
A slightly higher version does not exist in Linux systems <ASM/page. h>
Fortunately, MiniGUI only uses a macro definition in the file -- page_size
You only need to comment out # include and # define one as follows:
// # Include <ASM/page. h>/* for definition of page_size */
# Define page_size 4096

2.1.4.grid.c: In function 'addcol ':
Grid. C: 626: Error: lvalue required as left operand of assignment
Grid. C: 627: Error: lvalue required as left operand of assignment
Grid. C: 638: Error: lvalue required as left operand of assignment
Grid. C: 639: Error: lvalue required as left operand of assignment
Grid. C: 667: Error: lvalue required as left operand of assignment
Grid. C: 668: Error: lvalue required as left operand of assignment
Grid. C: 680: Error: lvalue required as left operand of assignment
Grid. C: 681: Error: lvalue required as left operand of assignment
Grid. C: In function 'addrow ':
Grid. C: 733: Error: lvalue required as left operand of assignment
Grid. C: 734: Error: lvalue required as left operand of assignment
Grid. C: 745: Error: lvalue required as left operand of assignment
Grid. C: 746: Error: lvalue required as left operand of assignment
Grid. C: 774: Error: lvalue required as left operand of assignment
Grid. C: 775: Error: lvalue required as left operand of assignment
Grid. C: 788: Error: lvalue required as left operand of assignment
Grid. C: 789: Error: lvalue required as left operand of assignment
Make [3]: *** [grid. Lo] Error 1
Make [3]: Leaving directory '/home/Jack/download/MiniGUI/minigui1.3.x/soures/libminigui-1.3.3/EXT/control'
Make [2]: *** [All-recursive] Error 1
Make [2]: Leaving directory '/home/Jack/download/MiniGUI/minigui1.3.x/soures/libminigui-1.3.3/EXT'
Make [1]: *** [All-recursive] Error 1
Make [1]: Leaving directory '/home/Jack/download/MiniGUI/minigui1.3.x/soures/ures'
Make: *** [all] Error 2

Cause and modification method:
Error: lvalue required as left operand of assignment
Cause of error: the compiler version is different. Currently, GCC explicitly requires that the operation order be specified.
Http://oss.lzu.edu.cn/modules/lifetype/index.php? OP = viewarticle & ArticleID = 131 & blogid = 6
However, the reason for forced type conversion is that the pgridcolhdr definition does not contain the prowhdr and pcolhdr definitions. On the contrary, prowhdr and pcolhdr are defined in pcelll.
It makes no sense to do this. You can directly Delete "(pgridcolhdr.
// (Pgridcolhdr) pcell1-> prowhdr = prowhdr;
Pcell1-> prowhdr = prowhdr;

Of course, you must make a forced type conversion and change it
626 (pgridcolhdr) pcell1)-> pheadcell-> prowhdr = prowhdr;

[Description]
After successful compilation, run make install to install the libminigui library. By default, the library will be installed in the/usr/local/directory, you can modify path prefix in make menuconfig to specify the installation directory. If other directories are used, note that the related directories must be added to the Environment PATH variable. Otherwise, errors such as file inclusion cannot be found during MiniGUI application compilation.
Then run ldconfig to load the new Linked Library, otherwise an error message similar to not finding the libminigui-1.3.so.3 will appear

2.2 install the MiniGUI resource package:
Run sudo make install in the source code directory.
~ /Download/MiniGUI/minigui1.3.x/soures/minigui-res-1.3.3 $ make install

2.3 install qvfb:
2.3.1 when configure is enabled, the system prompts that the QT header file is missing.
~ /Download/MiniGUI/minigui1.3.x/soures/qvfb-1.1 $./configure
Checking for Qt... configure: Error: QT (> = QT 3.0.3) (headers and libraries) Not found. Please check your installation!
For more details about this problem, look at the end of config. log.

The reason is that the header file of QT is missing and the QT Development Kit needs to be installed. If it still cannot be found after installation, you can directly specify the path during compilation.
./Configure -- With-QT-Dir =/usr/lib/qt3 -- With-QT-includes =/usr/include/qt3
The qt-3 is the version number of the current QT.

In Debian, you can also use auto-apt to compile:
Install auto-apt: $ sudo apt-Get install auto-Apt
$ Auto-apt run./configure

2.3.2 make & sudo make install

2.4 install the sample program:
2.4.1 ~ /Download/MiniGUI/minigui1.3.x/soures/mg-samples-1.3.1 $./configure
2.4.2 ~ /Download/MiniGUI/minigui1.3.x/soures/mg-samples-1.3.1 $ make
An error occurred while compiling. The following message is displayed:
Make [1]: Entering directory '/home/Jack/download/MiniGUI/minigui1.3.x/soures/mg-samples-1.3.1/src'
Source = 'helloworld. c' object = 'helloworld. o' libtool = No/
Depfile = '. deps/helloworld. po' tmpdepfile ='. deps/helloworld. tpo '/
Depmode = gcc3/bin/sh ../depcomp/
Gcc-dpackage_name =/"/"-dpackage_tarname =/"/"-dpackage_version =/"/"-dpackage_string =/"/"-dpackage_bugreport =/"/"-dpackage =/ "Mg-samples/"-dversion =/"1.3.1/"-dstdc_headers = 1-dhave_sys_wait_h = 1-dtime_with_sys_time = 1-dhave_sys_types_h = 1
-Rows = 1-rows = 1-dhave_string_h = 1-dhave_memory_h = 1-dhave_strings_h = 1-rows = 1-rows = 1-dhave_unistd_h = 1-rows = 1-dhave_unistd_h = -dhave_minigui_common_h = 1-dhave_decl1_lite_version = 0-dhave_decl1_stand_alone = 0
-Dhave_decl1_use_newgal = 1-I. -I. -G-O2-wall-wstrict-prototypes-pipe-d_reentrant-C 'test-F' helloworld. c' | echo '. /''helloworld. c
Gcc-g-O2-wall-wstrict-prototypes-pipe-d_reentrant-O helloworld. O-lminigui-lm-lpthread-lC
/Usr/local/lib/libminigui. So: Undefined reference to 'pthread _ kill_other_threads_np'
Collect2: LD returned 1 exit status
Make [1]: *** [helloworld] Error 1
Make [1]: Leaving directory '/home/Jack/download/MiniGUI/minigui1.3.x/soures/mg-samples-1.3.1/src'
Make: *** [All-recursive] Error 1

Cause: Delete the 'pthread _ kill_other_threads_np 'function called in the MiniGUI source code.
. In the src/kernel/init. c file, run grep to find this function.
~ /Download/MiniGUI/minigui1.3.x/soures $ grep-r-N 'pthread _ kill_other_threads_np '.
./Libminigui-1.3.3/src/kernel/init. C: 435: pthread_kill_other_threads_np ();

2.4.3 sudo make install

2.5 install integrated example mde-1.3.0

./Configure & make install

--- Installation is now complete ---

3. Configure qvfb and run the sample program
3.1 Edit/usr/local/etc/MiniGUI. cfg and change the gal and ial engines to qvfb:
25 [system]
26 # gal Engine
27 gal_engine = qvfb
28
29 # ial Engine
30 ial_engine = qvfb
31
32 mdev =/dev/mouse
33 mtype = imps2
34
35 [fbcon]
36 defaultmode = 1024x768-16bpp
37
38 [qvfb]
39 defaultmode = 640x480-16bpp
40 display = 0
41

3.2 run "qvfb &" to start the virtual Frame Buffer in the subsequent running mode:
Linux:/home/work/MiniGUI/mg-samples-1.3.1 # qvfb &
3.3 choose File> Configure from the menu, and change the display mode to be consistent with MiniGUI. cfg, that is, "640x480-16bpp ".

Otherwise, the following prompt appears when running the comprehensive example of Tetris:
./Russia
No available video device.
Newgal: does not find matched engine: qvfb.
GDI: can not get graphics engine information!
Initgui failure when using/usr/local/etc/MiniGUI. cfg as cfg file.

 


3.4 then you can run the sample program:
~ /Download/MiniGUI/minigui1.3.x/soures/mg-samples-1.3.1/src $./worldtime

 

3.5 complex example of Tetris: mde-1.3.0/Russia $./Russia

 

 

Iv. References
Http://blog.csdn.net/binghuiliang/archive/2007/09/28/1805026.aspx
Http://hi.baidu.com/aokikyon/blog/item/558a4a3e7f9a173b71cf6c53.html
Http://oss.lzu.edu.cn/modules/lifetype/index.php? OP = viewarticle & ArticleID = 131 & blogid = 6

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.