First, MiniGUI cross-compilation
1. Compile command
Before compiling, you need to prepare the kernel, put the source code of the kernel to the / OPT / UCLINUX / UCLINUX-DIST directory.
Enter the libminigui directory
[...] # cc = ARM-ELF-GCC Ar = ARM-ELF-AR RANLIB = ARM-ELF-RANLIB LDFLAGS = "- WL, -elf2flt" ./configure /
--prefix = "/ opt / usr / local" /
--Host = ARM-ELF-Linux /
--BUILD = i386-Linux /
--Disable-shared /
--enable-lite = yes /
--enable-video-fbcon = yes /
--enable-nativegal = yes /
--enable-nativeial = yes /
--enable-newgal = no /
--enable-timerunitms = no /
--enable-nativegalqvfb = no /
--enable-fblin8 = no /
--enable-fblin16 = no /
--enable-fblin24 = no /
--enable-fblin32 = yes /
--enable-dummyial = yes /
--enable-qvfbial = no /
--enable-nativeps2 = no /
--enable-nativeIMPS2 = NO /
--enable-nativems = no /
--enable-nativems3 = no /
--enable-nativeGPM = NO /
--enable-textmode = no /
--enable-rbfsupport = yes /
--enable-rBFGB12 = NO /
--enable-vbfsupport = no /
--enable-fontsserif = no /
--enable-fontcourier = no /
--enable-fontsymbol = NO /
--enable-fontvgas = no /
--enable-qpfsupport = no /
--enable-ttfsupport = no /
--enable-type1support = no /
--Disable-ttfsupport /
--enable-latin2support = NO /
--enable-latin3support = NO /
--enable-latin4support = NO /
--enable-latin9support = yes /
--enable-gbsupport = yes /
--enable-gbksupport = no /
--enable-big5support = no /
--enable-unicodesupport = no /
--enable-savebitmap = yes /
--enable-gifsupport = yes /
--enable-jpgsupport = no /
--enable-pngsupport = NO /
--Nable-Imegb2312 = NO /
--enable-Imegb2312py = NO /
--Nable-AboutDLG = YES /
--enable-Savescreen = NO /
--enable-tinyScreen = no /
--enable-extfullgif = no / - enable-video-dummy = no /
--enable-extskin = no
[...] #make
[...] #make install
Last libminigui is installed in / OPT / USR / local / directory
Yes or NOs configured above make the optimal settings according to actual needs.
2. Resource installation
Enter miniGui-rescription
Edit the config.linux file probably in 11 lines, change topdir = to topdir = / OPT
[...] #make install
The final resource is also installed in the / OPT / USR / local / directory
3. Input engine
Engine entry code:
There are array static input inputs [] in SRC / IAl.c, which is initially stored, so the entry of the input engine name and its initialization function and exit function, both functions are initnativeInput and TermnativeInput.
Other functions: (mainly introducing keyboard related functions)
WAIT_EVENT MiniGUI system uses a Timed query to get the input of the input device. Wait_Event is a function running function, returns the event type, mainly checking whether the input handle has new data input.
After the keyboard_update event is determined, if there is a keyboard input, then the function is called, the main function is to determine that the button has input. Array ATIC UNSIGNED CHAR State [NR_KEYS] stores 128 characters, which character is entered, and the state of this character is set.
KeyBoard_getState directly returns a status array
Keyboard_suspend
Keyboard_Resume
Transplantation content, mainly in the key code table transformation
Concrete porting code: A relatively universal input engine is used in MiniGUI, and the output of the button is implemented in the keys of the keys to adapt to the universal drive of the MINIGUI.
4. Output engine (New)
Specifically, how the FrameBuffer driver is implemented, how is the data format in FrameBuffer.
True color 32bit
MiniGUI's pixel output format 0x00rrggbb
Input requirements based on video chips: 0xAarRGGBB
Question: For the format high byte in MiniGUI, it is always 0x00, which is not processed.
However, the high-byte of the video chip is defined, and if it is 0x00, it is entirely transparent, so the minigui program without modification is not displayed.
Solve: You need to modify the high position to 0xFF in the final output section of MiniGUI.
Specific code:
Second, MINIGUI's document deployment
1. Development of environmental documents
There is the above installation command to see all the files in the system are in / opt / usr / local
/ OPT / USR / LOCAL /
-> ETC
-> (miniGui.cfg)
-> Include
-> minigui
-> (*. H)
-> LIB
-> (*. A)
-> minigui
-> Res
-> BMP
-> (System bitmap file)
-> Cursor
-> (System cursor file)
-> font
-> (System font file)
-> icon
-> (System icon file)
-> iMetab
-> (input method) 2. Deployment of Fuser in ROMFS
/ OPT / USR / LOCAL /
-> bin
-> (Application)
-> LIB
-> minigui
-> Res
-> BMP
-> (System bitmap file)
-> Cursor
-> (System cursor file)
-> font
-> (System font file)
-> icon
-> (System icon file)
-> iMetab
-> (Input method file)
3.
Third, MiniGUI configuration file (/usr/local/etc/minigui.cfg)
1. Input output engine
IAL = console
If UCLinux input driver can be configured as TTY-based
The source code of the engine is mainly in the native.c and native.h files in the directory / src / cent / native.
GAL = fbcon
FrameBuffer-based output engine can be configured
2. Fontline configuration
Mingui supports five fonts: equality font (Rawbitmap), widening font (varbitmap), QPF, TTF, TYPE1. Therefore, five configuration segments are configured in the configuration file to configure five fonts.
3.
Fourth, miniGUI's crop
1. Appropriately close some unwanted features when compiling
2. Resource cutting
Mainly the system useless font base, unused icon, picture, and cursor deletion.
3.
V. Compilation of the application (New)
1. Compile cross-compilation of the MDE example
Make CC = ARM-ELF-GCC LDFLAGS = "- Elf2flt -L / OPT / USR / local / lib" /
Cflags = "- I / OPT / USR / local / include"
2.
3. Application before running
Setting content: Mainly the setting of the stack size.
Setting Cause: If the stack is too small, the program's function call is very complicated, it is easy to appear stack overflow, resulting in an error.
Setting method: Using ARM-ELF-FLTHDR -S 16384 Pro_Name
16384 is the size of the stack 16 × 1024 = 16K
Use ARM-ELF-FLTHDR -P Pro_Name to view related information
4.
six,