当前位置:网站首页>Minigui3 runs on Hisilicon hi3520d/hi3531 platform
Minigui3 runs on Hisilicon hi3520d/hi3531 platform
2022-06-12 04:54:00 【hi_ LeTian】
Minigui3 In Haisi Hi3520D/Hi3531 Run on the platform
WORD Directly posted in , There are pictures , Can't see !!!! Download here PDF!
get Minigui3
from http://www.minigui.org/en/download/ Here to download The following three files :
libminigui-gpl-3.0.12.tar.gz MiniGUi3 The library of
minigui-res-be-3.0.12.tar.gz Minigui3 Resource files for
The first two files are required
mg-samples-3.0.12.tar.gz Minigui3 An example of
Extract it in one place , For example, my catalog is : /code/code_2016/mingui3
compile Minigui3
Minigui3 Very small , It's really small , and QT For enterprise applications , It's easy to compile , It'll be over in a few minutes , Think about compiling QT Hour two , Three hours is terrible , From time to time, I also report mistakes to you , It's really Mini, and UcGUI Just as small , The implementation principle is basically the same , But it is enough for most of us to do general applications , But on a particular platform , Use it well , Make beautiful and efficient UI, I really want to be in these small GUI Customize and modify a lot of things by yourself .
I basically compile by default MiniGui3 Of .
Compile the basic library
Unzip the file
tar –zxvf libminigui-gpl-3.0.12.tar.gz
cdlibminigui-gpl-3.0.12
Get into MiniGUI3 In the directory , There will be one build The catalog of , Compile scripts for many platforms already exist , There is no Hess , In fact, the matching is also very simple . Before transplantation, you should know Migui3 Of GAL and IAL, Basically, these two parts are what we do , Where it is , If you haven't used it , It is also difficult for us to modify it .
GAL yes UI Drawing interface ,IAL It is the interface of external equipment , Open a few files to learn , Basically, I understand , Just a few struct Interface , Different platforms are basically the same .
Because with Linux framebuffer Standard interface , Few changes have been made .
Write a configuration script file in the root directory , Such as , The following two configurations 3520d and 3531 It's basically the same :
#forhi3520D
CFLAGS="-I/home/jhting/minigui3/include-g -O0" ./configure \
--host=arm-hisiv100nptl-linux \
--prefix=/board/minigui3/hi3520d/\
--disable-screensaver\
--disable-splash\
--disable-jpgsupport \
--enable-videoqvfb=no\
--enable-rtosxvfb=no \
--enable-pcxvfb=no
#forhi3531
CFLAGS="-I/home/jhting/minigui3/include-g -O0" ./configure \
--host=arm-hisiv100nptl-linux \
--prefix=/board/minigui3/hi3531/\
--disable-screensaver\
--disable-splash\
--disable-jpgsupport \
--enable-videoqvfb=no\
--enable-rtosxvfb=no \
--enable-pcxvfb=no
Not used qvfb So turn them off ( An error containing the header file will also be reported when opening , But the corresponding changes Makefile Just fine ).
Execute the script above
Again :
make install
So after compiling , No report error , More fortunate .
Compile and install resource files
Resource files only need ./configure Connect it inside –prefix and –host Just install it , Basically :
./configure --host=arm-hisiv100nptl-linux --prefix=/board/minigui3/hi3531/
Compile the sample program
Example program I didn't compile all , I compiled whichever I used , Such as :
#for hi3520D
arm-hisiv100nptl-linux-gcc -o helloworldhelloworld.c -I/board/minigui3/hi3520d/include -L/board/minigui3/hi3520d/lib-L/code/code_2016/mingui3/hisi_hifb/board/hi3520d/lib -I/code/code_2016/mingui3/hisi_hifb/board/hi3520d/include-static -lminigui_ths -lhifb -lmpi -laec -lhdmi -lmem -ltde -ljpeg -lVoiceEngine-lresampler -lanr -lvqev2 -ljpeg6b -lpthread -lm -lpthread –ldl
#for hi3531
arm-hisiv100nptl-linux-gcc -o helloworldhelloworld.c -I/board/minigui3/hi3531/include/-L/board/minigui3/hi3531/lib-L/code/code_2016/mingui3/hisi_hifb/board/hi3531/lib-I/code/code_2016/mingui3/hisi_hifb/board/hi3531/include -static -lminigui_ths -lhifb -lmpi -laec -lhdmi -lmem -ltde -ljpeg -lVoiceEngine-lresampler -lanr -lpciv -lvqev2 -ljpeg6b -lpthread -lm -lpthread –ldl
There is one in the sample program libhifb.a The library of , This is for , Initialize the... Of the Hisilicon platform , There are instructions in the code modification
Code changes
Just press the above , Of course, nothing can come out , That is, when running the program , When compiling the sample program, we have a libhifb.a The library of , This is used to initialize the Hisilicon platform , To initialize Hisilicon MPI Systems and VO Output , Set some necessary parameters , In this part, I made a separate library for it , In this way MiniGUI Add some necessary calls libhifb.a This library , The modifications on different Hisilicon chip platforms are libhifb.a This library is finished , This won't put UI The code is too messy .
Initialize the code of Hisilicon
We use it Minigui3 Inside fbcon Interface to interface with Hisilicon fb Interface , to glance at minigui3 Inside fbcon Interface , Basic implementation sysvideo.h Inside GAL_VideoDevice The method of structure is OK ,fbcon Inside fbvideo.c It's all done , What we need to do is to connect with the Shanghai think platform hifb Just OK, Only a few lines have been changed .
The basic idea is to GAL_VideoDevice There are also initialization operations in , Put Hayes mpp,vo The initialization of is put here , There is one SetVideoMode Set the operation handle hifb Just put the parameters of .
For convenience , stay fbvideo.c To define a HISI_FB The macro , Use it to control the code modification relative to the Hisilicon platform .
So according to the basic needs , Define a header file hisi_hifb.h, Define the following methods :
int HIFB_VO_Start(void);
int HIFB_VO_Stop(void);
int HIFB_SetVideoMode(int fd, int width, int height, int bpp, intflags);
These methods are in libhifb.a A library implementation of .Minigui3 As long as fbvideo.c Just call it at the right place in the .
Write a libhifb.a The engineering of , Its directory is like this
Board The directory includes different platform header files and lib
There are codes of different platforms in the same level directory Such as src_hi3520d/src_hi3531/src_hi3536
However, Hisilicon has different platforms hifb and tde Basically consistent , It can also be written in the same code , There's no need to be so detailed .
There is a in the root directory Makefile.param The contents are as follows :
exportBOARD?=hi3531
exportINSTALL_PREFIX?=/board/minigui3/$(BOARD)
exportLIBTARGET?=libhifb.a
exportCROSS_COMPILE?= arm-hisiv100nptl-linux-
export CROSS?=arm-hisiv100nptl-linux-
exportCC:=$(CROSS)gcc
exportAR:=$(CROSS)ar
export CFLAGS +=-g -O0 -Wall -Werror
ifeq($(HIARCH),hi3531)
CFLAGS +=-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16
CXXFlAGS+=-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16
endif
exportPWD_PATH?=/code/code_2016/mingui3/hisi_hifb
exportMPP_LIB?=$(PWD_PATH)/board/$(BOARD)/lib
exportMPP_INCLUDE?=$(PWD_PATH)/board/$(BOARD)/include
CFLAGS +=-I$(MPP_INCLUDE)
If you compile , Modify the inside BOARD Parameters , Of course, it may be more convenient to pass it in as a parameter .
There is one in the catalog of different chips Makefile, It's all the same :
include../Makefile.param
SRC := $(wildcard *.c)
OBJ := $(SRC:%.c=%.o)
all:$(OBJ)
$(AR) rv $(LIBTARGET) $(OBJ)
cp $(LIBTARGET) $(INSTALL_PREFIX)/lib/
cp hisi_hifb.h$(INSTALL_PREFIX)/include/
%.o:%.c
$(CC) $(CFLAGS) -c $< -o [email protected]
.PHONY:clean
clean:
@rm -f $(OBJ)
In the code, I use , The operation is that I directly put Hess mpp Inside sample Copy the code , Such as src_hi3531 Files in :
Just change a little bit !
Connect the above things , Implemented a libhifb.a Library to initialize Hisilicon's stuff , stay Minigui3 Inside fbcon Inside fbvideo.c Call the appropriate place in the OK, Basically that's it , Make up again Minigui3 Library and helloworld Program , Just run .
Configure to run
The configuration will be modified a little , hold GAL Designated as fbcon, The resolution is changed ,IAL Just point to the corresponding mouse .
Some of the problems
1: In the process of doing the above , One of the problems is , Press the above thing , stay hi3515/hi3520D Up is running is OK 了 , Can output , But in hi3531,hi3536 Run up , Dead or alive, no output , After a day's work, there was no result , The final discovery is fbcon Some others in ioctl After the operation ,hi3531/hi3536 Of fb No way. , Closed some ioctl The operation is OK 了 .
2: The mouse has a shadow , This was used before ucgui Sometimes there are , It seems that it is better to use the mouse layer of Hisilicon to realize .
Basically, that's all , If you want to achieve good , Still have to use hifb Inside TDE These things , Otherwise, the picture will not work , The big screen must .
It's too late , If there is a hole in the document , Only dig but not fill , Identify yourself !!! For reference only !!!
边栏推荐
- asp. Net core theme Middleware
- Data processing and data set preparation
- [backtracking method] queen n problem
- InnoDB data storage structure – MySQL
- Layer sublayer assigns values to the page elements of the parent layer to achieve the effect of transferring values to the page of the parent layer
- leetcode 263. Ugly number
- Simple Tetris
- Some problems of silly girl solved
- JWT學習與使用
- 1009 word search
猜你喜欢

