Qt 5.4 on BBB OpenGL: Linux is dead after execute examples. Keyboard and mouse have no response.

581 views
Skip to first unread message

Yang Lei

unread,
Dec 13, 2014, 4:55:56 PM12/13/14
to beagl...@googlegroups.com

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:

1. 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.

2. 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.

3. 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)

  1. sudo cp -r <some dir>/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/arm-linux-gnueabihf/libc/* <some dir>/rootfs

edit /qtbase/mkspecs/devices/linux-beaglebone-g++/qmake.conf

  1. Ln 29: COMPILER_FLAGS          = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard
  2. Ln 39: QMAKE_INCDIR_EGL        = $$[QT_SYSROOT]/usr/include/OGLES2

configure

  1. 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

  1.    Configure summary
  2.  
  3. Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
  4. Building for:  devices/linux-beaglebone-g++ (arm, CPU features: neon)
  5. Platform notes:
  6.  
  7.             - Also available for Linux: linux-kcc linux-icc linux-cxx
  8.        
  9. 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 .........
  10.  
  11. Build options:
  12.   Build parts ............ libs examples
  13.   Mode ................... release
  14.   Using C++11 ............ yes
  15.   Using gold linker....... yes
  16.   Using PCH .............. yes
  17.   Target compiler supports:
  18.     Neon ................. yes
  19.  
  20. Qt modules and options:
  21.   Qt D-Bus ............... runtime
  22.   Qt Concurrent .......... yes
  23.   Qt GUI ................. yes
  24.   Qt Widgets ............. yes
  25.   Large File ............. yes
  26.   QML debugging .......... yes
  27.   Use system proxies ..... no
  28.  
  29. Support enabled for:
  30.   Accessibility .......... yes
  31.   ALSA ................... no
  32.   CUPS ................... no
  33.   Evdev .................. yes
  34.   FontConfig ............. no
  35.   FreeType ............... yes (bundled copy)
  36.   Glib ................... no
  37.   GTK theme .............. no
  38.   HarfBuzz ............... yes (bundled copy)
  39.   Iconv .................. yes
  40.   ICU .................... no
  41.   Image formats:
  42.     GIF .................. yes (plugin, using bundled copy)
  43.     JPEG ................. yes (plugin, using bundled copy)
  44.     PNG .................. yes (in QtGui, using bundled copy)
  45.   journald ............... no
  46.   mtdev .................. no
  47.   Networking:
  48.     getaddrinfo .......... yes
  49.     getifaddrs ........... yes
  50.     IPv6 ifname .......... yes
  51.     OpenSSL .............. no
  52.   NIS .................... yes
  53.   OpenGL / OpenVG:
  54.     EGL .................. yes
  55.     OpenGL ............... yes (OpenGL ES 2.0+)
  56.     OpenVG ............... no
  57.   PCRE ................... yes (bundled copy)
  58.   pkg-config ............. no
  59.   PulseAudio ............. no
  60.   QPA backends:
  61.     DirectFB ............. no
  62.     EGLFS ................ yes
  63.     KMS .................. no
  64.     LinuxFB .............. yes
  65.     XCB .................. no
  66.   Session management ..... yes
  67.   SQL drivers:
  68.     DB2 .................. no
  69.     InterBase ............ no
  70.     MySQL ................ no
  71.     OCI .................. no
  72.     ODBC ................. no
  73.     PostgreSQL ........... no
  74.     SQLite 2 ............. no
  75.     SQLite ............... yes (plugin, using bundled copy)
  76.     TDS .................. no
  77.   udev ................... no
  78.   xkbcommon .............. no
  79.   zlib ................... yes (bundled copy)

make and make install just work fine.

4. 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.

  1. sudo cp -r <some dir>/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/arm-linux-gnueabihf/lib <some dir>/rootfs/home/ubuntu

On BBB, I neet to export LD_LIBRARY_PATH

  1. export LD_LIBRARY_PATH=/rootfs/home/ubuntu

Now, I can run Qt examples

  1. cd /Qt/examples/quick/demos/stocqt
  2. ./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!

John Syn

unread,
Dec 13, 2014, 5:54:33 PM12/13/14
to beagl...@googlegroups.com

From: Yang Lei <y34...@gmail.com>
Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Date: Saturday, December 13, 2014 at 1:55 PM
To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Subject: [beagleboard] Qt 5.4 on BBB OpenGL: Linux is dead after execute examples. Keyboard and mouse have no response.
Try 

./stocqt -platform eglfs

Regards,
John

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!

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yang Lei

unread,
Dec 13, 2014, 11:08:18 PM12/13/14
to beagl...@googlegroups.com
Thanks!

I tried adding -platform eglfs but the result is still the same. Either mouse and keyboard doesn't response.

I believe the default platform is eglfs. So, even I don't use -platform option, the it should run with eglfs platform. Am I right? My reference is here http://doc.qt.io/qt-5/embedded-linux.html.

Any more suggestion?



You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/0wRSkdaWOJw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Best
Yang Lei
Graduate Research Assistant
FREEDM Systems center
www.freedm.ncsu.edu
North Carolina State University, NC, US

liyaoshi

unread,
Dec 14, 2014, 9:14:42 PM12/14/14
to beagl...@googlegroups.com
As I know , Ti's Graphic driver will not support 3.18 kernel for current now
You should use 3.12 to match the ti graphic driver

Yang Lei

unread,
Dec 14, 2014, 9:23:47 PM12/14/14
to beagl...@googlegroups.com
Thank you for the respond. However, I've successfully run the Graphic's demo program on 3.18 kernel. Does that mean the Graphic driver has no problem? Thanks!

Don deJuan

unread,
Dec 14, 2014, 11:52:17 PM12/14/14
to beagl...@googlegroups.com
Why not just install Arch Linux ARM and pacman -S qt5 and be done with it?

Robert Nelson

unread,
Dec 15, 2014, 12:05:09 AM12/15/14
to Beagle Board
> Why not just install Arch Linux ARM and pacman -S qt5 and be done with it?

You should "re-read" the thread. You'll find even Arch Linux ARM
can't solve this, as you'd still have to "manually" rebuild qt5 with
the un-distributable sgx lib bits.

Sorry Arch isn't always the answer..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Peter Gregory

unread,
Dec 15, 2014, 10:22:24 AM12/15/14
to beagl...@googlegroups.com
Sounds like you don't have permission to the input devices.
Try running with sudo or add the keyboard / mouse to a group and add permissions to your user.
LinuxFB and eglfs require direct access to /dev/input/event?

Yang Lei

unread,
Dec 16, 2014, 9:00:47 PM12/16/14
to beagl...@googlegroups.com
Hello Peter,

Thank you for your response. After I tried running with sudo, the keyboard and mouse work, now!
Also, I created /etc/udev/rules.d/99-input.rules with following content:

KERNEL=="event*", NAME="input/%k", MODE="664", GROUP="input"

Then, I rebooted BBB and all the events have read permissions. The qt example programs works.

By the way, I noticed another problem. When the Qt programs are running, the terminal's cursor is still flashing. Sometimes the whole terminal screen will pop-up for a very short time. So the whole screen is flashing. I think this is because the terminal is trying to refresh the screen. How can I stop terminal from refreshing the screen? Thanks!

(Should I start this problem in another thread?)

Peter Gregory

unread,
Dec 16, 2014, 11:35:19 PM12/16/14
to beagl...@googlegroups.com
You can turn off the cursor using environment variable QT_QPA_EGLFS_HIDECURSOR=1

I haven't found the proper way to have the console and a EGLFS Qt application on the LCD work at the same time.
I've found that debugging messages go to the main console while the Qt application runs on the LCD
So, the LCD display flashes with debugging messages on the console.
I had to re-compile Qt 5.3 with -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT to get it to stop spamming the main console.
If you figure out how to make it work right, that would be great.

A great resource for Qt embedded options is here:
https://qt-project.org/doc/qt-5-snapshot/embedded-linux.html

John Syn

unread,
Dec 17, 2014, 12:16:17 AM12/17/14
to beagl...@googlegroups.com

On 12/16/14, 8:35 PM, "Peter Gregory" <talk...@gmail.com> wrote:

>You can turn off the cursor using environment variable
>QT_QPA_EGLFS_HIDECURSOR=1
>
>I haven't found the proper way to have the console and a EGLFS Qt
>application on the LCD work at the same time.
>I've found that debugging messages go to the main console while the Qt
>application runs on the LCD
>So, the LCD display flashes with debugging messages on the console.
>I had to re-compile Qt 5.3 with -DQT_NO_DEBUG_OUTPUT
>-DQT_NO_WARNING_OUTPUT to get it to stop spamming the main console.
>If you figure out how to make it work right, that would be great.
I think you just remove the console=tty0 from your mmcargs line in
uEnv.txt file. That should remove the console output from your display,
but will continue to display the console on the UART.

Regards,
John
>
>A great resource for Qt embedded options is here:
>https://qt-project.org/doc/qt-5-snapshot/embedded-linux.html
>
>--
>For more options, visit http://beagleboard.org/discuss
>---
>You received this message because you are subscribed to the Google Groups
>"BeagleBoard" group.
>To unsubscribe from this group and stop receiving emails from it, send an
Reply all
Reply to author
Forward
0 new messages