Because QT is used to detect USB flash drive plugging, swap is used. After the PC debugging is passed, it is found that there is no license in the board. By default, QT of the arm version is compiled without require, so you need to re-compile QT.
My Configuration:
. /Configure-Prefix/usr/local/ARM/arm2-qt-4.8.1-opensource-Embedded ARM-xplatform qws/Linux-arm-G ++-no-WebKit-QT-LibTIFF-QT-libmng -QT-mouse-tslib-QT-mouse-PC-no-mouse-linuxtp-no-neon-nomake examples-nomake docs
-Nomake demos-nomake tools-no-qt3support-plugin
The version is qt4.8.1. Note that the "-plugin" is used to enable QT to contain the kernel module.
Result: The qt?module cannot be enabled because libdbus-1 version 0.93 was not found. said to need a libdbus-1, yum install a moment, found that this thing has been installed on the PC, otherwise my program will not run under the PC. There is no embedded version, and you need to use the source code for cross-compilation.
The source code version of The keystore I downloaded is 1.0.2, and many of them are migrated online. First create a new folder, mkdir/usr/local/ARM/dbus-1.0.2, and then extract the source code, into the dbus-1.0.2 directory, enter:
./Configure -- Host = arm-Linux -- prefix =/usr/local/ARM/dbus-1.0.2 cc = arm-Linux-GCC -- cache-file = arm-linux.cache -- without-x
Error: Checking abstract socket namespace... configure: Error: cannot run test program while
Cross compiling
Solution: 1. First, use locate pkgconfig to check whether pkgconfig is installed. Generally, it is installed. Find the path to the environment variable: Export pkg_config_path =/usr/lib/pkgconfig
2. The environment variable cannot be set. Enter the following in the terminal:
# Echo ac_cv_have_effecact_sockets = Yes> arm-linux.cache
Later,./configure passed!
Then make,
The following error is reported:
Make [3]: *** [dbus-sysdeps-unix.lo] Error 1
Make [3]: Leave the directory "/home/Yan/download/dbus-1.0.2/sources"
Make [2]: *** [all] Error 2
Make [2]: Leave the directory "/home/Yan/download/dbus-1.0.2/sources"
Make [1]: *** [All-recursive] Error 1
Make [1]: Leave the directory "/home/Yan/download/dbus-1.0.2"
Make: *** [all] Error 2
Solution:Go to the idea directory under the dbus-1.0.2 directory, gedit dbus-sysdeps-unix.c, and add at the beginning of the file:
Struct ucred
{
Pid_t PID;/* PID of sending process .*/
Uid_t uid;/* uid of sending process .*/
Gid_t GID;/* gid of sending process .*/
};
Pay attention to the last ";" to be included above.
After that, make and make install went smoothly!
Go to the-Prefix directory of the plugin to check whether the installation is complete, as shown below:
Next, you need to switch to the decompressed directory of QT, re-./configure, and add the path after-keystore. That is, two-I and one-L. No one said this on the internet, and some people made their own ambiguity. I originally found the include and Lib according to the dbus-1.0.2 in the installation directory, respectively, put the deepest directory configuration in, found always wrong. That's not the case! Find the pkgconfig folder under the Lib file under the-Prefix directory, open the dbus-1.pc, the content is as follows:
prefix=/usr/local/arm/dbus-1.0.2exec_prefix=${prefix}libdir=${exec_prefix}/libincludedir=${prefix}/includesystem_bus_default_address=unix:path=/usr/local/arm/dbus-1.0.2/var/run/dbus/system_bus_socketsysconfdir=/usr/local/arm/dbus-1.0.2/etcsession_bus_services_dir=/usr/local/arm/dbus-1.0.2/share/dbus-1/servicesName: dbusDescription: Free desktop message busVersion: 1.0.2Libs: -L${libdir} -ldbus-1 Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include
Focus on the last two sentences. Here-L and-I are not configured in the deepest directory. (Potholes is someone said online to configure to the deepest directory, there are people said to change this dbus-1.pc file, nnd !) Following the last two sentences above,The correct-signature parameter should be:
-Export-linked-ed-I/usr/local/ARM/dbus-1.0.2/include/dbus-1.0-I/usr/local/ARM/dbus-1.0.2/lib/dbus-1.0/include-L/usr /local/ARM/dbus-1.0.2/lib-ldbus-1
-Lpthread-LRT
For the sake of safety, export pkg_config_path = $ pkg_config_path:/usr/local/ARM/dbus-1.0.2/lib/pkgconfig to configure the pkgconfig folder path of the keystore, this step should be OK!
The final content of QT./configure is:
. /Configure-Prefix/usr/local/ARM/arm2-qt-4.8.1-opensource-Embedded ARM-xplatform qws/Linux-arm-G ++-no-WebKit-QT-LibTIFF-QT-libmng
-QT-mouse-tslib-QT-mouse-PC-no-mouse-linuxtp-no-neon-nomake examples-nomake docs-nomake demos-nomake tools-no-qt3support-plugin-methods -linked-I/usr/local/ARM/dbus-1.0.2/include/dbus-1.0-I/usr/local/ARM/dbus-1.0.2/lib/dbus-1.0/include-L/usr/local/ARM /dbus-1.0.2/lib
-Ldbus-1-lpthread-LRT
Then make and make install are used to compress the generated lib folder, copy it to the board, decompress it, and place it in the corresponding location! If you have any questions, refer to my previous blogs.