In recent years, embedded Linux systems have been widely used, and the development of corresponding graphical user interfaces has become increasingly important. MiniGUI is just one of the lightweight graphical user interface support systems. This paper analyzes the structure and characteristics of the graphical user interface MiniGUI under the embedded operating system, describes the porting method and process of MiniGUI under ARMLinux, and looks forward to the development of this MiniGUI-based embedded system. In recent years, with the extensive integration of embedded devices and market demand, the applications of mobile phones, PDAs and other products have put forward higher requirements for the simplicity and convenience of visual operation interfaces, which require a stable and reliable high-performance GUI system to provide support . The widespread popularity of Graphic User Interface (GUI) is one of the important achievements of today's computer technology. It greatly facilitates the use of non-professional users, and people can conveniently operate through windows and menus. The basic requirements of embedded systems for GUI include light weight, low resource consumption, high performance, high reliability, and configurability. MiniGUI is one of several commonly used GUI systems at present. Compared with other GUIs, MiniGUI’s most notable feature is its light weight and less resource usage. In the past few years, MiniGUI has been very mature and stable. It has been practically applied in many products and projects. 1.1 Features of MiniGUI MiniGUI is a lightweight graphics system developed by Wei Yongming, a former teacher of Tsinghua University. It is a graphical user interface support system for embedded or real-time systems. It follows the GPL convention and is a multi-window GUI support system based on SVGALib and LinuxThread libraries. It can span multiple operating systems, mainly running on Linux and all POSIX compatible systems with POSIX thread support, including ordinary embedded Linux, eCos, uC/OS-II, VxWorks and other systems. It is one of the earliest free software in China. The main features of MiniGUI are: (1) Pure free software that complies with GPL terms; (2) Provides a complete multi-window mechanism; (3) Multi-character set and multi-font support, currently supports ISO8859-1, GB2312, Big5 and other characters It also supports various raster fonts and vector fonts such as TrueType and Type1; (4) Quanpin and Wubi Chinese character input methods support; (5) BMP, GIF, JPEG and PCX and other common image files support; (6) Windows Support for resource files such as bitmaps, icons, cursors, caret, timers and accelerator keys, etc.; (7) Good portability. 1.2 The architecture of MiniGUI 1.2.1 Multi-threaded hierarchical design From the overall structure, MiniGUI is designed in layers, and the structure is shown in Figure 1. At the bottom layer, GAL (graphics abstraction layer), IAL (input abstraction layer), and mouse and keyboard drivers; the middle layer is the core layer of MiniGUI, including the essential modules of the window system; the top layer is the API, that is, the programming interface . GAL and IAL provide MiniGUI with the graphics interface and input interface on the underlying Linux console or XWindow, while Pthread is used to provide the C function library with kernel-level thread support. Utilizing GAL and IAL greatly improves the portability of MiniGUI, and makes program development and debugging easier. MiniGUI itself runs in multi-threaded mode, and many of its modules run in separate threads. At the same time, MiniGUI also uses threads to support multiple windows. Essentially, each thread has a message queue, which is a key data structure for thread data exchange and synchronization. One thread sends a message to the message queue, and another thread gets the message from this message queue. The windows created in the same thread can share the same message queue. One thread sends a message to the message queue, and another thread gets the message from this message queue. The windows created in the same thread can share the same message queue. Using the synchronization mechanism between the message queue and multithreading, the micro client/server mechanism described below can be realized. 1.2.2 Micro client/server structure In a multithreaded environment, similar to the communication mechanism between multiple processes, there are also interaction and synchronization requirements between threads. For example, the thread used to manage windows maintains a global window list, while other threads cannot directly modify these global data structures. Instead, they must process the requests of each thread in turn according to the "first come, first serve" principle. This is generality Client/server model. MiniGUI uses the synchronization operation between threads to realize the micro-client/server mechanism between the client thread and the server thread. 2Development environment The H2410EB development board is designed and developed by Beijing Hengyi High-Tech Co., Ltd. It is based on Samsung's S3C2410A20 embedded ARM processor. S3C2410A20 embeds ARM920T core, with full-performance MMU, has the advantages of high performance, low power consumption, low cost, small size, etc., suitable for handheld devices, automobiles and other fields. In addition to the large-capacity SDRAM and Flash, H2410EB also expands RS-232C serial interface, 10Mbps Ethernet interface, touch screen interface, audio input/output interface, USBHost, USBSlave, UART interface, IIC interface, user-defined keyboard , LCD display, convenient for users to use and reference design. It supports the operation of the embedded Linux operating system, supports MP3/MPEG playback, GUI, Web services and other services, and can develop specific software and device drivers according to user needs. The operating system adopts reduced Linux, the LinuxKernel version is v2.4.18, and the cross compiler used by the system is arm-Linux-gcc. In addition, there are code modules such as driver source code and test program source code. The host system used in this article is RedHatLinux9.0, the transplant target system is Linux2.4.18, and the MiniGUI version is 1.6.9. Cross compile the MiniGUI link library on the host, and then burn the library file compiled for the target machine to the RAM space of the target board together with the root file system, and then link the graphical user interface running on the target board to the library directly. Run independently from the host. 3.1 Construction of Linux cross-compilation environment GUI compilation is usually performed on a PC, that is, the compiler itself can be executed on a PC, and the binary file generated by compiling the source code must be executable on the target machine. This type of compiler is usually called a cross-compiler. . For the ARM platform, we installed cross-arm-binuTIls-2.10-1.i386.rpm, cross-arm-gcc-2.95.3-2.i386.rpm, cross-arm-glibc-2.1.3-2.i386 .rpm these three packages. These packages are all freely available online. The arm-binuTIls package generally contains some binary tools for the ARM platform, such as arm-strip, arm-ar and other commands; the arm-glibc package contains the ARM version of the standard C library and the corresponding header files; What arm-gcc contains is a cross-compiler on x86 that generates ARM platform code. Execute the rpm command to install these packages on the PC. If it is not in the system's default search directory, you must add the installation directory to the system's PATH environment variable, so that the system can find the compiler every time you compile. Log in to the Linux system as the root user, install the cross-compilation tool with the rpm command on the host, and arm-linux-gcc will be installed under /usr/local/arm/2.95.3/. At this time, gcc is /usr/local/arm/2.95.3/bin/arm-linux-gcc, and its include is /usr/local/arm/2.95.3/arm-linux/include, and the corresponding lib is /usr/local/arm/2.95.3-/arm-linux/lib. Then, add environment variables to your bashrc. Execute vi.bashrc, add the last line: exportPATH=$PATH:/usr/local/arm/2.95.3/bin path, save and exit and execute source.bashrc. In addition, it should be noted that the version of the function library used during compilation must be consistent with the version of the function library used when running on the target version. After the above steps, a cross-compilation environment has been established, and the next step is to configure MiniGUI options and cross-compile. 3.2 MiniGUI configuration and cross compilation We can get the resource file compression package of MiniGUI-1.6.9 for free from the Internet. The source package of MiniGUI1.6.9 includes the following three parts: libminigui-1.6.9.tar.gz-MiniGUI function library source code; miniguires-1.6. 9.tar.gz-Resources used by MiniGUI, including basic fonts, icons, bitmaps, input methods, etc.; mde-1.6.9.tar.gz-MiniGUI's comprehensive demo program. 3.2.1 Installation and compilation of MiniGUI function library Enter the directory libminigui-1.6.9 and run it again. /configure script: CC=arm-linux-gcc\. /configure--prefix=/mnt/nfs/local\--build=i386-linux\--host=arm-linux\--target=arm-linux\--disable-lite\--disable-micemoveable\- -disable-cursor\ Here, CC is used to specify the compiler used, and arm-linux-gcc is the cross-compilation tool installed on the host. In addition, ——prefix is ​​the installation target path of MiniGUI function library; ——build refers to the host that executes the compilation; ——host cross-compiled program will run on the system; ——target is the target file generated by running the compiler ——Disable-lite to establish the MiniGUI-Threads version of the application; ——disable-micemoveable to prohibit window movement; ——disable-cursor Since the system uses a touch screen, this option is used to turn off the display of the mouse cursor. If it runs. The /configure script is successfully passed, you can proceed with the following compilation, execute the make and makeinstall commands to compile and install libminigui. It should be noted here that you must switch to the root user authority when executing the makeinstall command, otherwise the files cannot be installed in the specified directory during installation. After the installation is successful, MiniGUI's function library, header files, configuration files and other resources will be installed in the /usr/local/arm/2.95.3/arm-linux/ directory. The specific situation is: the function library is installed in lib/ Directory; header files are installed in the include/ subdirectory; manuals are installed in the man/ subdirectory; configuration files are installed in the etc/ subdirectory. 3.2.2 Compilation and installation of MiniGUI resources Decompress the resource file on the host: tarzxfminiguires-1.6.9.tar.gz, which can generate a miniguires-1.6.9 directory. Before installation, you must modify the configure.linux file in the directory, execute viconfigure.linux to open the file, and change the default value of the prefix option part from /usr/local/ to /usr/local/arm/2.95.3/arm-linux/ , After running the makeinstall installation command, MiniGUI resources will be installed in the /usr/local/arm/2.95.3/arm-linux/lib/minigui-/res directory of the target system. 3.2.3 Compile and install the example program Unzip mde-1.6.9.tar.gz and enter the directory, modify the configuration file configure.in in the directory, and change the minigui/-commmon in AC_CHECK_HEADERS (minigui/commmon.h, have_libminigui=yes, foo=bar). h is changed to $prefix/include/minigui/common.h to specify the header file path to search for minigui during cross-compilation to prevent the system from not being able to find the header file during compilation; add -L{prefix}/ after all LIB="$LIB lib to specify the path of the library files needed for compilation. Put the header files and library files generated by libpopt-dev-arm-cross-1.6.tgz decompression into the include and lib of the target directory respectively to support mde Cross-compile the program under ARM. Then execute ./autogen.sh to regenerate the configure script, use the script configured above and execute the make command to complete the compilation of the example program. After compiling MiniGUI and the example program, you need to copy the MiniGUI library, resources and application program to the file system directory prepared for the target machine, then generate the file system image, and then download it to the target board to run. The file system image can be downloaded to the target machine through the serial port, USB port or Ethernet port. Before executing the program, there is another important thing to do, which is to configure the MiniGUI operating environment in the Linux on the development board. 5Environmental configuration of onboard Linux MiniGUI can use a variety of graphics engines for image display, such as qvfb, SVGALib, LibGGI, etc., of course, you can also write a graphics engine for MiniGUI to use. Here we use qvfb as the graphics engine of MiniGUI for image display. qvfb (vituralframebuffer) simulates the frame buffer on the host. It is a system program used by XWindow to run and test applications. It uses a shared storage area (virtual frame buffer) to simulate the frame buffer and simulates one in a window Application to display the frame buffer. First install qvfb, you can download it from the Internet, and then decompress it after downloading: tarzxfqvfb-1.0.tar.gz and enter the qvfb-1.0 directory and execute it. After the /configure script, you can use the make and makeinstall commands to compile and install. Change the MiniGUI configuration file MiniGUI.cfg to set the device driver, and set the display area and fonts. Modify the configuration file MiniGUI.cfg in the /usr/local/etc directory, set the driver engines gal_engine and ial_engine to qvfb, and then set the defaultmode of qvfb to the appropriate display mode. Then add qvfb to the executable path, execute the vi.bashrc command, add exportPATH=/usr/local/arm/2.95.3/bin-: $PATH at the end of .bashrc, use source.bashrc after saving and exiting Just execute the command. In XWindow, open a terminal emulation program and execute the qvfb& command. Select FileConfigure in qvfb and set qvfb to the size of the LCD screen of the embedded development system. After setting the MiniGUI configuration file reasonably, you can then run the MiniGUI application. If the application is executed smoothly, the running interface of the program can be seen on the screen. So far, MiniGUI has been successfully ported to the target system. After that, we can continue to modify the MiniGUI library functions and various resources as needed, and write our own applications to make the graphical user interface more complete. With the increasing application of embedded products, the development of excellent human-computer interaction interfaces is the trend of embedded development and has broad market prospects. MiniGUI can run stably and reliably under the Linux system. Through the above-mentioned specific transplantation and the subsequent development process of embedded software under MiniGUI, an embedded visualization software system can be quickly constructed. It is believed that this kind of embedded system will gain more and more Many applications. We have experience and skill to support customers to tooling for their required waterproof connectors, like IP68 series,micro fit connectors. Etop wire assemblies for various industries have been highly recognized by all the customers and widely used for automobiles, electrical and mechanical, medical industry and electrical equipemnts, etc. Products like, wire harness for car audio, power seat, rear-view mirror, POS ATM, Diesel valve Cover gasket fit, elevator, game machine, medical equipment, computer, etc. JST Connector,Molex Connector, Multi-Contact Connector, Micro Fit Connectors ETOP WIREHARNESS LIMITED , https://www.wireharness-assembling.com