How to deploy dolphin scheduler Apache dolphin scheduler 1.2.0 in cdh5.16.2
![[efficient] the most powerful development tool, ctool, is a compilation tool](/img/23/a5eb401affd64119590db273d60c23.png)
[efficient] the most powerful development tool, ctool, is a compilation tool

1009 word search

Based on Visual Studio code Net Maui cross platform mobile application development

QT compiling security video monitoring system 44 video uploading

BI 如何让SaaS产品具有 “安全感”和“敏锐感”(上)

Gavin teacher's perception of transformer live class - rasa dialogue robot project practice in the field of education agency mode and core component source code analysis under the microservice of educ

Let me tell you the benefits of code refactoring

File contains (regardless of suffix) Apache log remote file contains PHP encapsulated pseudo protocol:

Simple Tetris
随机推荐
JS to determine whether the tags of multiple classes are empty
1007- stair climbing
Longest palindrome string
L1-066 cat is liquid (5 points)
National land use data of 30m precision secondary classification
Some problems of silly girl solved
[efficient] the most powerful development tool, ctool, is a compilation tool
1009 word search
Interview must ask: summary of ten classic sorting algorithms
Advanced MySQL knowledge points (7)
JS function and variable have the same name (function and variable parsing rules)
Radiometric calibration and atmospheric correction of sentry 2 L1C multispectral data using sen2cor
Spatial distribution data of China's tertiary watershed / national new area distribution data /npp net primary productivity data / spatial distribution data of vegetation cover / land use data /ndvi d
2022 "college entrance examination memory" has been packaged, please check!
JS controls the display and hiding of tags through class
Unable to resolve dependency tree
Force/release learning arrangement in IC Verification (5) research on the influence of reg type signals
[cjson] precautions for root node
ShanMeng and Beijing Adoption Day start NFT digital collection public offering
Jwt Learning and use