April 03, 2020, 08:10:25 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Qt5 build for cubieboard

Started by wickwire, March 09, 2013, 04:06:39 pm

Previous topic - Next topic

wickwire

Quote from: derekdhaas on October 16, 2013, 02:33:34 am
Hi WickWire, can you please tell me how you cross compiled it? And how you fixed the problems (Could not create the egl surface: error = 0x300b, etc.)?


I got it fixed with mattli's notes >  qt5base-eglfs-native-window.patch

this patch file modifies qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp on step 4 and makes it go away.

wickwire

At the moment, the Cinematic Demo crashes on my system, but not just the app - the whole OS hangs.

mattli: did you experience this as well?

mattli

October 16, 2013, 08:53:02 pm #62 Last Edit: October 16, 2013, 09:09:32 pm by mattli
Hi, wickwire:

   I am on a business trip. Need wait few days to try your guide for QT 5.1.1 :D

Still working on QT 5.0.2 with webkit in the buildroot. But as my mention before
QuoteCurrently status for run QT5 without X11 (October 14)
1. QT 5.0.2 build include Webkit
    => build success
         but run fail when run fancybrowser example and return command line immediately.

No any message and return to command line when run  "fancybrowser" example.
Next step, may be I need upgrade to  QT 5.1.1 within buildroot and see what's going on.


Quote from: wickwire on October 16, 2013, 01:21:19 pm
At the moment, the Cinematic Demo crashes on my system, but not just the app - the whole OS hangs.

mattli: did you experience this as well?

My version of QT 5.0.2 run the Cinematic Demo. The program freeze (no any animation) after over night.
System not break, I could Ctrl-C and run it again.
(Kernel base on stage/linux-3.4 or ssvb's r3p2 version)


Quote from: ssvb on October 15, 2013, 02:28:01 pm
Quote from: mattli on October 14, 2013, 08:51:42 pm
     Do you success run with Qt5_CinematicExperience and saw tearing when "sun" image moving?
When the "sun" moving to bottom of movie picture, It will tearing.

There will be no tearing with X11 drivers and "SwapbuffersWait" set to "true" in xorg.conf. But there will be no 85 FPS either, because buffer flips will be synchronized with the monitor vertical refresh (assuming that fb0_framebuffer_num is set to 3 in fex and /var/log/Xorg.0.log does not complain about problems with zero-copy buffer swaps).


More information. I saw tearing on the r3p0 (50 FPS), but no tearing on the r3p2 (85FPS).
A little wonder, if change kernel to lichee linux-3.3 with r3p0. It will be no tearing (50FPS).


From another thinking for QT5 with webkit.
May be use QT5 + webkit + X11 and rootfs ref "Cubian Video Kiosk with Mplayer on CB2"
http://www.cubieforums.com/index.php/topic,879.0.html

Matt.


   


wickwire

October 17, 2013, 08:33:26 am #63 Last Edit: October 17, 2013, 07:13:35 pm by wickwire
With ssvb's help, I managed to get a stable Qt5 Cinematic Demo running, I had to set the memory clock speed to 384MHz

u-boot-sunxi from git, find the board/dram_cubieboard2.c

and adjust the speed from 480 to 384

and then burn it on the SD Card

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8

update: this instability issue seems to only affect about 20% of cubie A20s around, guess mine is one of those - so "underclocking" the dram clock speed solved it for me.

wickwire

Quick note guys, I've updated and corrected a previous post of mine on this thread,
regarding FPS measurements @720p and @1080p.


hubaiz

First of thanks wickwire for the great tutorial.

I managed to cross compile Qt 5.1.1 using the tutorial and tested it with the Cinematic Demo and it worked using eglfs and in X11 envrioment to.

Because dd from/to sdcard is slow I used sshfs to mount the cubie root fs.
For compiling Qt I mounted it as root with
sudo sshfs root@_cubie_ip:/ /mnt
and after Qt was installed I mounted as a normal user and used with qtcreator.
I used patwood latest kernel with linaro-raring-alip-20130826-474.tar.gz as rootfs.

I also cross compiled Qt 5.2.0-beta1. Did the required changes to qeglfshooks_stub.cpp and did manage to compile Qt and install it but the Cinematic Demo built with it will just exit with errors.

Btw, how to hide the blinking cursor when the application is started with eglfs.

wickwire

One way to do it would be to change the value of /sys/class/graphics/fbcon/cursor_blink

Still, I've experienced that while typing (Qt5 fancy browser example, for instance) the console text still flashes in the background.

One way to get around it would be to manipulate the ttys and lock them down, disable cursor blink and move the active console to tty2 for instance...


hubaiz

After some search I found:
setting  QT_QPA_EGLFS_HIDECURSOR=1 will hide the mouse cursor
setting QT_QPA_EVDEV_KEYBOARD_PARAMETERS='grab=1' will grab the input so if you type it will not seen on screen

redirection to /dev/null solved the output ( >/dev/null 2>/dev/null )

and as you suggested the
echo 0 > /sys/class/graphics/fbcon/cursor_blink

solved the blinking cursor

nima

Hi all,

I am stuck with this error while making:

rootfs/usr/lib/arm-linux-gnueabihf/libz.a: could not read symbols: Bad value

Any Idea?

wickwire

Did you run the fixLibraryPaths script?

nima

Quote from: wickwire on November 03, 2013, 09:49:03 am
Did you run the fixLibraryPaths script?

Yeah I used the script but no chance...

ssvb

Quote from: wickwire on October 17, 2013, 08:33:26 am
With ssvb's help, I managed to get a stable Qt5 Cinematic Demo running, I had to set the memory clock speed to 384MHz

u-boot-sunxi from git, find the board/dram_cubieboard2.c

and adjust the speed from 480 to 384

and then burn it on the SD Card

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8

update: this instability issue seems to only affect about 20% of cubie A20s around, guess mine is one of those - so "underclocking" the dram clock speed solved it for me.

Could you please try to experiment with the new u-boot, which got 400MHz MBUS clock and also dcdc3 voltage increase?
http://thread.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/5019
Maybe now your board can also run with dram clocked at 480MHz without problems?

jeremychild

I have a Merrii Hummingbird A20 kit and im trying to get Qt5 working on it too :(

corq

Same here; I'm compiling for the cubietruck from a git repository, but I didn't slim down the config options so I'll probably be compiling for a day or two  xD

Let you know how I do; I really only need the qt5-default and qmake for compiling a separate program under qt but couldn't find any precompiled deb archives for arm/linaro.




wickwire

December 28, 2013, 07:14:44 pm #74 Last Edit: December 29, 2013, 10:56:19 am by wickwire
Hi guys,

I've uploaded my solution to a free box account:

https://app.box.com/s/8ue2hhp1dj8b6uwfe7xh

What is available:

1) 8GB SD Card image for Cubieboard 2 (A20), includes everything already compiled in: ssvb's mali optimized kernel, mali framebuffer drivers, Qt5 cross compiled libraries
2) Qt5 cross compiled qmake etc (x64)
3) utils: linaro gcc I used, qt5 sources, cross compile tools I used (from RPi)

