当前位置:网站首页>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 !!!
边栏推荐
- QT compile 45 graphic report of security video monitoring system
- JS function and variable have the same name (function and variable parsing rules)
- 1006 next spread
- February 19, 2022 [Nolan] Nolan resurrected? Change · Nolan [soul orchid] can be connected to XDD / silly girl
- QT compiling security video monitoring system 44 video uploading
- LabVIEW about TDMS and binary storage speeds
- L1-068 harmonic average (10 points)
- EnterpriseTECH STAR Question
- Differences between in and not in, exists and not exists in SQL and performance analysis
- Question for the 3D printing lattice?
猜你喜欢

How Windows installs multiple versions of MySQL and starts it at the same time

Some problems of silly girl solved

CCF access control system

Simple Tetris

kali_ Change_ Domestic source

@What happens if bean and @component are used on the same class?

Chrome is amazingly fast, fixing 40 vulnerabilities in less than 30 days

kali_ Nat mode, bridging Internet / host only_ detailed

When the build When gradle does not load the dependencies, and you need to add a download path in libraries, the path in gradle is not a direct downloadable path

JWT學習與使用
随机推荐
JS disable mobile sharing
加速訓練之並行化 tf.data.Dataset 生成器
Some problems of silly girl solved
LabVIEW about TDMS and binary storage speeds
2022-02-28 WPF upper computer 126 understand mqtt
PostgreSQL age XID maintenance prevents the database from being read-only
[SC] OpenService FAILED 5: Access is denied.
Find missing sequence numbers - SQL query to find missing sequence numbers
[backtracking] backtracking to solve subset problems
Data processing and data set preparation
Sentinel-2 data introduction and download
Sustainable service business models
Surface net radiation flux data, solar radiation data, rainfall data, air temperature data, sunshine duration, water vapor pressure distribution, wind speed and direction data, surface temperature
In the era of smart retail, Weimeng reshapes the value of "shopping guide"
InnoDB data storage structure – MySQL
Simple Tetris
How to construct a search string?
1006 next spread
1009 word search
National land use data of 30m precision secondary classification