1. Download link address of resources needed:
1. ubuntu-14.04.3-desktop-amd64+mac.iso:
http://cdimage.ubuntu.com/releases/
2. qt-everywhere-opensource-src-5.5.0.tar.gz:
http://mirrors.ustc.edu.cn/qtproject/official_releases/qt/
3. The latest cross-compiler download address (I use the compiler provided by Tianqian: arm-linux-gcc: 4.4.6 (for TQ210 EmbedSky Tech)): http://www.veryarm.com/arm-none-linux-gnueabi-gcc
4. Installation under Ubuntu-14.04: qt-opensource-linux-x64-android-5.5.0-2.run download address:
http://mirrors.ustc.edu.cn/qtproject/official_releases/qt/
5. Install tslib——Download address: http://sourceforge.net/projects/tslib.berlios/files/Statement
- see the friendly link address of netizens: Porting Qt-5.5.0 to ARM Cortex-A8:
http://blog.csdn.net/clannadzy/article/details/46896425
Qt5.5.0 compilation and porting to Linux-Arm-A9: http://www.bubuko.com/infodetail-951000.html
Porting qt5.3.1 to arm:
http://blog.csdn.net/zhx6044/article/details/38373687
The first problem to be solved - the problem after installing the tutorial compilation environment: the problem of cross compiler (Ubuntu-14.04-64 bit)
Install Tianqian cross compilation environment, see Tianqian's handheld
root@ubuntu:/work#arm-linux-gcc -v
bash: /opt/EmbedSky/4.4.6/bin/arm-linux-gcc: No such file or directorySolution
:
root@ubuntu:/work#sudo apt-get install lib32z12.
Configure and compile tslibThe
tslib1.4 mentioned on the Internet is actually tslib1.0. This tool is relatively small. You can directly compile it after configuring it.
root@ubuntu:/work#tar -xvjf tslib-1.0.tar.bz2
root@ubuntu:/work#cd tslib-1.0
root@ubuntu:/work/tslib-1.0#./autogen.sh —Possible solutions to the problem: (1) Problem
root@ubuntu:/work/tslib-1.0#./configure --host=arm-linux ac_cv_func_malloc_0_nonnull=yes --prefix=/opt/tslib-1.0
root@ubuntu:/work/tslib-1.0#make —Possible solutions to the problem: (2) Problem
root@ubuntu:/work/tslib-1.0#make install
(1) Problem: —Problem that occurs when compiling ts_lib-1.0./autogen.sh
: 4: autoreconf: not found
Generated when executing autogen.sh under different versions of Ubuntu's tslib. The reason for them is the same,
because the automake tool is not installed. (Ubuntu 14.04) Just install it with the following command.
root@ubuntu:/work/tslib-1.0#sudo apt-get install autoconf automake libtool
(2)Problem: ——An error occurred during make, prompting
In function 'open',
inlined from 'main' at ts_calibrate.c:229:11:
/usr/include/bits/fcntl2.h:51:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [ts_calibrate.o] Error 1
Reason: This is because the syntax of the open function does not conform to the latest gcc.
Solution: Add the third parameter of open to tests/ts_calibrate.c in the tslib-1.0 source package:
#vim tests/ts_calibrate.c
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);
} else {
cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777);
}
——Use the tslib-1.0 compiled and installed by yourself to test the touch screen:
(1) Modify the configuration file ts.conf
Modify /opt/tslib-1.0/etc/ts.conf, remove the # sign in front of module_raw input, and then copy all the files in /opt/tslib-1.0 to the development board, for example, I put them in /usr/local.
——For the copying method, please refer to: 3.5. Tool usage
(2) Configure the environment variables of the development board
Configure the environment variables of the development board to allow tslib to work properly.
Modify the /etc/profile file and add the following content:
#vi /etc/profile
export set TSLIB_FBDEVICE=/dev/fb0
export set TSLIB_TSDEVICE=/dev/event3—Possible solutions to the problem: (A), Problem
export set TSLIB_CONFFILE=/usr/local/etc/ts.conf
export set TSLIB_CALIBFILE=/etc/pointercal
export set TSLIB_PLUGINDIR=/usr/local/lib/ts
Save and exit, run the source command to make it effective
#source /etc/profile
(A), Problem: - I don't know which one to use for event2, event3, and event4? :
The solution is on the board: cat etc/profile
see Figure 1:
From Figure 1, I found the clues of 1 and 2 - the real solution is:
[root @EmbedSky /]#cat tpm/env
ts=3
Pointer=
My board used: export set TSLIB_TSDEVICE=/dev/event3
The final environment variable configuration for my final test of tslib is:
# Ash profile
# vim: syntax=sh
# No core files by default
#ulimit -S -c 0 > /dev/null 2>&1
source /tmp/env
export set HOME=/root
export set TSLIB_FBDEVICE=/dev/fb0
export set TSLIB_TSDEVICE=/dev/event3
export set TSLIB_CONFFILE=/usr/local/etc/ts.conf
export set TSLIB_CALIBFILE=/etc/pointercal
export set TSLIB_PLUGINDIR=/usr/local/lib/ts
export PATH=$QTDIR/bin:$PATH
USER="`id -un`"
LOGNAME=$USER
PS1='[u@h W]# '
PATH=$PATH
HOSTNAME=`/bin/hostname`
export USER LOGNAME PS1 PATH
(3) Run
the ts_calibrate program in /usr/local/bin for calibration. If successful, an interface will appear and ask you to click the cross symbol. After completion, the /etc/pointercal file will be generated. This is the calibration configuration file for the touch screen. As shown in Figures 2 and 3
[root@EmbedSky /]#./usr/local/bin/ts_calibrateFigure
2:
[root@EmbedSky /]#./usr/local/bin/ts_testFigure
3:
III. Cross-compile and configure the ARM version of the Qt 5.5.0 library process and problem solving
1. Unzip Qt 5.5.0, and modify the qmake.config fileroot
@ubuntu:/work#tar -zxvf qt-everywhere-opensource-src-5.5.0.tar.gzModify
: qmake.config fileroot
@ubuntu:/work/qt-everywhere-opensource-src-5.5.0#gedit qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.confResult
:
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QT_QPA_DEFAULT_PLATFORM = linuxfb
QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a
QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf ##Use whatever cross compiler you want; here is Tianembed's cross compiler
QMAKE_CC = arm-embedsky-linux-gnueabi-gcc
QMAKE_CXX = arm-embedsky-linux-gnueabi-g++
QMAKE_LINK = arm-embedsky-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-embedsky-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-embedsky-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-embedsky-linux-gnueabi-objcopy
QMAKE_NM = arm-embedsky-linux-gnueabi-nm -P
QMAKE_STRIP = arm-embedsky-linux-gnueabi-strip
load(qt_config)
2. Modify: qt.pro file
root@ubuntu:/work/qt-everywhere-opensource-src-5.5.0# gedit qt.pro
Result: Unshield the following two lines
#addModule(qt3d, qtdeclarative qtimageformats)
#addModule(qtcanvas3d, qtdeclarative)
Reason:
When compiling, qt3d and qtcanvas3d will report an error, saying that the module is not recognized, and the embedded one does not have opengl. Even if it is recognized, it will still report an error, resulting in compilation failure. In addition, there is no configuration for these two modules in the compilation configuration parameters. The method is to add -no-opengl to the configuration parameters, then open the qt-everywhere-opensource-src-5.5.0/qt.pro file, find:
addModule(qt3d, qtdeclarative qtimageformats)
addModule(qtcanvas3d, qtdeclarative)
Comment out these two lines (# comment), or delete them directly. If you do not comment them out, even if you add -no-opengl, you will still report an error and the compilation will fail.
3. Configure the project: execute the ./configure file
root@ubuntu:/work/qt-everywhere-opensource-src-5.5.0#./configure -release -opensource -confirm-license -plugin-sql-sqlite -no-opengl -no-dbus -no-c++11 -no-tslib -qt-libjpeg -qt-libpng -qt-zlib -xplatform linux-arm-gnueabi-g++ -no-openssl -alsa -no-iconv -prefix /opt/Qt-5.5.0-arm/
4. Compile and install: make && make install
root@ubuntu:/work/qt-everywhere-opensource-src-5.5.0#make && make install
It took about two hours.
My compilation and installation directory is: (when ./configure: the directory after -prefix /) /opt/Qt-5.5.0-arm/
Then copy the lib, plugin and include in the /opt/Qt-5.5.0-arm/ folder to where you want to put them. I put them in the opt/ directory of the TQ210 board.
5. File copying method between Ubuntu and Windows
(1). Use tools. Use SCP to log in to Ubuntu 14.04. If access is denied,
the solution is: sudo apt-get install openssh-server.
The tool that can be used is: winscp570setup.exe
. SCP using this tool can directly log in to Ubuntu to facilitate file copying: To copy files, first use the following command to set the highest permissions on the folder to be copied: chmod 777 /work/tslib 1.0 -R
(2). Using Samba to implement file sharing is also a good method.
6. The result of configuring the latest Qt 5.5.0 compiled by myself is:
# Ash profile
# vim: syntax=sh
# No core files by default
#ulimit -S -c 0 > /dev/null 2>&1
source /tmp/env
export set HOME=/root
export set TSLIB_FBDEVICE=/dev/fb0
export set TSLIB_TSDEVICE=/dev/event3
export set TSLIB_CONFFILE=/usr/local/etc/ts.conf
export set
#export set QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export
set QPEDIR=/opt/Qt-5.5.0
-arm export
set TSLIB_ROOT=/usr export set
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib
export set QWS_MOUSE_PROTO=tslib:/dev/touchscreen
export set LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$QTDIR/lib:$LD_LIBARAY_PATH
#export set QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export set QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0 export set
QWS_MOUSE_PROTO=tslib:/dev/touchscreen
QT_QPA_FONTDIR=$QTDIR/lib/fonts
#export set QT_QPA_GENERIC_PLUGINS=tslib ——Possible problems: (1) Problem
export set QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/event3 —same as tslib: event3
export PATH=$QTDIR/bin:$PATH
USER="`id -un`"
LOGNAME=$USER
PS1='[u@h W]# '
PATH=$PATH
HOSTNAME=`/bin/hostname`
export USER LOGNAME PS1 PATH
(1) Problem
-no-tslib means not to use tslib as the input library. At this time, the touch screen uses evdev as the input library by default. So after the transplantation, add the following to the /etc/profile file of the development board:
export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/event0
If tslib is still used, then it should be written as:
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/event0
IV. Ubuntu Install the Linux version under 14.04: qt-opensource-linux-x64-android-5.5.0-2.run
1. Problem: - Install under Ubuntu 10.04-64 bit
root@ubuntu:/work# ./qt-opensource-linux-x64-android-5.5.0-2.run ./qt-opensource-linux-x64-android-5.5.0-2.run
: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
The solution is:
root@ubuntu:/work#sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-devAfter
the installation is complete:
root@ubuntu:/work# ./qt-opensource-linux-x64-android-5.5.0-2.run
You can install Qt 5.5.0 installation wizard
2. Cross-compiler problem (Ubuntu-14.04-64 bit)
Statement - see link: http://blog.csdn.net/sno_guo/article/details/17059381
root@ubuntu:/work# arm-linux-gcc -v
bash: /opt/EmbedSky/4.4.6/bin/arm-linux-gcc: No such file or directory
Solution: sudo apt-get install lib32z1
3. Ubuntu-14.04-64 bit: Install opengl support (mesa3d),
root@ubuntu:/work#sudo apt-get install mesa-common-dev
4. (Solution) Qt5 Ubuntu cannot find -lGL
When using Qt 5.5.0 in Ubuntu 14.04 to compile, the following error occurs: /usr/bin/ld: cannot find -lGL
Friendly solution link: http://forum.qt.io/topic/23310/solved-qt5-under-ubuntu-cannot-find-lgl/3
root@ubuntu:/work#sudo apt-get install libglu1-mesa-dev
5. Use Qt Creator to cross-compile and test running Qt application on TQ210 under Ubuntu 14.04
as shown in
Figures 4, 5, 6, 7, 8, 9, 10 and 11. Figure 4:
Figure 5:
Figure 6:
Figure 7:
Figure 8:
Figure 9:
Figure 10:
Figure 11:
(1) The possible problem is that the Chinese fonts on the TQ210 board cannot be displayed: Please refer to the following friendly link
statement - refer to the friendly link address of netizens:
Installation and testing of Qt5.3.0 (cross-compilation, for arm, support tslib touch screen)
: http://blog.csdn.net/woshidahuaidan2011/article/details/43604059
6. Problem: When Qt Creator cross-compiles ARM programs in Ubuntu 14.04: arm-embedsky-linux-gnueabi-g++: Command not found
Solution:
root@ubuntu:/# gedit /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/EmbedSky/4.4.6/bin:/opt/EmbedSky/4.4.6/arm-embedsky-linux-gnueabi/bin"
Then restart the system to compile the ARM version of the software
. V. Solution to the problem of Tianqian kernel that the touch screen cannot be used:
(1) Problem: After installing the Linux system, the touch screen cannot be calibrated; and the touch screen cannot be used after exiting
Tianqian official problem link collection:
http://www.armbbs.net/forum.php?mod=viewthread&tid=19021&extra=page%3D1
Q: The E8 Linux kernel released on March 24, 2014 does not support capacitive touch screens?
A: Please check the attachment. After decompressing the attachment, there will be two files - ft5x06_ts.module and zImage.bin. Among them, zImage.bin is the test image. Put ft5x06_ts.module in the /drivers/input/touchscreen directory under the kernel source directory (replace the previous one), then delete /drivers/input/touchscreen/built-in.o and recompile the system.
Previous article:TQ210 Learning Path (1) - Migrating Software
Next article:Tianqian TQ210 compile tslib
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- The difference between POR and PUC in MSP430 MCU
- Floating-point C2000 chip calculation skills and points for attention
- Design and implementation of high-definition video image system based on FPGA-DSP.pdf
- The four main methods of electroplating in circuit boards
- DSP6678 NDK network configuration (UDP) points
- Share energy storage power supply energy storage inverter parameters
- 10 experiences summarized by veteran engineers, so beneficial
- NB-IoT and LoRa chip manufacturers
- HDMI to AHD Video Converter
- Texas Instruments: See how innovations in automation are changing the world