Objective:

Get a cross-compiled setup for cubieboard2 up and running fast, without building Qt5 or fiddling with kernel options and start coding with Qt5
You'll only need the files from 1) and 2) and the gcc compiler from 3)
the remaining files in 3) are useful if you wish to start from scratch, follow previous steps in this thread for that

get a "host" machine running x64 linux (my fancy at the moment is Mint)

download all the zipped split archives, usr.local.qt5cb2.tar.bz2 and the linaro gcc
decompress the zips, will generate an 8GB sd card image, "burn" it to an 8GB SD Card - don't delete the img, it will be needed

example:
dd bs=1M if=/opt/qt5.cubieboard2A20.workbench/linaro.1211.ssvb.malifb.Qt511.QtWebkit.img of=/dev/mmcblk0;sync

load the sd card on cubie and make sure it boots, login with linaro/linaro

2) decompress the usr.local.qt5cb2.tar.bz2 so that you end up with /usr/local/qt5cb2
mount the 8GB SD card img like so:

example
mount -o loop,offset=68157440 /opt/qt5.cubieboard2A20.workbench/linaro.1211.ssvb.malifb.Qt511.QtWebkit.img /opt/qt5.cubieboard2A20.workbench/cubie2-rootfs/

download Qt Creator from qtproject.org
configure Qt Creator: add the linaro gcc, add the qmake from /urs/local/qt5cb2, it will use the cross-compiled libraries on the mounted 8GB SD card image, add the device over ssh

That's it. Grab the QtCinematicExperience from 3), import it on Qt Creator, use the Kit you just configured, build and deploy.

It should build the app with the cross-compiled qmake and deploy it to cubieboard, and run it.

Please post successes/failures on the thread.

Happy New Year!