Hello everyone
I’m new on Qt on arm linux. I’m trying to cross compile the newest version Qt 5.4 for Beaglebone Black(BBB). I think I almost successed because I finished configure and make of Qt 5.4 based on root file system on BBB. When I try to run an example, the GUI shows up but the linux is dead and there is no response from keyboard and mouse. The only thing I can do is to reset BBB. Could someone help me with this problem? I will describe my steps as follow:
- Build Ubuntu SD card
For this step, I followed the following website:
https://eewiki.net/display/linuxonarm/BeagleBone+Black
Kernel version:
Linux arm 3.18.0-bone1 #1 Mon Dec 8 23:08:59 EST 2014 armv71 armv71 armv71 GNU/Linux
Root file system:
Ubuntu 14.04.1 LTS
Cross compiler:
arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 – Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)
The SD card just works fine.
- Build and install SGX driver
Also, I followed the SGX part of the following website
https://eewiki.net/display/linuxonarm/BeagleBone+Black
The demo program OGLES2ChameleonMan works fine.
- Build Qt 5.4
(1) Download Qt 5.4 source qt-everywhere-opensource-src-5.4.0.tar.gz
http://download.qt-project.org/archive/qt/5.4/5.4.0/single/
(2) Configure Qt 5.4
copy the newest cross compiler library to root file system (otherwise the configure has errors)
- sudo cp -r /gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/arm-linux-gnueabihf/libc/* /rootfs
edit /qtbase/mkspecs/devices/linux-beaglebone-g++/qmake.conf
-
Ln 29: COMPILER_FLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
-
Ln 39: QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include/OGLES2
configure
- sudo ./configure -prefix /home/ubuntu/Qt -device linux-beaglebone-g++ -device-option CROSS_COMPILE=/home/albert/arm-dev/kernel_dev/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf- -sysroot /media/albert/rootfs -release -opensource -confirm-license -opengl es2 -v
configure result
-
Configure summary
-
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
-
Building for: devices/linux-beaglebone-g++ (arm, CPU features: neon)
-
Platform notes:
-
- Also available for Linux: linux-kcc linux-icc linux-cxx
-
qmake vars … styles += mac fusion windows DEFINES += QT_NO_MTDEV DEFINES += QT_NO_LIBUDEV QMAKE_X11_PREFIX = /usr sql-drivers = sql-plugins = sqlite qmake switches …
-
Build options:
-
Build parts … libs examples
-
Mode … release
-
Using C++11 … yes
-
Using gold linker… yes
-
Using PCH … yes
-
Target compiler supports:
-
Neon … yes
-
Qt modules and options:
-
Qt D-Bus … runtime
-
Qt Concurrent … yes
-
Qt GUI … yes
-
Qt Widgets … yes
-
Large File … yes
-
QML debugging … yes
-
Use system proxies … no
-
Support enabled for:
-
Accessibility … yes
-
ALSA … no
-
CUPS … no
-
Evdev … yes
-
FontConfig … no
-
FreeType … yes (bundled copy)
-
Glib … no
-
GTK theme … no
-
HarfBuzz … yes (bundled copy)
-
Iconv … yes
-
ICU … no
-
Image formats:
-
GIF … yes (plugin, using bundled copy)
-
JPEG … yes (plugin, using bundled copy)
-
PNG … yes (in QtGui, using bundled copy)
-
journald … no
-
mtdev … no
-
Networking:
-
getaddrinfo … yes
-
getifaddrs … yes
-
IPv6 ifname … yes
-
OpenSSL … no
-
NIS … yes
-
OpenGL / OpenVG:
-
EGL … yes
-
OpenGL … yes (OpenGL ES 2.0+)
-
OpenVG … no
-
PCRE … yes (bundled copy)
-
pkg-config … no
-
PulseAudio … no
-
QPA backends:
-
DirectFB … no
-
EGLFS … yes
-
KMS … no
-
LinuxFB … yes
-
XCB … no
-
Session management … yes
-
SQL drivers:
-
DB2 … no
-
InterBase … no
-
MySQL … no
-
OCI … no
-
ODBC … no
-
PostgreSQL … no
-
SQLite 2 … no
-
SQLite … yes (plugin, using bundled copy)
-
TDS … no
-
udev … no
-
xkbcommon … no
-
zlib … yes (bundled copy)
make and make install just work fine.
-
Run Qt examples
Before run Qt examples, again, I need to copy some cross compiler’s lib file into SD card, otherwise it has errors when execute program. -
sudo cp -r /gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/arm-linux-gnueabihf/lib /rootfs/home/ubuntu
On BBB, I neet to export LD_LIBRARY_PATH
- export LD_LIBRARY_PATH=/rootfs/home/ubuntu
Now, I can run Qt examples
-
cd /Qt/examples/quick/demos/stocqt
-
./stocqt
At this moment, the GUI shows on the screen. However, there is no mouse cursor and the keyboard doesn’t response. I can still see the terminal’s text cursor flashing. The only thing I can do now is to reset BBB. I also tried several other examples and all yield the same result. No mouse cursor and keyboard response.
Does any one know what should I do to fix this problem? Thanks!