CubieBoard Forum

Cubieboard itself => Software & Applications => Topic started by: wickwire on March 09, 2013, 04:06:39 pm

Title: Qt5 build for cubieboard
Post by: wickwire on March 09, 2013, 04:06:39 pm
New Project - Qt5Box

It's basically a Virtualbox Sandbox with (hopefully) everything you'll need to develop your Qt5 Apps on Embedded Devices.  8)
Qt5Box is the natural evolution from the broken/outdated links throughout the thread, for both older and more recent cross-compiled environment versions.

Want to test-drive Qt5Box?

Send me a private message here in the forum with a valid email address, so that I may grant access to the Box.com account hosting the files.

Update: 24-10-2014

Torrent solution running parallel to the Box.com distribution method > qt5box03.torrent (https://app.box.com/s/kc3dkadnujt60af078a3)

Update: 11-10-2014

Finally, Qt5Box v0.3 - Codename Isaac is already available, currently uploading it to the Box.com account!

Changes include:



Update: 19-06-2014

Qt5Box v0.2 is already available, embedded target list includes:

- Cubieboard A10
- Cubieboard A20
- Cubietruck

As usual, both Framebuffer and X11 environments for each target, more details in the release notes.




Index - Most Relevant Posts (IMHO)


Cross-compiling Qt5 (Framebuffer) (http://www.cubieforums.com/index.php/topic,173.msg5377.html#msg5377)

Could not create the egl surface: error = 0x300b
Post #1 (http://www.cubieforums.com/index.php/topic,173.msg5383.html#msg5383)
Post #2 (http://www.cubieforums.com/index.php/topic,173.msg9191.html#msg9191)
Post #3 (http://www.cubieforums.com/index.php/topic,173.msg9218.html#msg9218)


Framebuffer tweaks - blinking cursor + keyboard grab (http://www.cubieforums.com/index.php/topic,173.msg5854.html#msg5854)

arm-linux-gnueabihf/libz.a: could not read symbols: Bad value
Question (http://www.cubieforums.com/index.php/topic,173.msg5921.html#msg5921)
Answer (http://www.cubieforums.com/index.php/topic,173.msg5923.html#msg5923)

changing resolution (http://www.cubieforums.com/index.php/topic,173.msg8120.html#msg8120)

Framebuffer Tearing Effect (Vsync issues)
Question (http://www.cubieforums.com/index.php/topic,173.msg16505.html#msg16505)
Answer (http://www.cubieforums.com/index.php/topic,173.msg16507.html#msg16507)



------------------------------- Legacy Stuff Begins -------------------------------


Update: 29-12-2013

Wow, about 9 months have already gone by...! At the moment, it's possible to natively compile or cross-compile Qt5 on cubieboard A10 and A20 using Mali libraries. Later posts on the thread have the steps I've taken, much with the help of the community and outstanding members like Patwood, ssvb and others.

I believe there is still much to be done, but so far things look great for Qt5 on cubie/linux!

Along the way I've purchased an A10, later on an A20 and since both are being used on other projects, I've recently placed an order online for a cubietruck and plan to pick up from there!

Happy New Year everyone!



Hi,

I'm trying to build Qt5 on a cross compile environment, similar to what is available for Raspberry Pi and others,
so in the ./configure step I need the "device" information:

usually a set of files in the Qt5 workdir, under qtbase/mkspecs/devices. Raspberry Pi is already included but external references can be added.

Where can I get these files, for cubieboard?

As an example, raspberry pi has the following set in this mkspecs/devices:


qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++

-rw-r--r-- 1 wickwire wickwire 10245 Mar  3 00:55 qeglfshooks_pi.cpp
-rw-r--r-- 1 wickwire wickwire  1320 Mar  3 00:55 qmake.conf
-rw-r--r-- 1 wickwire wickwire  2009 Mar  3 00:55 qplatformdefs.h




I'm attaching the raspberry pi files to the thread for comparison

Thanks in advance!
Title: Re: Qt5 build for cubieboard
Post by: Max on March 13, 2013, 09:09:25 am
Try using the files for the amlogic-8726M.
It has a Mali GPU as well.

Might need to adjust the -mfloat-abi parameter in qmake.conf to match the ABI of the Linux distribution you want to run it under.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 13, 2013, 08:18:06 pm
Ive managed to sucessfully build Qt5 for Cubieboard!

Using Linaro 12.11, compiling the mali drivers and building Qt5 with the beagleboard profile, this is the config.summary file generated by the Qt5 configure step:

Building on:   linux-g++-64
Building for:  devices/linux-cubieboard-g++
Architecture:  arm, features: neon
Host architecture: x86_64, features: mmx sse sse2
Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
       
qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_XCB PRECOMPILED_DIR = .pch/release-shared OBJECTS_DIR = .obj/release-shared MOC_DIR = .moc/release-shared RCC_DIR = .rcc/release-shared UI_DIR = .uic/release-shared sql-drivers =  sql-plugins =  sqlite qmake switches .........
Build .................. libs
Configuration ..........  cross_compile qpa largefile neon pcre  minimal-config small-config medium-config large-config full-config evdev linuxfb c++11 accessibility egl eglfs opengl opengles2 shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify png freetype system-zlib nis iconv rpath concurrent audio-backend v8 release
Debug .................. no
C++11 support .......... yes
pkg-config ............. yes
Qt D-Bus module ........ no
Qt Concurrent code ..... yes
Qt GUI module .......... yes
Qt Widgets module ...... yes
JavaScriptCore JIT ..... To be decided by JavaScriptCore
QML debugging .......... yes
PCH support ............ no
iWMMXt support ......... no
NEON support ........... yes
IPv6 ifname support .... yes
getaddrinfo support .... yes
getifaddrs support ..... yes
Accessibility .......... yes
NIS support ............ yes
CUPS support ........... no
Iconv support .......... yes
Glib support ........... no
GStreamer support ...... no
PulseAudio support ..... no
Large File support ..... yes
GIF support ............ plugin
JPEG support ........... plugin (qt)
PNG support ............ yes (qt)
zlib support ........... system
Session management ..... auto
libudev support ........ no
Use system proxies ..... no
OpenGL support ......... yes (OpenGL ES 2.x)
OpenVG support ......... no
XShape support ......... auto
XVideo support ......... auto
XSync support .......... auto
Xinerama support ....... runtime
Xcursor support ........ runtime
Xfixes support ......... runtime
Xrandr support ......... runtime
Xi support ............. runtime
Xi2 support ............ auto
MIT-SHM support ........ auto
FontConfig support ..... no
XKB Support ............ auto
GTK theme support ...... no
SQLite support ......... plugin (qt)
OpenSSL support ........ no
Alsa support ........... no
libICU support ......... no
PCRE support ........... qt
Xcb support ............ no
Xrender support ........ no
EGLFS support .......... yes
DirectFB support ....... no
LinuxFB support ........ yes
KMS support ............ no


I have EGLFS support with Qt5, but when attempting to deploy a simple helloworld Qt5 app, I get the following error message:



EGL Error : Could not create the egl surface: error = 0x300b

bash: line 1:  2400 Aborted                 DISPLAY=:0.0 /opt/helloworld/bin/helloworld
Remote application finished with exit code 134.


Usually this means that there isn't enough RAM in the system for graphics. By comparison, the Raspberry Pi with 512MB allows for memory management via scripting: 256MB GPU / 256MB generic - and upon this error, usually one gets past it by shifting a bit more RAM to the GPU.

My cubieboard has 1GB RAM and from I can gather on dmesg, MALI is only using 64MB. Is there any way I can manually configure the allocated RAM to the GPU and hand it more?

Hopefully someone could help, I think it would be excellent to be able to have Qt5 running on Cubie - and afterwards I'm set on working on video with the CedarX libs, integrated with Qt5!

Please help!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 14, 2013, 07:24:23 am
Quote from: Max on March 13, 2013, 09:09:25 am
Try using the files for the amlogic-8726M.
It has a Mali GPU as well.

Might need to adjust the -mfloat-abi parameter in qmake.conf to match the ABI of the Linux distribution you want to run it under.


Hi Max, thanks for the help, I hadn't seen your post before writing my second and yes, basically I did something similar using the beagleboard profile!

As for the runtime error I'm getting with Qt5 apps on the cubieboard, I found something on the sunxi wiki pages:

http://linux-sunxi.org/Fex_Guide#SDRAM

I haven't been able to test this yet but maybe I could use this procedure to allocate more RAM to the GPU...?
The guide only mentions 2D settings, does anyone know if 3D can also be configured?
Would this be the adequate way to go or is there another (better) way to configure the allocated RAM to MALI?

Thank you in advance!
Title: Re: Qt5 build for cubieboard
Post by: lawrence on March 14, 2013, 02:22:23 pm
I think you're barking up the wrong tree with that.

Check that you have things setup - e.g. drm, mali, ump modules installed and running, etc and check x11 logs (assuming you're using x11 and not qt with frame buffer).

If those are all ok, then you should be able to get an EGL layer.

Suggest take a look at my notes on opengl / x11 setup in the unfinished notes section.
(this)
http://www.cubieforums.com/index.php/topic,30.0.html

Make sure you have your x11 side working right, check logs...
Took me a few attempts to get everything going right the first time too.

If you have changed the compile bits for this would be interested in it too.  I haven't looked at qt yet due to time issues, but i was looking at doing it  at some point.  If you can save me the work... :)

Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 14, 2013, 07:37:56 pm
Hi Lawrence,

First of all many thanks for the support so far, I believe this board has a lot to offer and hopefully Qt5 will work on it!

So going with your suggestions, I would like to be working with framebuffer alone if possible, no X - so I have disabled X by stopping the lightdm service.

modules:

linaro@linaro-alip:~/sunxi-mali$ lsmod
Module                  Size  Used by
tun                    14361  2
8192cu                587445  0
mali_drm                2492  0
drm                   177184  1 mali_drm
mali                  109871  0
ump                    49027  1 mali
hdmi                   20868  0
lcd                     4552  0
disp                  242658  3 hdmi,lcd
cfbcopyarea             2851  1 disp
cfbimgblt               2104  1 disp
cfbfillrect             3179  1 disp
sw_ahci_platform        3521  0
linaro@linaro-alip:~/sunxi-mali$


Prior to working with Qt5 on my development machine, I installed the mali-libs according to the sunxi wiki and now on the cubie, when I run the test/test app from the mali-libs dir, I get:

linaro@linaro-alip:~/sunxi-mali$ test/test
EGL Version: "1.4 Linux-r3p0-04rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 "
Surface size: 480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_EXT_shader_texture_lod "
linaro@linaro-alip:~/sunxi-mali$


With this output, the connected LCD TV displays a rainbowed triangle as the mali-libs wiki page suggests.

Afterwards I created an image of the SD card with Linaro 12.11 and all of this installed and used it on my development machine to build Qt5 - and the config.summary I got is the one from previous posts in the thread.

Many thanks for your link, I will check it out and get back here as soon as I have something!

Thanks in advance!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 15, 2013, 02:18:03 pm
After going through your other thread, I noticed that the GFX bits and pieces aren't exactly the same nowadays and so I decided first to concentrate on mali-libs and rule out Xorg, which should also simplify things.

So going with mali support alone, I went to http://linux-sunxi.org/Mali400#Mali-400_MP_in_A1x and checked the table there. I tested the binaries for armhf and framebuffer support only.

From there, I couldn't get the coloured triangle running - but using the git repository, I recovered it:

Starting here https://github.com/linux-sunxi/mali-libs and from the included README, moving on to here:

> git clone https://github.com/linux-sunxi/sunxi-mali.git
> git submodule init
> git submodule update


And with these, I got the triangle back on framebuffer.

Now when attempting Qt5 with these libs, a hello world app fails with the known EGL Error : Could not create the egl surface: error = 0x300b error

And the TV screen starts flicking for some odd reason.

So far, this is where I'm at...!
Title: Re: Qt5 build for cubieboard
Post by: lawrence on March 16, 2013, 12:31:06 am
Might be a silly question but do you definitely have framebuffer enabled in kernel modules on boot?

egl error 300b is failure to create display surface.


So, do you have a framebuffer device on bootup?  (i.e. get the linux penguin logo during boot, and/or nice high resolution text during bootup)

eg

(http://farm9.staticflickr.com/8356/8401096211_0b506c2374.jpg) (http://www.flickr.com/photos/sheedl/8401096211/)
Framebuffer on Cubie (http://www.flickr.com/photos/sheedl/8401096211/) by sheedl (http://www.flickr.com/people/sheedl/), on Flickr

Also, make sure that the ump and mali device drivers are accessible to user programs

chmod 777 /dev/ump /dev/mali for testing (but do it properly for real).


Otherwise, try changing the failing call for egl to something like

eglCreateWindowSurface
            (context->display(), context->config(), 0,0);



Title: Re: Qt5 build for cubieboard
Post by: lawrence on March 16, 2013, 12:39:25 am
Otherwise, install DirectFB, and try with that instead of LinuxFB.

You'll need to re-run the ./configure to enable that (as yours hasn't got that enabled according to the earlier config you posted).
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 16, 2013, 10:00:12 am
Many thanks for all the input,

So yes, chmodding /dev/ump and /dev/mali and not working (if permissions aren't set, Qt5 apps report so), as for framebuffer support I decided to go with directFB:

I've installed the directfb packages (dev, etc etc etc) and to test it out, I also installed fbi in order to test the framebuffer.

I stopped lightdm and used fbi to display an HD wallpaper on the TV using a usb keyboard and it worked, so I guess directfb is OK.

Next I'm creating the SD card img and I will be building another Qt5 instance, checking the configure log and making sure directFB is available.

I will get back ASAP and share my findings!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 17, 2013, 03:47:29 pm
Hi,

I've managed to get a little bit further, but not there yet:

- I began by creating a new Linaro image, and building on it step by step:


linaro@linaro-alip:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Linaro
Description: Linaro 12.11
Release: 12.11
Codename: precise
linaro@linaro-alip:~$

linaro@linaro-alip:~$ uname -a
Linux linaro-alip 3.0.62 #1 PREEMPT Sun Mar 17 11:01:45 WET 2013 armv7l armv7l armv7l GNU/Linux
linaro@linaro-alip:~$

linaro@linaro-alip:~$ lsmod
Module                  Size  Used by
8192cu                589350  0
mali_drm                2560  0
drm                   177024  1 mali_drm
mali                  108351  0
ump                    49607  1 mali
sw_ahci_platform        3621  0
linaro@linaro-alip:~$


Following this guide >> http://linux-sunxi.org/Binary_drivers

- Only concerned with framebuffer for now
- I successfully installed the mali-libs
- I used git and built the sources, didn't use the pre-compiled tarballs
- I successully obtained the coloured triangle on screen
- I used fbi to test framebuffer capability -> successfully displayed an HD image on the TV, from CLI


root@linaro-alip:~/sunxi-mali# apt-get install build-essential autoconf automake make libtool libdrm-dev libdri2-1 libdri2-dev git
root@linaro-alip:~/sunxi-mali# git clone https://github.com/linux-sunxi/sunxi-mali.git
root@linaro-alip:~/sunxi-mali# cd sunxi-mali/
root@linaro-alip:~/sunxi-mali# git submodule init
root@linaro-alip:~/sunxi-mali# git submodule update
root@linaro-alip:~/sunxi-mali# make install
root@linaro-alip:~/sunxi-mali# make test
root@linaro-alip:~/sunxi-mali# apt-get clean
root@linaro-alip:~/sunxi-mali# apt-get install fbi
root@linaro-alip:~/sunxi-mali# wget http://wallpaperspoint.net/wp-content/walls/2_wallpaper_background_01/1920x1080-hd-wallpaper-185.jpg
root@linaro-alip:~/sunxi-mali# apt-get install directfb* (installed these after testing fbi with the wallpaper)
root@linaro-alip:~# echo 'KERNEL=="mali", MODE="0660", GROUP="video"' >> /etc/udev/rules.d/50-mali.rules
root@linaro-alip:~# echo 'KERNEL=="ump", MODE="0660", GROUP="video"' >> /etc/udev/rules.d/50-mali.rules
root@linaro-alip:~# cat /etc/udev/rules.d/50-mali.rules
KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
root@linaro-alip:~# groups linaro
linaro : linaro adm dialout cdrom audio dip video plugdev admin


(and the output I got on the CLI while running the triangle on the TV):

root@linaro-alip:~/sunxi-mali# test/test
EGL Version: "1.4 Linux-r3p0-04rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 "
Surface size: 480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_EXT_shader_texture_lod "
root@linaro-alip:~/sunxi-mali#




After this point, I installed the directfb libs - so before this point, I already had fbi running, possibly with the kernel framebuffer


root@linaro-alip:~/sunxi-mali# apt-get install directfb*


After these steps, I moved on the Qt5:

I built the git sources setting a new profile based on the beagleboard profile in Qt5 >> qt5/qtbase/mkspecs/devices/linux-beagleboard++
I added the paths for the mali lib and generated soft links for EGL and stuff

Qt5 built OK, and then onwards to the helloworld Qt5 App:


Building on:   linux-g++-64
Building for:  devices/linux-cubieboard-g++
Architecture:  arm, features: neon
Host architecture: x86_64, features: mmx sse sse2
Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
       
qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_XCB QMAKE_CFLAGS_DIRECTFB = -D_REENTRANT -I/opt/qt5.cubieboard.workbench/cubieboard-rootfs/usr/include/directfb   QMAKE_LIBS_DIRECTFB = -ldirectfb -lfusion -ldirect -lpthread   PRECOMPILED_DIR = .pch/release-shared OBJECTS_DIR = .obj/release-shared MOC_DIR = .moc/release-shared RCC_DIR = .rcc/release-shared UI_DIR = .uic/release-shared sql-drivers =  sql-plugins =  sqlite qmake switches .........
Build .................. libs
Configuration ..........  cross_compile qpa largefile neon pcre  minimal-config small-config medium-config large-config full-config evdev xlib directfb linuxfb c++11 accessibility egl eglfs opengl opengles2 shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png freetype system-zlib nis iconv rpath concurrent audio-backend v8 release
Debug .................. no
C++11 support .......... yes
pkg-config ............. yes
Qt D-Bus module ........ no
Qt Concurrent code ..... yes
Qt GUI module .......... yes
Qt Widgets module ...... yes
JavaScriptCore JIT ..... To be decided by JavaScriptCore
QML debugging .......... yes
PCH support ............ no
iWMMXt support ......... no
NEON support ........... yes
IPv6 ifname support .... yes
getaddrinfo support .... yes
getifaddrs support ..... yes
Accessibility .......... yes
NIS support ............ yes
CUPS support ........... no
Iconv support .......... yes
Glib support ........... no
GStreamer support ...... no
PulseAudio support ..... no
Large File support ..... yes
GIF support ............ plugin
JPEG support ........... plugin (system)
PNG support ............ yes (system)
zlib support ........... system
Session management ..... auto
libudev support ........ no
Use system proxies ..... no
OpenGL support ......... yes (OpenGL ES 2.x)
OpenVG support ......... no
XShape support ......... auto
XVideo support ......... auto
XSync support .......... auto
Xinerama support ....... runtime
Xcursor support ........ runtime
Xfixes support ......... runtime
Xrandr support ......... runtime
Xi support ............. runtime
Xi2 support ............ auto
MIT-SHM support ........ auto
FontConfig support ..... no
XKB Support ............ auto
GTK theme support ...... no
SQLite support ......... plugin (qt)
OpenSSL support ........ no
Alsa support ........... no
libICU support ......... no
PCRE support ........... qt
Xcb support ............ no
Xrender support ........ no
EGLFS support .......... yes
DirectFB support ....... yes
LinuxFB support ........ yes
KMS support ............ no



When starting a new project in Qt Creator, a helloworld is automatically generated:
A rectangle with "hello world" written in black, over a white canvas.

Executing the app on the cubieboard directly went like this:

First check my options:


linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform .
Failed to load platform plugin ".". Available platforms are:
directfbegl
directfb
eglfs
linuxfb
minimal
minimalegl

Aborted
linaro@linaro-alip:/opt/helloworld/bin$


Outputs:

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform eglfs
EGL Error : Could not create the egl surface: error = 0x300b

Aborted
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform minimalegl
Opened display 0x1

Initialized display 1 4

Could not create the egl surface: error = 0x300b

EGL error
Aborted
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform minimal
This plugin does not support createPlatformOpenGLContext!
QQuickWindow: makeCurrent() failed...
Segmentation fault
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform linuxfb
Failed to set graphics mode Invalid argument
This plugin does not support createPlatformOpenGLContext!
QQuickWindow: makeCurrent() failed...
Segmentation fault
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform directfbegl
Failed to load platform plugin "directfbegl". Available platforms are:
directfbegl
directfb
eglfs
linuxfb
minimal
minimalegl

Aborted
linaro@linaro-alip:/opt/helloworld/bin$


linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform directfb

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2008  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-12-05 17:08)
(!) DirectFB/core/vt: Error opening `/dev/tty0'!
    --> Permission denied
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> Initialization error!
(#) DirectFBError [QDirectFBConvenience: error creating DirectFB interface]: Initialization error!
linaro@linaro-alip:/opt/helloworld/bin$

and directFB once more, but as root:

linaro@linaro-alip:/opt/helloworld/bin$ sudo ./helloworld -platform directfb

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2008  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-12-05 17:08)
(*) Direct/Thread: Started 'VT Switcher' (937) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: axp20-supplyer 0.1 (directfb.org)
(*) Direct/Thread: Started 'Keyboard Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Surface: Allocated 1280x720 32 bit RGB32 buffer (index 0) at offset 0 and pitch 5120.
This plugin does not support createPlatformOpenGLContext!
QQuickWindow: makeCurrent() failed...
(!) [  936:    0.000] --> Caught signal 11 (at 0x4, invalid address) <--
(!!!)  *** WARNING [still objects in 'Window Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!)  *** WARNING [still objects in 'Layer Region Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!)  *** WARNING [still objects in 'Layer Context Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!)  *** WARNING [still objects in 'Surface Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
linaro@linaro-alip:/opt/helloworld/bin$

(screen on TV flashes white and crashes)




I basically tried all options, root and non-root, no successful results so far.


The G2D_SIZE memory issue:

Another DEV environment separate from this, to test the FEX parameters:

I altered the cubieboard.fex and built a stock image, based on Linaro 12.11 rootfs and using the sunxi-bsp materials. I followed this guide to define a permanent mac address and it works:

http://linux-sunxi.org/WEMAC

With this I got a permanent MAC address on every reboot.

I then tried to alter the memory following the guide, same principle:

http://linux-sunxi.org/Fex_Guide#.5Bg2d_para.5D

specifically, g2d_guide:

16*1024*1024 = 16777216 = 0x1000000
128*1024*1024 = 134217728 = 0x8000000
256*1024*1024 = 268435456 = 0x10000000

I altered this parameter with several values but after rebooting the new images, dmesg always showed the same allocated value: 16MB.

Ok so even if G2D_SIZE isn't the answer, I haven't figured out yet why the changes aren't being enforced - please let me know if you spot the mistakes

As for Qt5... at this point I don't know how to get past the present point... so let me know if you have any ideas as well!

Thanks in advance!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 18, 2013, 06:32:36 am
Hi,

I've been reading upon the error message for the EGLFS platform:

Could not create the egl surface: error = 0x300b

Turns out that the message translates to EGL_BAD_NATIVE_WINDOW so now I'm trying to figure out what this means and how to fix it...

Once again if anyone has any ideas - please let me know - I've also addressed the issue in the Qt5 forums > Embedded section, in the hopes that someone there can shed some light on the issue!
Title: Re: Qt5 build for cubieboard
Post by: lawrence on March 18, 2013, 09:27:38 am
Did you try my suggestion to change the create window code to something like

Otherwise, try changing the failing call for egl to something like

eglCreateWindowSurface
            (context->display(), context->config(), 0,0);


(may need to use 0,1 or 1,0 depending what screen you're pumping pixels out to)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 18, 2013, 10:33:49 am
Lawrence my bad, I tested everything else and completely forgot that other suggestion of yours!

I will attempt to alter these values as suggested and report back, and hopefully once this is up and running, I could submit a community howto for building and using Qt5!

Regarding the code:

eglCreateWindowSurface
            (context->display(), context->config(), 0,0);


Could you please indicate where/how to apply - I've been checking in Qt5 documentation, also searched inside the helloworld project code and couldn't find an existing reference...

Many thanks!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 18, 2013, 12:05:11 pm
update:

I also tried compiling the lima drivers, but I think these are X oriented...?

Anyways, if not, then maybe this could provide more clues - the mali libs I have built and working, do not seem to go well with lima:

root@linaro-alip:~/lima-lima# ls -l
total 40
-rw-rw-r-- 1 root root  257 Dec  7 09:56 Makefile
-rw-rw-r-- 1 root root  761 Dec  7 09:56 Makefile.inc
-rw-rw-r-- 1 root root  253 Dec  7 09:56 Makefile.post
-rw-rw-r-- 1 root root 2879 Dec  7 09:56 Makefile.sysroot
-rw-rw-r-- 1 root root 4238 Dec  7 09:56 README.android
drwxrwxr-x 3 root root 4096 Dec  7 09:56 include
drwxrwxr-x 5 root root 4096 Dec  7 09:56 limare
drwxrwxr-x 4 root root 4096 Dec  7 09:56 tools
drwxrwxr-x 2 root root 4096 Dec  7 09:56 wrap
root@linaro-alip:~/lima-lima# make
make all -C limare
make[1]: Entering directory `/home/linaro/lima-lima/limare'
make all -C lib
make[2]: Entering directory `/home/linaro/lima-lima/limare/lib'
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o bmp.o bmp.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o fb.o fb.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o plb.o plb.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o hfloat.o hfloat.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o symbols.o symbols.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o jobs.o jobs.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o dump.o dump.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o gp.o gp.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o pp.o pp.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o program.o program.c
program.c:1173:1: warning: ���program_symbols_print��� defined but not used [-Wunused-function]
program.c:1341:1: warning: ���varying_map_print��� defined but not used [-Wunused-function]
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o texture.o texture.c
gcc -O0 -g -Wall -I../../include -fPIC   -c -MD -o limare.o limare.c
gcc -shared -Wall -o liblimare.so bmp.o fb.o plb.o hfloat.o symbols.o jobs.o dump.o gp.o pp.o program.o texture.o limare.o -lMali -lrt
make[2]: Leaving directory `/home/linaro/lima-lima/limare/lib'
make all -C tests
make[2]: Entering directory `/home/linaro/lima-lima/limare/tests'
make all -C common
make[3]: Entering directory `/home/linaro/lima-lima/limare/tests/common'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/linaro/lima-lima/limare/tests/common'
make all -C triangle_smoothed
make[3]: Entering directory `/home/linaro/lima-lima/limare/tests/triangle_smoothed'
gcc -O0 -g -Wall -I../../../include -I../../lib/ -I../common   -c -MD -o egl.o egl.c
gcc -O0 -g -Wall -I../../../include -I../../lib/ -I../common -o egl_triangle_smoothed egl.o -lEGL -lGLESv2
gcc -O0 -g -Wall -I../../../include -I../../lib/ -I../common   -c -MD -o limare.o limare.c
gcc -O0 -g -Wall -I../../../include -I../../lib/ -I../common -o limare_triangle_smoothed limare.o -L../../..//limare/lib/ -llimare
/lib/libMali.so: undefined reference to `_XReply'
/lib/libMali.so: undefined reference to `XListPixmapFormats'
/lib/libMali.so: undefined reference to `XextFindDisplay'
/lib/libMali.so: undefined reference to `XFreeColors'
/lib/libMali.so: undefined reference to `XextRemoveDisplay'
/lib/libMali.so: undefined reference to `XFreePixmap'
/lib/libMali.so: undefined reference to `DRI2SwapBuffers'
/lib/libMali.so: undefined reference to `XGetVisualInfo'
/lib/libMali.so: undefined reference to `XChangeWindowAttributes'
/lib/libMali.so: undefined reference to `XInitThreads'
/lib/libMali.so: undefined reference to `XCreateBitmapFromData'
/lib/libMali.so: undefined reference to `XCreatePixmapCursor'
/lib/libMali.so: undefined reference to `XDestroyWindow'
/lib/libMali.so: undefined reference to `XOpenDisplay'
/lib/libMali.so: undefined reference to `XMissingExtension'
/lib/libMali.so: undefined reference to `XSetErrorHandler'
/lib/libMali.so: undefined reference to `_XGetRequest'
/lib/libMali.so: undefined reference to `XInternAtom'
/lib/libMali.so: undefined reference to `drmGetMagic'
/lib/libMali.so: undefined reference to `XChangeProperty'
/lib/libMali.so: undefined reference to `XGetErrorText'
/lib/libMali.so: undefined reference to `XSync'
/lib/libMali.so: undefined reference to `XSelectInput'
/lib/libMali.so: undefined reference to `XGetGeometry'
/lib/libMali.so: undefined reference to `XFixesCreateRegion'
/lib/libMali.so: undefined reference to `XDefineCursor'
/lib/libMali.so: undefined reference to `XAllocNamedColor'
/lib/libMali.so: undefined reference to `XUnmapWindow'
/lib/libMali.so: undefined reference to `XCreateSimpleWindow'
/lib/libMali.so: undefined reference to `XFlush'
/lib/libMali.so: undefined reference to `XextCreateExtension'
/lib/libMali.so: undefined reference to `XGetWindowAttributes'
/lib/libMali.so: undefined reference to `_XReadPad'
/lib/libMali.so: undefined reference to `_XEatData'
/lib/libMali.so: undefined reference to `XFreeCursor'
/lib/libMali.so: undefined reference to `XMapWindow'
/lib/libMali.so: undefined reference to `XextAddDisplay'
/lib/libMali.so: undefined reference to `XCloseDisplay'
collect2: ld returned 1 exit status
make[3]: *** [limare_triangle_smoothed] Error 1
make[3]: Leaving directory `/home/linaro/lima-lima/limare/tests/triangle_smoothed'
make[2]: *** [triangle_smoothed] Error 2
make[2]: Leaving directory `/home/linaro/lima-lima/limare/tests'
make[1]: *** [tests] Error 2
make[1]: Leaving directory `/home/linaro/lima-lima/limare'
make: *** [limare] Error 2
root@linaro-alip:~/lima-lima#

Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 19, 2013, 11:12:25 am
Lawrence

I think I found the references you were mentioning before:

eglCreateWindowSurface
            (context->display(), context->config(), 0,0);


qt5/qtbase/src/plugins/platforms

I have several definitions for this element in sub-folders, specifically in eglfs - so I could alter the definition in qtbase/src/plugins/platforms/eglfs/qeglfswindow.cpp for example...

Also, I noticed that the mkspecs/devices/linux-rasp-pi-g++ profile includes a qeglfshooks.cpp file which also has a definition for this eglCreateWindowSurface... and a bunch of other stuff as well.

Anyways, as soon as I can, I will attempt to change the values for the platforms/eglfs and see if there are any changes!
Title: Re: Qt5 build for cubieboard
Post by: kadosch on April 03, 2013, 06:16:58 am
Hi wickwire,

I'm facing the same issue as you with the eglfs platform. Did you try the changes you mentioned?

If so, I'm interested in the results.

Thanks
Title: Re: Qt5 build for cubieboard
Post by: lawrence on April 15, 2013, 11:45:03 am
Maybe someone wants to try razor-qt instead

https://github.com/Razor-qt/razor-qt/wiki/How-to-compile-it

Title: Re: Qt5 build for cubieboard
Post by: pcklee123 on September 27, 2013, 06:15:47 am
You might need to link to X11 libs to avoid the linker errors  when compiling lima
in lima/limare/tests
add -lX11 to Makefile.egl , Makefile.gles1
also add -lm to Makefile.test
Title: Re: Qt5 build for cubieboard
Post by: wickwire on September 27, 2013, 06:32:11 am
Hi, eventually I managed to be successful with Qt5 on Cubieboard in the following scenarios:

1)
Linaro Linux > as described on this linux-sunxi wiki page (many thanks to ssvb) http://linux-sunxi.org/Qt5

- worked with native Qt5 build on Cubieboard (took several hours), several cross-compile attempts made which didn't work
- using native X11 mali drivers

2)
Linaro Linux, using the libhybris libraries

3)
Using the stock Android in the NAND and going with Qt5 for Android

All of these worked nicely! As I have both Cubieboards A10 and A20, I think I was messing with the Linaro approaches on the A10 and Qt5 for Android on A20.
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 02, 2013, 02:29:19 am
Hi WickWire

Out of curiosity, how did you managed to compile it? Can you explain it a little.

Using the instructions of ssvb, I did not managed to get past the "OpenGL ES 2.0" test, it fails.
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
/root/QT/qt-everywhere-opensource-src-5.1.0/qtbase/mkspecs/linux-g++.


Driver is working and I can see the colored triangle

The only lib I can find is the libGLES located in:
QMAKE_LIBDIR_OPENGL_ES2 =/usr/lib
(which I added to qmake.conf)

p.s. Cubieboard 2

More details
g++ -c -pipe -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I. -o opengles2.o opengles2.cpp
opengles2.cpp:45:25: fatal error: GLES2/gl2.h: No such file or directory


I don't have the GLES2 anywhere, and out of the first 5 pages of google I can't figure out where to get it. Using Cubian (debian distro)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 02, 2013, 06:32:44 am
As far as I recall, I believe that ssvb's tutorial worked only for the A10 for me, not the A20:

A10 + Linaro + native X11 drivers.

A20 wen't OK with Qt5 for Android, using the android JB on the NAND and the Qt5 for Android binary installer on a Linux Mint Laptop.

In any case, make sure you installed the native mali libs for X11 and not framebuffer - do you get the triangle working on Cubian's X environment?
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 03, 2013, 08:19:08 am
Yes the triangle is working, but I'm stuck at configure (not even made it to "make"... very frustrating ;))

I'm missing the header files for GLES, like stated in the verbose log of the ./configure:

"fatal error: GLES2/gl2.h: No such file or directory"

so I was wondering where did you get it :) how did you linked it... I was searching all around Google, but couldn't find any real explanation. It doesn't seem to listen to the changes in directories (I've pointed QMAKE_INCDIR_OPENGL_ES2 to a dir with GLES2/gl2.h, but the error still occures).

Since you compiled it without changing a single line, I was curious how you linked the stuff to the right directories.

The goal by the way is to compile QTwebkit to get a hardware accelerated browser (like done on the raspberry pi). Midori etc. still fall back to software rendering.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 03, 2013, 09:22:34 am
I believe this issue is not relevant in terms of A10 vs A20, but on my A10 Cubie I have:

/home/linaro/sunxi-mali/include/GLES2/gl2.h
/usr/include/GLES2/gl2.h

My sugestion would be to install mlocate, index the search DB and search for gl2.h on your system.

sudo apt-get update && sudo apt-get install mlocate && sudo updatedb && sudo locate gl2.h

If anything, the headers you're missing and Qt is complaining about should be available from the sunxi-mali sources, possibly it's just a matter of making them available to Qt (some PATH or something)
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 04, 2013, 04:33:05 am
Tnx WickWire, Cubian didn't include the header files, I couldn't find where the gl2.h file came from, but it's from the sunxi-mali driver (tnx for pointing that out).

So I compiled all the drivers from source, and now the .configure is working.

Hoping to get it all to compile! I will set up a better tutorial, since the other one is great but limited ;)
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 04, 2013, 05:36:42 am
Alright, little manual for Cubian:

Updated 2013/10/05
- Updated QT to 5.1.1
- Added dependencies for QTWebkit

Updated 2013/10/06
- Use g++ 4.7 (gcc/g++ 4.6 will fail compiling: RenderingAllInOne.cpp)

Notes
- Use a 4gb card at least! The build directory will become around 2 gig after building.


Lets start
Quick and dirty:
sudo -i

Install dependencies:
apt-get install build-essential autoconf automake make libtool  libdbus-1-dev libdbus-glib-1-dev flex bison gperf libicu-dev libxslt-dev ruby xorg-dev xutils-dev pkg-config libdrm-dev

Update to gcc/g++ 4.7
aptitude install install gcc-4.7 g++-4.7

Setup alternatives
update-alternatives --remove-all gcc
update-alternatives --remove-all g++

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7


Set gcc to use version 4.7 (option 2)
update-alternatives --config gcc

Install libdri2 and sunxi-mali
Go to /root
cd /root

Get libdri2 and sunxi-mali:
git clone https://github.com/robclark/libdri2.git
git clone https://github.com/linux-sunxi/sunxi-mali.git


Compile libdri2:
cd libdri2
./autogen.sh --prefix=/usr
make install


Go back to root:
cd /root

Compile sunxi-mali:
cd sunxi-mali
git submodule init
git submodule update
make config ABI=armhf VERSION=r3p0
make install


Install QT5 from source
Back to root:
cd /root

Get QT5:
wget http://download.qt-project.org/official_releases/qt/5.1/5.1.1/single/qt-everywhere-opensource-src-5.1.1.tar.gz
Untar:
tar -xzf qt-everywhere-opensource-src-5.1.1.tar.gz
Go to directory:
cd qt-everywhere-opensource-src-5.1.1

Configure it: (this will successfully configure QT5 with opengl) It doesn't meet all the recommended requirements (gstreamer, GTK theme, libudev) if you know how to get how to get all the recommendations working, feel free to post it
./configure -release -opensource -confirm-license -opengl es2 -no-eglfs -no-linuxfb -no-pch -qt-xcb

Make: (Will take a very long time)
make -j 2

Make install:
make install



Sources:
http://linux-sunxi.org/Qt5
http://lektiondestages.blogspot.nl/2013/05/installing-and-switching-gccg-versions.html
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 04, 2013, 06:33:17 am
Thanks for sharing!

Talking to ssvb yesterday, I got some additional pointers regarding A20 performance and X11 mali libs:

instead of using r3p0, we are encouraged to go with r3p2 for better performance on A20 over A10 (cubieboard1). As I have it, r3p0 on Cubieboard 2 won't harness the SoC's full potential.

However, r3p2 requires proper kernel support, so it might be that Cubian's stock images aren't directed at this and the same even for  the master branch on github for the sunxi kernel, and so one will have to step back even further to get this working on top performance:

1) Building a kernel from ssvb's github branch (which includes the proper patches) hooking it to an ARM linux rootfs and finishing with a custom SD Card image
2) After successful boot, proceed with X11 mali binaries (but installing r3p2 instead of r3p0) and attempt Qt5 build

I will attempt to do this during the weekend and in the end, compare performance results between A10 and A20 and post any additional steps that may be required over what we already have.

Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 05, 2013, 03:42:05 am
My next goal is to compile mlbrowser (a browser build on QT5 & QTWebkit, fully hardware accelerated browser): https://github.com/Topguy/mlbrowser which needs:
- QTWebkit (to compile)
- QT5 (compiled in previous example)

Run before starting:
sudo -i
cd /root


Compile QT5Webkit

First we need the prerequirements:
aptitude install flex bison gperf libicu-dev libxslt-dev ruby

Didn't install libicu before compiling QT5? Use this step:
Go to the qt-every* folder
cd qt-every*

ICU is required to be build in QTBase before compiling QTWebkit, so we have to compile a small portion of QTBase again:

cd qtbase/src/plugins/platforms/xcb
make
make install


Compile QTWebkit
Only needed when not installed at first compile
Set the env variables:
export QTDIR=/usr/local/Qt-5.1.1
export PATH=$QTDIR/bin:$PATH./


And BUILD: (takes an hour or so)
qtwebkit/Tools/Scripts/build-webkit --qt --debug


Compile mlbrowser
Go to /root
cd /root

Download mlbrowser from source:
git clone https://github.com/Topguy/mlbrowser.git
cd mlbrowser


Configure:
mkdir build
cd build
qmake DEFINES+=_BROWSER_ DEFINES+=_MOUSE_ DEFINES+=_PROPERTYCHANGER_ ../src/mlbrowser.pro


replace the line starting with "LIBS" in the Makefile with this line:
LIBS = $(SUBLIBS) -L/opt/vc/lib -lQt5WebKitWidgets -pthread -lrt -L/usr/lib/arm-linux-gnueabihf -lQt5Sql -lQt5Quick -lQt5OpenGL -lQt5PrintSupport -lQt5WebKit -lQt5Qml -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGLESv2 -lpthread

Build:
make
make install


Test it:
mlbrowser -platform eglfs http://www.cubian.org/

P.s. I'm still compiling and will edit this tutorial along the way.

Used sources:
http://qt-project.org/wiki/Building_Qt_5_from_Git
http://trac.webkit.org/wiki/BuildingQtOnLinux
https://github.com/Topguy/mlbrowser

For those who hate "sudo -i", just append sudo in front of every line except cd and mkdir and use your cubie homedir
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 06, 2013, 10:36:59 am
Stuck with a few errors:
/home/cubie/qt-everywhere-opensource-src-5.1.1/qtwebkit/Source/WebCore//.obj/release-shared/dom/DOMAllInOne.o: In function `WebCore::TreeScope::findAnchor(WTF::String const&)':
DOMAllInOne.cpp:(.text._ZN7WebCore9TreeScope10findAnchorERKN3WTF6StringE+0xa2): undefined reference to `WebCore::HTMLAnchorElement::name() const'
DOMAllInOne.cpp:(.text._ZN7WebCore9TreeScope10findAnchorERKN3WTF6StringE+0xb8): undefined reference to `WebCore::HTMLAnchorElement::name() const'
/home/cubie/qt-everywhere-opensource-src-5.1.1/qtwebkit/Source/WebCore//.obj/release-shared/dom/DOMAllInOne.o: In function `WebCore::Document::~Document()':
DOMAllInOne.cpp:(.text._ZN7WebCore8DocumentD2Ev+0x382): undefined reference to `WebCore::SVGDocumentExtensions::~SVGDocumentExtensions()'
/home/cubie/qt-everywhere-opensource-src-5.1.1/qtwebkit/Source/WebCore//.obj/release-shared/dom/DOMAllInOne.o: In function `WebCore::Document::implicitClose()':
DOMAllInOne.cpp:(.text._ZN7WebCore8Document13implicitCloseEv+0x94): undefined reference to `WebCore::HTMLLinkElement::dispatchPendingLoadEvents()'
DOMAllInOne.cpp:(.text._ZN7WebCore8Document13implicitCloseEv+0x98): undefined reference to `WebCore::HTMLStyleElement::dispatchPendingLoadEvents()'
DOMAllInOne.cpp:(.text._ZN7WebCore8Document13implicitCloseEv+0xa8): undefined reference to `WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements()'
DOMAllInOne.cpp:(.text._ZN7WebCore8Document13implicitCloseEv+0x17e): undefined reference to `WebCore::SVGDocumentExtensions::startAnimations()'
/home/cubie/qt-everywhere-opensource-src-5.1.1/qtwebkit/Source/WebCore//.obj/release-shared/dom/DOMAllInOne.o: In function `WebCore::Document::setTitle(WTF::String const&)':
DOMAllInOne.cpp:(.text._ZN7WebCore8Document8setTitleERKN3WTF6StringE+0x96): undefined reference to `WebCore::HTMLTitleElement::setText(WTF::String const&)'


Haven't got any clue how to fix this.
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 07, 2013, 06:48:16 am
wickwire:

Compiling sunxi-mali using:

cd /home/sunxi-mali
git submodule init
git submodule update
make config ABI=armhf VERSION=r3p2-01rel1
make install


Will work correctly, but it's missing:
sunxi_mali_ump_dri2.h:27:21: fatal error: ump/ump.h:

when compiling for example the xf86-video-fbturbo. when changing it back to r3p0 all will compile.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 07, 2013, 07:29:15 am
linaro@linaro-alip:~$ locate ump.h
/home/linaro/sunxi-mali/include/ump/ump.h
/usr/include/boost/exception/detail/object_hex_dump.hpp
/usr/include/ump/ump.h
linaro@linaro-alip:~$

This is on my A10 - make sure you have ump headers available, they should be included with the sunxi-mali git sources - just make them available as well
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 07, 2013, 01:01:58 pm
Quote from: wickwire on October 07, 2013, 07:29:15 am
linaro@linaro-alip:~$ locate ump.h
/home/linaro/sunxi-mali/include/ump/ump.h
/usr/include/boost/exception/detail/object_hex_dump.hpp
/usr/include/ump/ump.h
linaro@linaro-alip:~$

This is on my A10 - make sure you have ump headers available, they should be included with the sunxi-mali git sources - just make them available as well

The "make install" won't output ump.h to /usr/include/ump/ but I think this won't be the only thing going wrong. Well I compiled  the r3p0, which will move all files correctly and will dig into the problem soon. Or have you already compiled r3p2 correctly?

Have you tried compiling QT5 yet on the A20?

I've tried compiling QT5.1.0, without Webkit, on cubian, which will compile successfully.
Then tried to compile Webkit on it's own, including the dependencies needed, which failed...

Tried compiling QT5.1.1, with webkit, on cubian, which failes on compiling webkit, using GCC/G++ 4.7 (4.6 fails)
Tried compiling QT5.1.1 on the new Linaro ROM of patwood, which also failed on webkit...

Couldn't test much more ;) since compiling will take about 13 hours to complete.

I've altered my post a bit to include all dependencies on Debian/Linaro/Ubuntu and will give it another shot next weekend.
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 07, 2013, 09:50:15 pm
Some information that I try build QT 5.1.1 on the A20 (without X11)
I also got the error today.

....
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make[3]: *** [.obj/release-shared/svg/SVGAllInOne.o] Error 4


It seem out of memory in the A20 when build webkit of qt 5.1.1
ref:
http://qt-project.org/forums/viewthread/23209
https://bitcointalk.org/index.php?topic=304389.0

Try to add swap file in the SATA HDD
dd if=/dev/zero of=/mnt/sda1/swap bs=1M count=4096
mkswap /mnt/sda1/swap
swapon /mnt/sda1/swap


It is still going on make (Note: not add "-j 2", it cause too much memory usage)

Any other information about r3p2 mali test:
Success run sunxi-mali "test" program on framebuffer mode.
Base on Cubian-base-r2-arm-a20.img
My change :
kernel use ssvb's branches - https://github.com/ssvb/linux-sunxi/tree/20130913-mali-r3p2-01rel2
kernel config - https://www.dropbox.com/s/rj25a4f669xoosb/kernel_mali-r3p2-01rel2.config?m
Mali library - http://dl.cubieboard.org/software/libs/mali400-gles11-gles20-linux-ump-no_monolithic-rgb_is_xrgb_fb_r3p2-01rel2.tar (http://dl.cubieboard.org/software/libs/mali400-gles11-gles20-linux-ump-no_monolithic-rgb_is_xrgb_fb_r3p2-01rel2.tar)
Test program build from -
git submodule init
git submodule update
make config ABI=armhf VERSION=r3p0 EGL_TYPE=framebuffer
cd test
make


Test program result :
Quote
root@Cubian:/mnt/nfs/tmp/20131007_cubian_a20/sunxi-mali/test# ./test
EGL Version: "1.4 Linux-r3p2-01rel2"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness "
Surface size: 480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map "


Has unknown problem:
After a few minutes HDMI output become as blank.
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 08, 2013, 08:02:41 am
If it's 10 minutes, it's due to the following:
http://www.cubieforums.com/index.php/topic,838.msg4910.html#msg4910 (tnx to PatWood)
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 08, 2013, 09:01:05 pm
Build QT 5.1.1 on cubian, still has link fail with libQt5WebKit.so.5.1.1.
error messge:
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:12049

Another I also try use buildroot snapshot 20131001.
It is support cubieboard2 board and QT 5.0.2 package.
config file - https://www.dropbox.com/s/stmxd1kpcg357r8/buildroot-20131001-cb2.config
build is success and after build done.
Manual use cubian's 3.4.61+ uImage, modules and mali r3p0.

sunxi-mali test program is fine.
# /root/sunxi-mali/test/test
New session opened
EGL Version: "1.4 Linux-r3p0-04rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 "
Surface size: U480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_EXT_shader_texture_lod "
UMP Session closed


But run Qt5_CinematicExperience fail.
EGL Error : Could not create the egl surface: error = 0x300b

Is any one success run QT5 on the cubieboard2 without X11?

another issue that HDMI blank issue is fixed by add "consoleblank=0".

Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 09, 2013, 02:02:25 am
Quote from: mattli on October 08, 2013, 09:01:05 pm
Build QT 5.1.1 on cubian, still has link fail with libQt5WebKit.so.5.1.1.
error messge:
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:12049

Another I also try use buildroot snapshot 20131001.
It is support cubieboard2 board and QT 5.0.2 package.
config file - https://www.dropbox.com/s/stmxd1kpcg357r8/buildroot-20131001-cb2.config
build is success and after build done.
Manual use cubian's 3.4.61+ uImage, modules and mali r3p0.

sunxi-mali test program is fine.
# /root/sunxi-mali/test/test
New session opened
EGL Version: "1.4 Linux-r3p0-04rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 "
Surface size: U480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_EXT_shader_texture_lod "
UMP Session closed


But run Qt5_CinematicExperience fail.
EGL Error : Could not create the egl surface: error = 0x300b

Is any one success run QT5 on the cubieboard2 without X11?

another issue that HDMI blank issue is fixed by add "consoleblank=0".


Mattli, please check out: http://qt-project.org/forums/viewthread/25777

Wickwire had the same issue, maybe he found out something to fix this issue. Also:
QuoteI'm not quite sure if I can help you but I had similar errors with the eglfs on the beagleboard.
What I did I set the folowing environment variables:
export QT_QPA_EGLFS_DEPTH=16
export DISPLAY=:0

Seems to work on the beagleboard, with the same issue.

Also read this:
http://forums.arm.com/index.php?/topic/16630-egl-error-could-not-create-the-egl-surface-error-0x300b/

Did you use -opengl es2 during ./configure?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 09, 2013, 05:16:40 am
Hi guys,

Quick post on my end:

I think we have several things going on at the moment here (different objectives), so let's just sum them up and see where we're at:

- Qt 5.1.1 on Cubieboard 2, Linux:

derekdhaas has had success with this already, r3p0 - since we are going with Cubian, it would be interesting to get Qt5 working with the supplied repo packages for mali (there's also a mali-dev package which includes the headers you were missing)

With Qt5 and r3p0 working with Cubian, we are already able to compare performance between A10 and A20 - worst case scenario, A20 will perform as A10 did

The accelerated browser seems like a great short term plan, afterwards I'll consider the A20's optimizations with ssvb's tweaks

I'm currently building Qt5.1.1 on my A20 as well, followed derekdhaas guide slightly:

On Cubian, installed LXDE with OpenGL support (this pulls in the mali-libs package)
Then searched for the mali-libs-dev package, found one, installed, it pulled in the headers

Building Qt5.1.1 at the moment, if all goes well, will test the cinematic demo - and then try the accelerated browser.

mattli: with the A10 I also got the triangle running with FB mali libs but couldn't build Qt5 at the time, can't remember exactly why - but switching to X11 mali alone, it worked... So back then I decided to continue with X11 mali libs.

I'm unsure, but I think it might be related to the -platform eglfs which didn't work on Cubie... anyways, if you have any success building and using Qt5 on FB alone, let us know - that was my initial goal, to ditch X completely!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 09, 2013, 05:40:11 am
20130913-mali-r3p2-01rel2:

I tried building a linaro SD card image from scratch, similarly to what I had for A10 - but at the sunxi FirstSteps page, the easy approach - sunxi-bsp - didn't work properly. So I followed the guide with the "manual" approach, building the kernel, decompressing the rootfs, partitioning the SD card, etc etc etc but in the end, cubie2 wouldn't boot from the card - would move on to Android in the NAND. I tried adapting Cubian's boot files to my custom Linaro image, but no go, let it go for now.

Since 20130913-mali-r3p2-01rel2 requires ssvb's patches on the sunxi kernel, I'd guess that the best approach would be as mattli attempted I think: to start with a Cubian image, lots of space on the card or SATA HDD mount, pull in ssvb's modified kernel sources, recompile the kernel from within Cubian, reboot cubie2 with the new kernel and install the 20130913-mali-r3p2-01rel2 - but at this point, the X11 and not FB ones, and then move on to building Qt5 against them.

Also, I'm using an 8GB card and reserved 2GB for swap - this seemed to help with the memory usage being reported - by default, Cubian doesn't address swap space.

I also used one core only for building, started with two but Cubie crashed after a while - I'm using it inside a case, temperature maybe?
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 09, 2013, 06:14:52 am
Still try use buildroot for run QT5 on the A20 (cubieboard2).
Because the file system is more small and shorter build time.

Now success run some of QT 5.0.2 examples and Qt5_CinematicExperience
  qt5quick1-5.0.2_example/flickr , qt5base-5.0.2_examples/gui/openglwindow, ..
  Qt5_CinematicExperience (about 28 fps within 1080p, 44fps within 720p)
  (not add "export QT_QPA_EGLFS_DEPTH=16 and export DISPLAY=:0" )

But fail run opengl example.
qt5base-5.0.2_examples/opengl/hellowindow
EGL Error : Could not create the egl surface: error = 0x3003

Anyone known how to increase performance of QT5 in the A20?
The Qt5_CinematicExperience performance is not very good when click one of image by mouse,
the fps down to 15fps (within 1080P)

My step information
A. Buildroot source - https://www.dropbox.com/s/1mz00r2i1gqkx13/buildroot-20131001-cb2-qt5.tgz (2.6MB)
    modify buildroot 20131001 snapshort by reference https://github.com/mireq/buildroot-a13-olinuxino
    it is backport BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_04
    and add qt5base-eglfs-native-window.patch for qt5 base package

    buildroot config - buildroot-20131001/.config
    kernel is use git of https://github.com/patrickhwood/linux-sunxi (5451ddfe213394e26e957d5fe66fc4b694b2516c)
    kernel config file - buildroot-20131001/board/cubietech/cubieboard/linux-patwood.config
    mali is r3p0
   
B. Make a bootable SD-card

    cd buildroot-20131001/output/images
    sudo mkfs.vfat /dev/sdd1
    sudo mkfs.ext4 /dev/sdd2
    sudo mount /dev/sdd1 /mnt/tmp
    sudo cp -a boot.scr /mnt/tmp/
    sudo cp -a uImage /mnt/tmp/
    sudo cp -a script.bin /mnt/tmp/
    sudo echo "extra=consoleblank=0" > /mnt/tmp/uEnv.txt
    sudo umount /mnt/tmp

    sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdd bs=1024 seek=8
    sudo mount /dev/sdd2 /mnt/tmp
    sudo tar xf rootfs.tar -C /mnt/tmp/
    sudo mkdir -p /mnt/tmp/usr/share/fonts
    sudo cp -a ../build/qt5base-5.0.2/lib/fonts/*.ttf /mnt/tmp/usr/share/fonts/
    sudo umount /mnt/tmp


C. binary of Qt5_CinematicExperience
   https://www.dropbox.com/s/mgn3ixr0l903bhg/Qt5_CinematicExperience.bin.tgz (2.9MB)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 10, 2013, 05:40:21 am
derekdhaas, did you try the Cinematic Demo after building Qt5 on your A20, as referenced on the A10 guide?

http://linux-sunxi.org/Qt5

My build finally ended (successful build), the Cinematic Demo code compiles fine but running it I get "shader program is not linked"

Just checking that your build is functional before working on the accelerated browser.
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 10, 2013, 10:47:05 pm
Currently status for run QT5 without X11

   Follow my modify of buildroot 20131001. After manual use ssvb's r3p2 kernel and libMali.so
I got about 1.5x fps of Qt5_CinematicExperience
720p - 85 ~ 88 fps
1080p - 45 ~ 48 fps

Continue to do some of experiment.
1. QT 5.0.2 build include Webkit
    or upgrade to QT 5.1.1
2. Try to use linux-sunxi git of stage/linux-3.4
    Because my test version of kernel still not stable and has some bugs.
    Like run "poweroff", kernel panic ..

3. Try different QT graphic platform (directfbegl , directfb, eglfs)
    Because I am beginner of QT5 and not very understanding of those platform different.
    In my understanding - 
        directfb is use sunxi G2D,  eglfs is use sunxi MALI
        directfbegl  ??
    To do real test to find out the better performance for QtQuick.
    (If someone has already know this, could you share information?)

I saw some informations http://archive.is/OMrvw (old http://linux-sunxi.org/Mali400 page)
Is G2D is better than Mali in some case??

QuoteTODO for developers
..
Integrate G2D support for 2D acceleration, right now Mali drivers sometimes are slower than FBDEV in 2D tasks. Example of EXA integration with 2D acceleration from qualcomm: https://www.codeaurora.org/gitweb/quic/xwin/?p=xf86-video-msm.git;a=blob;f=src/msm-exa-c2d.c;hb=refs/heads/chromium


Matt.
Title: Re: Qt5 build for cubieboard
Post by: derekdhaas on October 14, 2013, 03:24:27 am
Quote from: mattli on October 10, 2013, 10:47:05 pm
Currently status for run QT5 without X11

   Follow my modify of buildroot 20131001. After manual use ssvb's r3p2 kernel and libMali.so
I got about 1.5x fps of Qt5_CinematicExperience
720p - 85 ~ 88 fps
1080p - 45 ~ 48 fps

Continue to do some of experiment.
1. QT 5.0.2 build include Webkit
    or upgrade to QT 5.1.1
2. Try to use linux-sunxi git of stage/linux-3.4
    Because my test version of kernel still not stable and has some bugs.
    Like run "poweroff", kernel panic ..

3. Try different QT graphic platform (directfbegl , directfb, eglfs)
    Because I am beginner of QT5 and not very understanding of those platform different.
    In my understanding - 
        directfb is use sunxi G2D,  eglfs is use sunxi MALI
        directfbegl  ??
    To do real test to find out the better performance for QtQuick.
    (If someone has already know this, could you share information?)

I saw some informations http://archive.is/OMrvw (old http://linux-sunxi.org/Mali400 page)
Is G2D is better than Mali in some case??

QuoteTODO for developers
..
Integrate G2D support for 2D acceleration, right now Mali drivers sometimes are slower than FBDEV in 2D tasks. Example of EXA integration with 2D acceleration from qualcomm: https://www.codeaurora.org/gitweb/quic/xwin/?p=xf86-video-msm.git;a=blob;f=src/msm-exa-c2d.c;hb=refs/heads/chromium


Matt.


Mattli, great job. I've took some days off, but great to see such progress. Can you tell me how you compiled the sunxi-mali driver itself?

To feed some information
http://qt-project.org/wiki/DirectFBAndQt There are 2 plugins for DirectFB...

http://directfb.org/docs/DirectFB_EGL_2013-10-07.pdf (not that usefull but has some information about the different ways of displaying)

(When googling: https://www.google.nl/search?q=directfb+g2d&oq=directfb+g2d&aqs=chrome..69i57.3650j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8 it looks like DirectFB is indeed accelerated by G2D)
Title: Re: Qt5 build for cubieboard
Post by: cubieplayer on October 14, 2013, 03:40:08 am
Quote from: derekdhaas on October 04, 2013, 04:33:05 am
Tnx WickWire, Cubian didn't include the header files, I couldn't find where the gl2.h file came from, but it's from the sunxi-mali driver (tnx for pointing that out).

So I compiled all the drivers from source, and now the .configure is working.

Hoping to get it all to compile! I will set up a better tutorial, since the other one is great but limited ;)

Cubian does provide a dev package. It named libsunxi-mali-x11-dev
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 14, 2013, 03:55:28 am
Currently 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.

2. Try to use linux-sunxi git of stage/linux-3.4
    => workable with buildroot with QT 5.0.2 + r3p0
       No any "oops" when run power off.

3. QT 5.0.2 build include "BR2_PACKAGE_QT5BASE_DIRECTFB=y"
    directfb seems not workable (fail run with param "-platform directfb")
    eglfs still fine (success run without any param or "-platform eglfs")

Got two problems of G2D and Mali when use linux 3.4 kernel source.
1. Standalone run directfb example "df_andi" has error message
    "df_andi" is running fine but has follow error message.

    (!) Core/LayerRegion: realize_region() in dfb_layer_region_flip_update() failed!
    --> A general I/O error occured

   
2. Run Qt5_CinematicExperience saw tearing in the GUI.

Below three source tree is the same.
*https://github.com/patrickhwood/linux-sunxi
*linux-sunxi github "stage/linux-3.4"
*https://github.com/ssvb/linux-sunxi

I also try to use lichee linux-3.3's uImage and modules. Not has those problem.
*It is build from from allwinner sdk v2.0 http://dl.linux-sunxi.org/SDK/A20-SDK-2.0/aw.tar.bz2
  use arm-linux-gnueabi-gcc-4.6.3 build the uImage and Modules.
  use buildroot's rootfs (build from arm-linux-gnueabihf-gcc-4.7.3)

Matt.
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 14, 2013, 04:41:35 am
Quote from: derekdhaas on October 14, 2013, 03:24:27 am
..
Mattli, great job. I've took some days off, but great to see such progress. Can you tell me how you compiled the sunxi-mali driver itself?
..

Hi, derekdhaas
about build sunxi-mali driver.
It is depend on kernel source tree and your build method (cross compile or build in the A20 board)

I am use "Cross compile" and Using the following two methods.
1. manual build kernel from github of linux-sunxi linux-3.4
    It is include with Mali driver.
    user space library, please ref https://github.com/linux-sunxi/sunxi-mali
    I use
make config ABI=armhf VERSION=r3p0 EGL_TYPE=framebuffer

2. use buildroot build system
    It is include support cubieboard2 after buildroot 2013.08
    The package\sunxi-mali will auto build depnd on select config.
    Because linux-sunxi linux-3.4 is mali r3p0 kernel module.
    So I choose BR2_PACKAGE_SUNXI_MALI_R3P0.

Above is my experience, hoping to help you,
and thanks your directfb egl information, I will study it.
By the way, QT5 seems only eglfs platform is workable in the cubieboard2 without X11.

Note:
I have been tested lichee linux-3.3 with QT4.8.4 + directfb, but no mali support.
Because lichee is use arm-linux-gnueabi-gcc and I couldn't found armel Mali user space library.
So I try to use linux-sunxi linxu-3.4 and https://github.com/linux-sunxi/sunxi-mali has
corresponding user space Mali library.

Matt.


Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 14, 2013, 07:29:03 am
Hi guys,

I've decided to move on to ssvb's optimizations and based on mattli's efforts, I'm currently one step shy of Qt5 on Cubie2, framebuffer mali r3p2-01rel2

Slightly different / maybe simpler than mattli's steps,

I took the sunxi-bsp approach from the FirstSteps guide and build a custom SD card:

- The easy option: sunxi-bsp
- linaro rootfs (linaro-precise-alip-20121124-519.tar.gz)
- linaro gcc (gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2)

- Once I had the SD card working (it's just a couple of commands, supply the SD card, wait, and the card is produced), I tested it on Cubie2 and it worked fine

- then I pulled ssvb's modified 3.4 kernel from git and built it:

- First Steps Guide -> The flexible option: manual build and installation -> Building the kernel (just this bit)


make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j5 uImage modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install


- then I inserted the SD card on my laptop again and copied the uImage built on ssvb's modified kernel sources AND the /lib/modules/ and /lib/firmware dirs that were generated

SD card back on Cubie, fired it up, it booted normally, stopped lightdm/X and removed the service from boot and then the mali libs:

- cloned the sunxi-mali git on Cubie
- make config VERSION=r3p2-01rel1 ABI=armhf EGL_TYPE=framebuffer
- manually corrected the lib/mali/Makefile.split (replace 8 spaces with TAB space) - otherwise, the make install step fails
- make
- sudo make install
- cd test
- make
- ./test

linaro@linaro-alip:~/sunxi-mali/test$ ./test
EGL Version: "1.4 Linux-r3p2-01rel2"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness "
Surface size: 480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map "
linaro@linaro-alip:~/sunxi-mali/test$


And a nice gradient coloured triangle on the framebuffer. I think it still has the 10min blank screen issue, I'll have to fix that next.

And afterwards, going with Qt5 - I've been trying to cross-compile Qt5 instead of native building... if anyone has had any success with it, please write here as well!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 14, 2013, 07:55:20 am
Disabling lightdm/X on boot seems to be accomplished by removing/renaming /etc/init/lightdm.conf

For the 10min issue, I'm using the uEnv.txt parameters from the link derekdhaas posted http://www.cubieforums.com/index.php/topic,838.msg4910.html#msg4910

extraargs=disp.screen0_output_mode=1280x720p60 consoleblank=0
Title: Re: Qt5 build for cubieboard
Post by: patwood on October 14, 2013, 10:16:34 am
Quote from: wickwire on October 14, 2013, 07:55:20 am
Disabling lightdm/X on boot seems to be accomplished by removing/renaming /etc/init/lightdm.conf


You can disable any init script by appending the line

manual

to the .conf file.  Then if you want to run it manually, just do

start lightdm

as root.
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 14, 2013, 08:51:42 pm
Quote from: wickwire on October 14, 2013, 07:29:03 am
...
And afterwards, going with Qt5 - I've been trying to cross-compile Qt5 instead of native building... if anyone has had any success with it, please write here as well!


Hi, wickwire:

     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.

Source code -
http://quitcoding.com/download/Qt5_CinematicExperience_rpi_1.0.tgz (http://quitcoding.com/download/Qt5_CinematicExperience_rpi_1.0.tgz)

Matt.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 15, 2013, 06:20:59 am
Hi mattli,

Haven't managed to build Qt 5.1.1 yet, I've been trying to cross-compile it and save us some time, but I'm currently stuck at

/opt/qt5.cubieboard2A20.workbench/cubie2-rootfs/usr/lib/arm-linux-gnueabihf/libz.a: could not read symbols: Bad value
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 15, 2013, 09:40:05 am
I've managed to successfully build Qt 5.1.1 using cross compile, and then running the QtCinematic Demo I got to my old error:

EGL Error : Could not create the egl surface: error = 0x300b

I'm going to check mattli's notes now - probably the EGLFS patches or something
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 15, 2013, 10:03:28 am
mattli, are you still working with the  qt5base-eglfs-native-window.patch?

which platform on the framebuffer are you using with Qt: eglfs? Can you share your Qt5 configure line?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 15, 2013, 12:21:44 pm
Finally, Qt5 cross compiled and the Cinematic Demo running on framebuffer @~85fps

mattli: I'm not experiencing the tearing of the sun orb at the bottom I don't think, but on the other hand, the mouse cursor is drawn but doesn't work.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 15, 2013, 02:19:43 pm
Ok, so on my side, at this point I have ~85FPS on either 720p or 1080p, by ajusting the script.bin file (convert to fex, edit, generate new bin)

The system locks up after a few minutes in, running the QtCinematic Demo (720p/1080p)

I think I did manage to notice the tearing you were talking about mattli, although very slightly

In spite of having the high FPS, I sense that the particles animations (the sunny orb) aren't fluid, the animation seems to stutter a bit

I don't have mouse - I have the cursor being drawn on screen but can't use it in the app

Once I have the chance, I'll post the steps I used.
Title: Re: Qt5 build for cubieboard
Post by: 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).
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 15, 2013, 02:36:22 pm
Update: correcting the values for the resolutions:

Running the QtCinematic Demo as root gives me mouse access:

At 720p, I'm getting:


~85FPS with everything ON
drops to around 50FPS when dropping the animated text scroll banner

~150FPS with everything OFF


At 1080p, I'm getting:


~45FPS with everything ON
drops to around 30FPS when dropping the animated text scroll banner

~80FPS with everything OFF
Title: Re: Qt5 build for cubieboard
Post by: 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.)?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 16, 2013, 04:48:27 am
Of course, but before that I'll just try to build the accelerated browser, I'm just cleaning up the software and steps and will post ASAP
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 16, 2013, 07:45:11 am
Update:

Added a tar.bz2 archive containing the linux-cubieboard2-g++ and qeglfshooks_stub.cpp I used

Update #2:

Getting the mouse working with the default user rather than root: /dev/input/mice in my case, and I set some udev rules to set read permissions on it, for a new "mouse" group - and added my regular "linaro" user to that group.

Letting go of "-platform eglfs" : if your system also has /etc/environment, edit that file and add the line below and reboot

QT_QPA_PLATFORM=eglfs



Ok, so based on the previous steps:





If all goes well, the cross-compile binary and qml files will be loaded to Cubie and executed. If upload fails with permissions, just grant permissions on /opt/ on the running cubie

if the demo starts up, you get a mouse pointer but can't move it around, stop the run execution on Qt Creator, login to Cubie and run the app locally - as root:

cd /opt/QtCinematicDemo/
./CinematicDemo -platform eglfs

And that should be all there is to it! :)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 16, 2013, 08:28:00 am
mlbrowser built ok, but when running as described in the github wiki, the screen remains blank.

I then compiled the fancy browser from the qtwebkit-examples and that one worked. I'm able to browse the web, but with not much fluidity where animations are concerned.

Still getting unstable behaviour, the apps crash after a few minutes:

EGL Error : Could not create the egl surface: error = 0x3003
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 16, 2013, 09:35:45 am
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.
Title: Re: Qt5 build for cubieboard
Post by: 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?
Title: Re: Qt5 build for cubieboard
Post by: mattli on October 16, 2013, 08:53:02 pm
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.


   

Title: Re: Qt5 build for cubieboard
Post by: 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.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 17, 2013, 02:00:21 pm
Quick note guys, I've updated and corrected a previous post of mine on this thread,
regarding FPS measurements @720p and @1080p.

Title: Re: Qt5 build for cubieboard
Post by: hubaiz on October 26, 2013, 04:24:58 pm
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.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 26, 2013, 05:45:44 pm
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...

Title: Re: Qt5 build for cubieboard
Post by: hubaiz on November 01, 2013, 03:52:15 am
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
Title: Re: Qt5 build for cubieboard
Post by: nima on November 03, 2013, 08:59:31 am
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?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on November 03, 2013, 09:49:03 am
Did you run the fixLibraryPaths script?
Title: Re: Qt5 build for cubieboard
Post by: nima on November 05, 2013, 07:59:11 am
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...
Title: Re: Qt5 build for cubieboard
Post by: ssvb on December 17, 2013, 01:23:56 am
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?
Title: Re: Qt5 build for cubieboard
Post by: jeremychild on December 17, 2013, 02:54:53 am
I have a Merrii Hummingbird A20 kit and im trying to get Qt5 working on it too :(
Title: Re: Qt5 build for cubieboard
Post by: corq on December 27, 2013, 04:08:46 pm
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.



Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 28, 2013, 07:14:44 pm
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!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 28, 2013, 09:21:02 pm
Just a quick update, both my cubieboards A10 and A20 are being used in other projects at the moment, so I've taken the opportunity to order a cubietruck which I'm planning on using just for this issue of Qt5 in cubie.

I've also taken a look at merri hummingbird, but the website isn't properly maintained, lacks software/documentation and the BBS is just nonsense.

Hummingbirds/cubietrucks out there trying to make this work, let us know how it goes for you as well!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 29, 2013, 09:17:08 am
Hi guys, I'm getting reports from box.com on download activity already - just a quick reminder, this free account has the following limitations:

- 250MB file size limit (hence the split zip archives)
- 10GB monthly traffic quota (download only, I think)

All uploaded resources sum 2.3GB in size, so I'm guessing around 4x downloading until this account is tapped out this month. If any of you happens to have better cloud storage solutions, feel free to re-host the files yourself and help the development, and post your links on this thread as well.

Title: Re: Qt5 build for cubieboard
Post by: ikeeki on December 29, 2013, 06:33:34 pm
http://dl.cubieforums.com/ikeeki/IMAGES/linaro.1211.ssvb.malifb.Qt511.QtWebkit.zip (http://dl.cubieforums.com/ikeeki/IMAGES/linaro.1211.ssvb.malifb.Qt511.QtWebkit.zip)

;)
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on December 30, 2013, 02:38:46 am
If you know better way of folder organization for future releases or developement (other folders or whatever), tell me. The best thing would be you ask for a folder in ftp side of cubieforums to admin though
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 30, 2013, 04:46:57 am
Thank you for the support, I don't know how we will proceed from this point, I think that suggestions are most welcome in terms of repo structure while we wait for feedback from whoever is available to test this on their devices.

I think we have several paths at this point, which may be worth exploring:

- testing the cross compile setup with Mali libraries on both framebuffer and X environment (haven't got the X part working yet because I focused more on framebuffer)

- testing a working compile setup on similar hardwares from the AllWinner family and from the cubieboard project mainly

- providing a fast way for app developers to try out more recent versions of Qt5 on Cubieboard, apply any tweaking, etc. - I know there are very good and better projects out there like Mer and Hemera and possibly more but my idea was to have a means to control the whole environment, from SD Card generation to Qt5 build up on cross compile (and use a Debian based distro, as a personal preference of mine)

I will attempt to repeat the whole process for Qt 5.2 community version on the cubietruck once I have it, might be a good next step if it works OK.

Title: Re: Qt5 build for cubieboard
Post by: ikeeki on December 30, 2013, 06:05:20 pm
Hello  ;D

Quotedownload 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


I did:
dd if=/home/ikeeki/Desktop/linaro.1211.ssvb.malifb.Qt511.QtWebkit.img  of=/dev/sdb bs=1M ; sync

2 penguins appear fast and for a second some text I cannot read (really fast, less than a second.)
Then my 2LG screens turn off.

I'll rewrite the .img, maybe a bad flash.

(http://i39.tinypic.com/2wlrjf7.png)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 30, 2013, 06:20:49 pm
Ok... did you attempt to access the system over ssh, in spite of the screen turning off? I will download the zip again and decompress it here, burn the image on another card and load it to see if there's something wrong with the image, I'll post back as soon as possible!
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on December 30, 2013, 06:31:01 pm
root@ikeeki-Extensa-5635Z:/home/ikeeki# sha1sum /home/ikeeki/Escritorio/linaro.1211.ssvb.malifb.Qt511.QtWebkit.img
cdfb91e747eb12409b9ffc01b2b26d9fe378e80a

yes ssh I do have access
BTW, the tv does not turn off with remote control when HDMI is connected and cubie is on  :-* (do not worry I'm not the classical hater who gives up easily XD)
(http://i39.tinypic.com/xbm1d.png)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 30, 2013, 06:36:40 pm
Ok, if you have ssh access then the image shouldn't be corrupted - I didn't include X as this is framebuffer only, but the reason why the screen is blanking might be from some option being set up on the fex file - maybe my TV screen has other refresh/resolution specs than yours...!

Also, if possible, connect a usb keyboard to cubie, boot it up, let the screen go blank, confirm again that ssh connection works - and then, using the usb keyboard, press Space or Enter/Return to check if for some reason, the login prompt shows up on screen.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 30, 2013, 06:38:40 pm
In any case, I'll attempt to load everything from the posted zip tomorrow and make sure that everything works (or not) and post back!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 30, 2013, 06:44:00 pm
Also, just to make sure, I never bothered much with local access to it - I would always access via ssh - and when running Qt5 Cinematic Experience using Qt Creator on the x64 host, once you deploy the app to cubie, it should display the app properly on framebuffer. To run the app without using Qt Creator, once it has been deployed, I would do it over ssh as well, and if to be left running, I'd use screen over ssh and detach the terminal running the app!
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on December 30, 2013, 06:51:52 pm
QuoteAlso, if possible, connect a usb keyboard to cubie, boot it up, let the screen go blank, confirm again that ssh connection works - and then, using the usb keyboard, press Space or Enter/Return to check if for some reason, the login prompt shows up on screen.

checked, no luck  :)

QuoteIn any case, I'll attempt to load everything from the posted zip tomorrow and make sure that everything works (or not) and post back!


Keep on the great job dude, I'll be waiting ¡¡¡

Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 31, 2013, 03:51:36 am
As a wise man once said, "It's not a bug, it's a feature..." - having achieved the proposed goals with Qt5, I started tinkering with the boot process - the quietest boot possible and no tty interaction.

This shouldn't affect Qt5 cross compiled APP deployment and the modifications to the boot process and tty interaction, and it should all be reversible using the ssh access.

I'll have a look as soon as possible but as stated, Qt5 shouldn't fail over this.

Once I get the cubietruck and manage to upgrade the environment to Qt 5.2, I will skip these boot configs.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 31, 2013, 06:55:28 am
I've managed to test everything once again on my Cubieboard A20:

- After powering on Cubie, the screen remains black and no keyboard interaction is accessible (discussed above)

This is as far as cubie2 steps go.
From this point on, it's all done on the x64 host.

- On the x64 Linux host:

- copied the qt5cb2 directory over to /usr/local/qt5cb2
- mounted the linaro.1211.ssvb.malifb.Qt511.QtWebkit.img:

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

You'll need to mount the cubie linaro img on the x64 host, it is required by qmake

-- Download the Qt Creator IDE, I've been using 2.8.1 (http://download.qt-project.org/official_releases/qtcreator/)
-- Tools > Options > Build and Run > Compilers Tab

Add the linaro GCC
/<path>/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++

-- tab on the left, "Qt Versions":

Add the cross-compiled qmake binary:

/usr/local/qt5cb2/bin/qmake

-- tab on the left, "Kits"

Add the device with ssh credentials linaro/linaro
Add the Qt Version
Add the Compiler

Apply and that's it. There shouldn't be any error symbols, if any, try mounting the img against the actual path "/opt/qt5.cubieboard2A20.workbench/cubie2-rootfs/" I'm unsure if the pre-built qmake will be picky in going for the libraries at that specific location

Final Step - QtCinematicExperience, building and deploying

Create a new Project like this:

File > New File or Project > "Choose a Template" > Applications > Qt Quick 2 Application (from Existing QML File)

Set the project location - choose whichever location suits you -and then import the Qt5_CinematicExperience.qml from the Qt5_CinematicExperience decompressed directory. It will import all other files to your project.

Qt5 Cinematic Experience RPi is done by the folks at the Quitcoding website.

Click on the Release button on the bottom LEFT, confirm all information and choose either Debug or Release (I went with Release)
Click on Run (the green play button) on the bottom LEFT.

The application will build and Qt Creator will attempt to deploy it over to cubie and run it remotely.

If it fails over permissions on Cubie, adjust as needed by using ssh and logging into cubie2. As soon as I did this, the screen took a few seconds to activate and QtCinematicExperience is now running, 1920x1080@60Hz on my Samsung LCD LE19C350D1W, getting ~50FPS on the app main screen (reducing resolution increases framerate).

From this point on, the app is already deployed so you can also shut it down on Qt Creator and run it directly over ssh:

linaro@linaro-alip:/opt/CinematicCubie/bin$ ./CinematicCubie
EGLFS: Unable to query physical screen size, defaulting to 100 dpi.
EGLFS: To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).

The App is now running again ;)

Happy New Year Everyone!
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on January 01, 2014, 07:23:28 am
I'm on that, thanks for the minitutorial
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on January 01, 2014, 07:58:01 am
Is this normal (version 3.0)???

(http://i40.tinypic.com/35d7x1s.png)


(http://i42.tinypic.com/25z5bw2.png)

I can add the device without problems.

EDIT too much wine last night, it is the .zip what I took as compiler
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 01, 2014, 08:52:14 am
Ahhhh ok ok, yes you must decompress the compiler archive and add this specific binary to the config:

gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 01, 2014, 09:02:21 am
To change the current resolution, I used bin2fex and fex2bin:

http://linux-sunxi.org/Manual_build_howto#Building_script.bin
used the information on this guide:
http://linux-sunxi.org/Fex_Guide#disp_init_configuration
adjusted the main qml file in Qt Cinematic Experience for the same resolution
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 07, 2014, 09:24:53 am
My Cubietruck has already arrived a few days ago, so far I've only managed to recreate the linaro SD Card image and get it running:

- use all 2GB of RAM
- use VGA instead of HDMI (I'll be working on VGA with this one)
- ssvb's kernel is already running on it > https://github.com/ssvb/linux-sunxi/tree/20131226-mali-r3p2-01rel2

Next up I'll try to have the mali libs working on it, like on Cubieboard 2 and then cross-compiling Qt5 and see where that leads...

If/once I get decent results for Cubietruck, I'll generate a new image and upload it to the FTP.
Title: Re: Qt5 build for cubieboard
Post by: corq on January 08, 2014, 05:39:25 am
Wickwire, thanks for your post -- I too will be looking to get Qt5 working on the CubieTruck and will follow your adventures!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 08, 2014, 05:58:56 am
Hi guys, I've been at it with Cubietruck:

- building the SD card image with ssvb's kernel works, I get a bootable system
- installing the framebuffer Mali libs on top of that, isn't working properly: when I run the test binary from the mali libs, I get the text output on screen but no triangle.

Checking with ssvb I found out there's issues with the Mali X libs and the 2GB RAM on Cubietruck, there's a thread on this:

https://github.com/ssvb/xf86-video-fbturbo/issues/27

Still, this issue should only concern Mali libs on the X environment, not framebuffer.

My SD Card has a corrected u-boot for accessing the full 2GB RAM on Cubietruck as well as 480MHz Clock speed for the dram on the script.bin. I'm also working with VGA this time, not HDMI.

As soon as I can I will revert the RAM clock speed back to 432MHz and test again, and if it maintains, I will revert the u-boot config and return to 1GB RAM.

I will try to find out which configs were used in the thread above where it worked properly on framebuffer.

Once the mali libs are working properly and we get the coloured triangle, then I'll move on to cross-compiling Qt 5.2.

qorq: if you already managed to get the mali libs working on framebuffer, let me know your settings.
Title: Cubietruck Success!!
Post by: wickwire on January 08, 2014, 06:39:35 pm
corq: it's working on my cubietruck!

I recorded 3 videos, curently uploading them to https://app.box.com/s/lktezsehu2ju9vte8if8
I used the previously shared cubieboard2 image, just burned it to an 8GB microSD card and then reinserted the card on my PC and made the following changes:

1) Replaced the existing script.bin with a cubietruck VGA config (should also work with HDMI) - I've placed both script.bins on the link above
2) Edited the uEnv.txt file and removed everything past the consoleblank=0 parameter (kept that one)

That's it, booted the cubietruck, then jumped to tty3 > Ctrl+3 to type in the commands.

Since this image was created after deploying and running the cross-compiled QtCinematicExperience, it is already included!

Just go to /opt and run it with -EvDevPlugin Mouse to get usb mouse support!

Note: I configured VGA at 1024x768 in the script.bin, so the values I'm getting should be for that resolution
Note 2: total RAM is 1GB since this image was cubieboard 2 oriented, so no 2GB ram patches included.

So basically, my previously shared setup also works on cubietruck, but there's stil tweaking to be done(2GB RAM and whenever possible, cross-compiling the latest stable Qt).

Let me know how it goes for you with this!
Title: Re: Qt5 build for cubieboard
Post by: corq on January 08, 2014, 07:24:26 pm
Sweet! I'll try to get it going for this weekend; I'm a bit a.d.d and new to kernel stuff so I get lost pretty easily but I'll sit down with this and give it a go, will let you know how I do, thanks for the feedback! ;-)

Short story: I need Qt5 to produce the waterfall for a radio/shortwave app waterfall output; ironically I'll be running the CT mostly headless  as a server for an SDR but the QT libraries have to be built for the server to produce the output for streaming clients to connect to. This works perfectly on x86 but is fickle on arm devices and heavily dependent on Qt5 not flaking out (segfaults, usually).

I'll prep a clean image and then one from what you guys have build and step though the process.

Thanks for your work!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 09, 2014, 05:36:56 am
That's a cool project. One thing I noticed by using this Cubieboard 2 image on Cubietruck is that the activity LED on CT is yellow/orange, whereas all the other attempts using more recent sources when generating the SD Card Image, activate a blue activity LED on the device.

This Cubieboard 2 SD Card image was generated around last October I think and includes:

https://releases.linaro.org/12.11/ubuntu/precise-images/alip
https://github.com/ssvb/linux-sunxi/tree/20130913-mali-r3p2-01rel2
http://download.qt-project.org/official_releases/qt/5.1/5.1.1/single/qt-everywhere-opensource-src-5.1.1.tar.gz

For framebuffer usage alone, I'll be attempting to generate CubieTruck specific images, including the 2GB RAM usage fixes, and hopefully do it with these versions:

https://releases.linaro.org/13.12/ubuntu/saucy-images/server
https://github.com/ssvb/linux-sunxi/tree/20131226-mali-r3p2-01rel2
http://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz

I'll be attempting to cross-compile Qt 5 for CubieTruck for newer versions of Qt, and later on using the X Mali libs as well.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 10, 2014, 04:21:12 am
I've built a stock Linaro 12.11 SD Card Image for CubieTruck, using the board support package (BSP) method. No 2GB u-boot or RAM Clock modifications.

I burned the image to an SD Card and copied over the previously compiled kernel uImage and modules from https://github.com/ssvb/linux-sunxi/tree/20131226-mali-r3p2-01rel2.

Booting the CubieTruck, I set eth0 with DHCP and got LAN/WAN access. Xorg also started and the window manager showed up as normal.

I switched to tty1 and followed the guide for the Sunxi Mali Binaries:

http://linux-sunxi.org/Binary_drivers

make config VERSION=r3p2-01rel1 ABI=armhf EGL_TYPE=framebuffer
make

make install
(Needed to edit the Makefile.split file and replace all indentations from 8 spaces to TAB)

Then I descended to test and make and ./test - I got the verbose output but no triangle.

So, my CubieTruck isn't running the mali libs properly (r3p2-01rel1) with Linaro 12.11 + ssvb linux-sunxi kernel 20131226.

Later I will build ssvb linux-sunxi kernel 20130913 and test again.

If that doesn't work, I'll go another step back, to the BSP SD Card generation procedure, and generate a new SD Card with the Cubieboard 2 profile, and test the kernels, until I get a hit.

To be sure, so far I've only managed to get Mali framefuffer success (r3p2-01rel1) on CubieTruck, using a Cubieboard 2 BSP generated image, from Linaro 12.11 rootfs and ssvb kernel 20130913.

Title: Re: Qt5 build for cubieboard
Post by: ikeeki on January 10, 2014, 09:02:21 am
Congratulations for your work, as you can see I have not been able to do much until now as I have lots of problems (and lack of knoledge) in understanding cubieboard propietary partitioning, wich has been too much time consuming.
:)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 10, 2014, 10:28:51 am
Well, I tried generating SD Card images from scratch, using the manual procedure (building kernel, building u-boot, grabbing rootfs and bundling everything together) but somehow in my case it wouldn't work properly in the end, the cards wouldn't boot - so I decided to use the BSP approach.

I'm still trying to figure out why the mali libs on framebuffer aren't working for the new images I'm creating, but hopefully something will work soon.

After that I will still need to enable all the RAM and move on to building Qt, I'd like to get there soon!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 14, 2014, 05:21:16 am
I've been trying to generate new SD Card images in order to have mali r3p2-01rel1 working from scratch on Cubietruck. So far, no success. The procedure in making the SD card images that I'm using is pretty straight-forward, just a refresh in the steps:

- I'm following the Sunxi BSP method on my x64 host, using a linaro ubuntu alip rootfs:

http://linux-sunxi.org/BSP

The script checks out from git the latest sunxi 3.4 kernel sources, the u-boot sources, and a few other resources. Then by setting up the device using ./configure, the automated build scripts apply configurations specific for that hardware, the kernel is built, the u-boot is built and the SD Card image is generated.

Once I have the stock SD Card Image for Cubietruck, two things to note:

1) only 1GB RAM available to the system
2) mali kernel support not compliant with mali libs r3p2-01rel1

At this point, I check out from git a series of sunxi kernel variants: ssvb_20130913, ssvb_20131226, cubieboard linux-sunxi...

I cross-compile these kernels using the manual steps from the sunxi wiki:

http://linux-sunxi.org/Linux_Kernel#Compilation

Configure, Build, Install. This generates the uImage, modules and firmware files. This should only be done once.

Plugging the SD Card back on the linux host, it is just a matter of  copying the uImage to the boot directory and the modules and firmware to the /lib sub-directories.

If needed, I make the script.bin file on the boot dir editable, using the sunxi-tools that BSP pulls from git > bin2fex, fex2bin.

As soon as I have the new uImage in place, the modules and firmware dirs, I boot up cubietruck and try to build, install and test the mali libs:

http://linux-sunxi.org/Binary_drivers

Following these steps, so far I have been able to set 2GB RAM by modifying the u-boot source code, I have been able to obtain ethernet working and IP connectivity using sunxi_gmac (ssvb 20131226) but still no triangle being drawn, just the verbose output from the test app in sunxi-mali.

Taking a different approach, I grabbed the SD Card image I generated last October for the Cubieboard2 which has mali r3p2-01rel1 working + Qt 5.1.1 and edited it:

- changed the script.bin file for cubietruck
- copied over kernel, modules and firmware from previously one-time compiled ssvb 20131226 kernel sources

This way, I get ethernet working with sunxi_gmac, the mali libs r3p2-01rel1 still work and Qt 5.1.1 still works. 1GB RAM only.

At this point, there are 2 main issues to check:

1) using this older, working image, cross-compile Qt 5.2 and see if the procedure works once again, upgrading Qt
2) keep testing the SD Card generation from scratch. From what I've confirmed, it should be something related to either u-boot sources since I'm basically copying the same one-time built kernel uImages/modules between newly generated images and the older image.
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on January 14, 2014, 09:42:03 am
Where would you say you are from a bootable sdcard img with qt5 working, wickwire?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 15, 2014, 05:25:45 am
At the moment, I have:

- Cubieboard 2 + Qt 5.1.1 on Framebuffer
- Cubietruck + Qt 5.1.1 on Framebuffer

Cubieboard 2:

ssvb 20130913 kernel, linaro 12.11 rootfs, Qt 5.1.1, mali libs r3p2-01rel1 framebuffer, and a cross-compile environment where you develop the Qt5 apps on the x64 linux host with Qt Creator and deploy to Cubie.
It's the files I've uploaded to my box.com account and to the FTP account you generously supplied

Cubietruck:

Uses the Cubieboard 2 image above; copied over the ssvb 20131226 kernel and got ethernet working; Only 1GB RAM used by the system

If anyone wants to develop with Qt5 on framebuffer using Cubieboard 2 or Cubietruck, using the supplied files will get you that.

Next steps, upgrading the solution:

1) Upgrade to Qt 5.2 (cubieboard 2 + cubietruck)
2) Get 2GB RAM working on Cubietruck
3) Generate working SD Card images from scratch for both devices, instead of using just the one I have working

Step 1) should be accessible, the steps are available on this thread for anyone to try
Step 2) I'm not very hardware/kernel hacking savvy, so I'll probably test whichever patches the community supplies over time
Step 3) the same as 1), possibly it might require additional development for cubietruck

Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 15, 2014, 11:22:31 am
https://www.youtube.com/user/heimdall2099

includes video captures of mali r3p2-01rel1 on framebuffer and Qt 5.1.1 on Cubietruck
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 15, 2014, 06:49:37 pm
Cross-compilation for Qt 5.2.0 was successful, but running a qt5 app on Cubietruck returns

EGL Error : Could not create the egl surface: error = 0x300b

This was stock stable Qt 5.2.0 ( http://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/ ) without the qeglfshooks_stub.cpp modified version for EGL, which fixed this issue in 5.1.1.

It seems that the issue stills persists on 5.2.0, I'll check 5.2.0 qeglfshooks_stub.cpp and patch it with the changes I had for 5.1.1 and see if that solves it.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 16, 2014, 07:51:25 am
Fixed - Qt 5.2.0 cross-compiled and working on Cubietruck:

Modified qeglfshooks_stub.cpp for 5.2.0, only needed to modify EGLNativeWindowType QEglFSHooks::createNativeWindow like in 5.1.1:

EGLNativeWindowType QEglFSHooks::createNativeWindow(QPlatformWindow *platformWindow,
                                                    const QSize &size,
                                                    const QSurfaceFormat &format)
{
    Q_UNUSED(platformWindow);
    Q_UNUSED(size);
    Q_UNUSED(format);
    //return 0;

    static struct mali_native_window native_window = {
        .width = (short unsigned int)size.width(),
        .height = (short unsigned int)size.height(),
    };
    return &native_window;
}

Qt 5.2.0 cross-compiled without errors like before, but this time around, like in 5.1.1, the cross-compiled QtCinematicExperience app ran successfuly!

Uploaded 2 new videos to the Youtube Channel with the results:

https://www.youtube.com/user/heimdall2099

Haven't tested these cross-compiled libraries on Cubieboard 2 yet, should work as well though - since the 5.1.1 previously cross-compiled libs also worked out of the box on cubietruck.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 19, 2014, 02:08:43 pm
ssvb released new patches for cubietruck on his github repo, so by using his 20140116 branch, I now have:

- scratch made sd card image using the sunxi bsp method
- linaro ubuntu 13.12 saucy server rootfs
- 2GB ram support
- mali r3p2-01rel1 on framebuffer
- Qt 5.2.0 and corresponding QtWebkit

Webkit isn't working 100%, I'm stuck with QtTestBrowser starting and drawing the browser window and then segfaulting, but QtCinematic Experience is working fine.

I'll post images and files whenever possible, my image uses VGA on the script.bin config so you might need to adjust that. And no blank screen/cursor blinking disable hacks like on the previous set of files for cubieboard 2. Ethernet is working and ssh is already installed.
Title: Re: Qt5 build for cubieboard
Post by: corq on January 22, 2014, 01:35:28 am
Wow, such work! I briefly turned back to work on some of my ODroid stuff, got that settled. I'll try to refocus here and look forward to testing some of your methods.

Congrats on your progress, Wick!
Title: Re: Qt5 build for cubieboard
Post by: mikarvi on January 31, 2014, 09:34:38 am
Thanks Wickwire.. for the steps...It would be a great help if any one here can give give steps to build the QT for cubieboard A10 with X11. I have downloaded QT and tried compiling it with the following error log..

________________________________________________________________________________

compilation terminated.
make: *** [floatmath.o] Error 1
floatmath disabled.
mmx auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -mmmx -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o mmx.o mmx.cpp
g++ -Wl,-O1 -o mmx mmx.o     --sysroot=/home/karthi/cubie_rfs -mmmx
mmx enabled.
3dnow auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -m3dnow -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o 3dnow.o 3dnow.cpp
g++ -Wl,-O1 -o 3dnow 3dnow.o     --sysroot=/home/karthi/cubie_rfs -m3dnow
3dnow enabled.
sse auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -msse -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o sse.o sse.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:38:0,
                 from sse.cpp:42:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h:27:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
                    ^
compilation terminated.
make: *** [sse.o] Error 1
sse disabled.
sse2 auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -msse2 -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o sse2.o sse2.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:38:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:35,
                 from sse2.cpp:42:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h:27:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
                    ^
compilation terminated.
make: *** [sse2.o] Error 1
sse2 disabled.
sse3 auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -msse3 -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o sse3.o sse3.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:38:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/emmintrin.h:35,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/pmmintrin.h:35,
                 from sse3.cpp:42:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mm_malloc.h:27:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
                    ^
.....
.....
......
.....

compilation terminated.
make: *** [odbc.o] Error 1
ODBC disabled.
iODBC auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o iodbc.o iodbc.cpp
iodbc.cpp:42:17: fatal error: sql.h: No such file or directory
#include <sql.h>
                 ^
compilation terminated.
make: *** [iodbc.o] Error 1
iODBC disabled.
PostgreSQL auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o psql.o psql.cpp
psql.cpp:42:22: fatal error: libpq-fe.h: No such file or directory
#include "libpq-fe.h"
                      ^
compilation terminated.
make: *** [psql.o] Error 1
PostgreSQL disabled.
SQLite2 auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o sqlite2.o sqlite2.cpp
sqlite2.cpp:42:20: fatal error: sqlite.h: No such file or directory
#include <sqlite.h>
                    ^
compilation terminated.
make: *** [sqlite2.o] Error 1
SQLite2 disabled.
unknown SQL driver: sqlite_symbian
unknown SQL driver: symsql
TDS auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o tds.o tds.cpp
tds.cpp:42:22: fatal error: sybfront.h: No such file or directory
#include <sybfront.h>
                      ^
compilation terminated.
make: *** [tds.o] Error 1
TDS disabled.
NIS auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o nis.o nis.cpp
nis.cpp:42:23: fatal error: sys/types.h: No such file or directory
#include <sys/types.h>
                       ^
compilation terminated.
make: *** [nis.o] Error 1
NIS disabled.
Cups auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o cups.o cups.cpp
cups.cpp:42:23: fatal error: cups/cups.h: No such file or directory
#include <cups/cups.h>
                       ^
compilation terminated.
make: *** [cups.o] Error 1
Cups disabled.
POSIX iconv auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o iconv.o iconv.cpp
iconv.cpp:45:19: fatal error: iconv.h: No such file or directory
#include <iconv.h>
                   ^
compilation terminated.
make: *** [iconv.o] Error 1
POSIX iconv disabled.
SUN libiconv auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o gnu-libiconv.o ../gnu-libiconv/gnu-libiconv.cpp
../gnu-libiconv/gnu-libiconv.cpp:45:19: fatal error: iconv.h: No such file or directory
#include <iconv.h>
                   ^
compilation terminated.
make: *** [dbus.o] Error 1
D-Bus disabled.
Glib auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -o glib.o glib.cpp
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/syslimits.h:7:0,
                 from /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:34,
                 from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:11,
                 from /usr/include/glib-2.0/glib/gtypes.h:34,
                 from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from glib.cpp:44:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
#include_next <limits.h>  /* recurse down to the real one */
                                                             ^
compilation terminated.
make: *** [glib.o] Error 1
Glib disabled.
ICU auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o icu.o icu.cpp
icu.cpp:42:28: fatal error: unicode/utypes.h: No such file or directory
#include <unicode/utypes.h>
                            ^
compilation terminated.
make: *** [icu.o] Error 1
ICU disabled.
PulseAudio auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -o pulseaudio.o pulseaudio.cpp
pulseaudio.cpp:42:30: fatal error: pulse/pulseaudio.h: No such file or directory
#include <pulse/pulseaudio.h>
                              ^
compilation terminated.
make: *** [pulseaudio.o] Error 1
PulseAudio disabled.
Detecting broken X11 headers... (/home/karthi/Downloads/qt-everywhere-opensource-src-4.8.5/mkspecs/linux-g++ yes /home/karthi/Downloads/qt-everywhere-opensource-src-4.8.5 /home/karthi/Downloads/qt-everywhere-opensource-src-4.8.5)
X11 headers look good.
XLib auto-detection... ()
g++ -c -pipe --sysroot=/home/karthi/cubie_rfs -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I/usr/X11R6/include -o xlib.o xlib.cpp
xlib.cpp:42:22: fatal error: X11/Xlib.h: No such file or directory
#include <X11/Xlib.h>
                      ^
compilation terminated.
make: *** [xlib.o] Error 1
XLib disabled.
Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/karthi/Downloads/qt-everywhere-opensource-src-4.8.5/mkspecs/linux-g++.
______________________________________________________________________________


I have used the following configuration ... I haven't added the device... in the configuration ..

./configure -v -opengl es2  -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /home/karthi/cubie_rfs -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -prefix /usr/local/qt4.8


Could you guys help me to compile the QT for use with QT creator... I like to run the QT for Cubieboard..but the build seems not to use the CROSS_COMPILE...I am missing a lot of config i think...
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 31, 2014, 10:25:26 am
Hi, your procedure seems to have some differences:

- Qt 4.8
- not including any mkspecs for cubieboard 1

I'm not 100% certain because I've done it quite a while ago and in the meantime my Cubie A10 had its HDMI broken, but I believe it is OK to use the device mkspecs I've published for A20.

Also apart from that, make sure you've read all previous posts in the thread, as there are some important steps to be taken, such as:

- using ssvb's kernel if you're going for mali r3p2-01rel1
- using linux as a cross-compile host
- using cross-compile tools to adjust library paths on your mounted cubieboard image, at the cross-compile host
- using Qt 5 stable from the links in the thread, not git unless you really have to
Title: Re: Qt5 build for cubieboard
Post by: mikarvi on February 02, 2014, 05:16:16 am
Hi wickwire,

Thanks for the quick response,
I will use 5.1.1 from your upload.
I have built the BSP with linaro-precise-alip-20121124-519.tar.gz rootfs.
I was able to boot the board and check the display. Its fine..
Yes, I didnt use the cubieboard2 settings , will try it out and reply,,

using ssvb's kernel if you're going for mali r3p2-01rel1 ---> I am using the 3.4 kernel from the sunxi git
- using linux as a cross-compile host --> Yes I am using with Kubuntu 13.04 x64..as a host.
- using cross-compile tools to adjust library paths on your mounted cubieboard image, at the cross-compile host.. I am using the same toolchain that i used to build the live suit image... How do i add the library path from the mounted image where should I add the CC_FLAGS -L /home/user/cubie_rfs/lib or some thing please advice..Should i add any environment variable, or specify the path during the QT build.
- using Qt 5 stable from the links in the thread, not git unless you really have to  --> will switch to 5.1.1. varient from your upload..

Thanks,
Regards,
Karthi
Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 02, 2014, 05:33:11 am
Do the Mali libraries work already? Are you able to display the coloured triangle?

If so, I guess it is safe for you to move on to Qt, if not, grab ssvb's kernel instead.

Cross-compiling Qt should only require a valid GCC, the SD card image you made and the mkspec files, to be included in qtbase.

I didn't set any other properties/variables, except using the cross-compile tools "fixLibraryPaths" script. It will correct any paths in the SD card image.
Title: Re: Qt5 build for cubieboard
Post by: mikarvi on February 02, 2014, 05:55:02 am
Will try the rotating triangle , But on the safer side I will download the r3p2-01rel1 and build it along..
https://github.com/linux-sunxi/sunxi-mali-proprietary/tree/master/r3p2-01rel1

I havent used fixLibaryPaths scripts .... Will try it out..

Thanks again wickwire..for the support..
Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 02, 2014, 06:01:17 am
no problem - and it's just a simple coloured triangle - if you have that, then it means the mali libs are working! :)
Title: Re: Qt5 build for cubieboard
Post by: mikarvi on February 02, 2014, 06:47:06 am
Hi,
Now, after seeing the mkspecs/devices/linux-cubieboard2-g++ in the qt base, I get to see how to configure the QT for a device spec...
Quote from: wickwire on February 02, 2014, 05:33:11 am

Cross-compiling Qt should only require a valid GCC, the SD card image you made and the mkspec files, to be included in qtbase.

I didn't set any other properties/variables, except using the cross-compile tools "fixLibraryPaths" script. It will correct any paths in the SD card image.



Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 02, 2014, 06:54:08 am
And if you're going for Qt on framebuffer, you may need to check find and update the qeglshooks_stub file in qtbase

http://www.cubieforums.com/index.php/topic,173.msg9218.html#msg9218

I haven't tried Qt 5.2 on A10, but I expect i would also cross-compile fine.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 26, 2014, 08:25:50 am
Hi, just another quick update, with all the drama happening with forums stealing and what not, I've created a blog and wrote a cleaner guide for this:

http://wickwire2099.blogspot.pt/

Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 06, 2014, 08:29:55 am
Hi,

New release available:

FB-Cubieboard2-Qt-5.2.1

https://app.box.com/s/qll57kyprk5dnfjjr7q5 (https://app.box.com/s/qll57kyprk5dnfjjr7q5)

I'll try to produce a similar one for Cubietruck as soon as possible and then the X11 versions - I'm currently working on the X11 version for Cubieboard 2.

README files included to help set things up - 10GB monthly traffic cap, feel free to re-host the files elsewhere but please redirect users to this discussion thread

README files include all relevant information
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 08, 2014, 07:34:40 pm
New image set release being uploaded to my Box.com account:

Cubieboard 2 / ssvb kernel / mali libraries r3p2-01rel1 / X11 / Qt 5.2.1 Cross Compiled

https://app.box.com/qt5-cubieboard-images
Title: Re: Qt5 build for cubieboard
Post by: abraaleena on March 12, 2014, 08:10:49 am
Quote from: wickwire on March 17, 2013, 03:47:29 pm
Hi,

I've managed to get a little bit further, but not there yet:

- I began by creating a new Linaro image, and building on it step by step:


linaro@linaro-alip:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Linaro
Description: Linaro 12.11
Release: 12.11
Codename: precise
linaro@linaro-alip:~$

linaro@linaro-alip:~$ uname -a
Linux linaro-alip 3.0.62 #1 PREEMPT Sun Mar 17 11:01:45 WET 2013 armv7l armv7l armv7l GNU/Linux
linaro@linaro-alip:~$

linaro@linaro-alip:~$ lsmod
Module                  Size  Used by
8192cu                589350  0
mali_drm                2560  0
drm                   177024  1 mali_drm
mali                  108351  0
ump                    49607  1 mali
sw_ahci_platform        3621  0
linaro@linaro-alip:~$


Following this guide >> http://linux-sunxi.org/Binary_drivers

- Only concerned with framebuffer for now
- I successfully installed the mali-libs
- I used git and built the sources, didn't use the pre-compiled tarballs
- I successully obtained the coloured triangle on screen
- I used fbi to test framebuffer capability -> successfully displayed an HD image on the TV, from CLI


root@linaro-alip:~/sunxi-mali# apt-get install build-essential autoconf automake make libtool libdrm-dev libdri2-1 libdri2-dev git
root@linaro-alip:~/sunxi-mali# git clone https://github.com/linux-sunxi/sunxi-mali.git
root@linaro-alip:~/sunxi-mali# cd sunxi-mali/
root@linaro-alip:~/sunxi-mali# git submodule init
root@linaro-alip:~/sunxi-mali# git submodule update
root@linaro-alip:~/sunxi-mali# make install
root@linaro-alip:~/sunxi-mali# make test
root@linaro-alip:~/sunxi-mali# apt-get clean
root@linaro-alip:~/sunxi-mali# apt-get install fbi
root@linaro-alip:~/sunxi-mali# wget http://wallpaperspoint.net/wp-content/walls/2_wallpaper_background_01/1920x1080-hd-wallpaper-185.jpg
        root@linaro-alip:~/sunxi-mali# wget http://aroundgirls.com/wp-content/uploads/2014/03/estee-lauder-makeup-2014-for-girls.jpg

root@linaro-alip:~/sunxi-mali# apt-get install directfb* (installed these after testing fbi with the wallpaper)
root@linaro-alip:~# echo 'KERNEL=="mali", MODE="0660", GROUP="video"' >> /etc/udev/rules.d/50-mali.rules
root@linaro-alip:~# echo 'KERNEL=="ump", MODE="0660", GROUP="video"' >> /etc/udev/rules.d/50-mali.rules
root@linaro-alip:~# cat /etc/udev/rules.d/50-mali.rules
KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
root@linaro-alip:~# groups linaro
linaro : linaro adm dialout cdrom audio dip video plugdev admin


(and the output I got on the CLI while running the triangle on the TV):

root@linaro-alip:~/sunxi-mali# test/test
EGL Version: "1.4 Linux-r3p0-04rel0"
EGL Vendor: "ARM"
EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 "
Surface size: 480x480
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
GL Extensions: "GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_EXT_shader_texture_lod "
root@linaro-alip:~/sunxi-mali#




After this point, I installed the directfb libs - so before this point, I already had fbi running, possibly with the kernel framebuffer


root@linaro-alip:~/sunxi-mali# apt-get install directfb*


After these steps, I moved on the Qt5:

I built the git sources setting a new profile based on the beagleboard profile in Qt5 >> qt5/qtbase/mkspecs/devices/linux-beagleboard++
I added the paths for the mali lib and generated soft links for EGL and stuff

Qt5 built OK, and then onwards to the helloworld Qt5 App:


Building on:   linux-g++-64
Building for:  devices/linux-cubieboard-g++
Architecture:  arm, features: neon
Host architecture: x86_64, features: mmx sse sse2
Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
       
qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_XCB QMAKE_CFLAGS_DIRECTFB = -D_REENTRANT -I/opt/qt5.cubieboard.workbench/cubieboard-rootfs/usr/include/directfb   QMAKE_LIBS_DIRECTFB = -ldirectfb -lfusion -ldirect -lpthread   PRECOMPILED_DIR = .pch/release-shared OBJECTS_DIR = .obj/release-shared MOC_DIR = .moc/release-shared RCC_DIR = .rcc/release-shared UI_DIR = .uic/release-shared sql-drivers =  sql-plugins =  sqlite qmake switches .........
Build .................. libs
Configuration ..........  cross_compile qpa largefile neon pcre  minimal-config small-config medium-config large-config full-config evdev xlib directfb linuxfb c++11 accessibility egl eglfs opengl opengles2 shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png freetype system-zlib nis iconv rpath concurrent audio-backend v8 release
Debug .................. no
C++11 support .......... yes
pkg-config ............. yes
Qt D-Bus module ........ no
Qt Concurrent code ..... yes
Qt GUI module .......... yes
Qt Widgets module ...... yes
JavaScriptCore JIT ..... To be decided by JavaScriptCore
QML debugging .......... yes
PCH support ............ no
iWMMXt support ......... no
NEON support ........... yes
IPv6 ifname support .... yes
getaddrinfo support .... yes
getifaddrs support ..... yes
Accessibility .......... yes
NIS support ............ yes
CUPS support ........... no
Iconv support .......... yes
Glib support ........... no
GStreamer support ...... no
PulseAudio support ..... no
Large File support ..... yes
GIF support ............ plugin
JPEG support ........... plugin (system)
PNG support ............ yes (system)
zlib support ........... system
Session management ..... auto
libudev support ........ no
Use system proxies ..... no
OpenGL support ......... yes (OpenGL ES 2.x)
OpenVG support ......... no
XShape support ......... auto
XVideo support ......... auto
XSync support .......... auto
Xinerama support ....... runtime
Xcursor support ........ runtime
Xfixes support ......... runtime
Xrandr support ......... runtime
Xi support ............. runtime
Xi2 support ............ auto
MIT-SHM support ........ auto
FontConfig support ..... no
XKB Support ............ auto
GTK theme support ...... no
SQLite support ......... plugin (qt)
OpenSSL support ........ no
Alsa support ........... no
libICU support ......... no
PCRE support ........... qt
Xcb support ............ no
Xrender support ........ no
EGLFS support .......... yes
DirectFB support ....... yes
LinuxFB support ........ yes
KMS support ............ no



When starting a new project in Qt Creator, a helloworld is automatically generated:
A rectangle with "hello world" written in black, over a white canvas.

Executing the app on the cubieboard directly went like this:

First check my options:


linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform .
Failed to load platform plugin ".". Available platforms are:
directfbegl
directfb
eglfs
linuxfb
minimal
minimalegl

Aborted
linaro@linaro-alip:/opt/helloworld/bin$


Outputs:

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform eglfs
EGL Error : Could not create the egl surface: error = 0x300b

Aborted
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform minimalegl
Opened display 0x1

Initialized display 1 4

Could not create the egl surface: error = 0x300b

EGL error
Aborted
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform minimal
This plugin does not support createPlatformOpenGLContext!
QQuickWindow: makeCurrent() failed...
Segmentation fault
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform linuxfb
Failed to set graphics mode Invalid argument
This plugin does not support createPlatformOpenGLContext!
QQuickWindow: makeCurrent() failed...
Segmentation fault
linaro@linaro-alip:/opt/helloworld/bin$

linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform directfbegl
Failed to load platform plugin "directfbegl". Available platforms are:
directfbegl
directfb
eglfs
linuxfb
minimal
minimalegl

Aborted
linaro@linaro-alip:/opt/helloworld/bin$


linaro@linaro-alip:/opt/helloworld/bin$ ./helloworld -platform directfb

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2008  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-12-05 17:08)
(!) DirectFB/core/vt: Error opening `/dev/tty0'!
    --> Permission denied
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> Initialization error!
(#) DirectFBError [QDirectFBConvenience: error creating DirectFB interface]: Initialization error!
linaro@linaro-alip:/opt/helloworld/bin$

and directFB once more, but as root:

linaro@linaro-alip:/opt/helloworld/bin$ sudo ./helloworld -platform directfb

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.10 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2008  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-12-05 17:08)
(*) Direct/Thread: Started 'VT Switcher' (937) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: axp20-supplyer 0.1 (directfb.org)
(*) Direct/Thread: Started 'Keyboard Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) Direct/Thread: Started 'PS/2 Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Surface: Allocated 1280x720 32 bit RGB32 buffer (index 0) at offset 0 and pitch 5120.
This plugin does not support createPlatformOpenGLContext!
QQuickWindow: makeCurrent() failed...
(!) [  936:    0.000] --> Caught signal 11 (at 0x4, invalid address) <--
(!!!)  *** WARNING [still objects in 'Window Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!)  *** WARNING [still objects in 'Layer Region Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!)  *** WARNING [still objects in 'Layer Context Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
(!!!)  *** WARNING [still objects in 'Surface Pool'] *** [../../../lib/fusion/object.c:241 in fusion_object_pool_destroy()]
linaro@linaro-alip:/opt/helloworld/bin$

(screen on TV flashes white and crashes)




I basically tried all options, root and non-root, no successful results so far.


The G2D_SIZE memory issue:

Another DEV environment separate from this, to test the FEX parameters:

I altered the cubieboard.fex and built a stock image, based on Linaro 12.11 rootfs and using the sunxi-bsp materials. I followed this guide to define a permanent mac address and it works:

http://linux-sunxi.org/WEMAC

With this I got a permanent MAC address on every reboot.

I then tried to alter the memory following the guide, same principle:

http://linux-sunxi.org/Fex_Guide#.5Bg2d_para.5D

specifically, g2d_guide:

16*1024*1024 = 16777216 = 0x1000000
128*1024*1024 = 134217728 = 0x8000000
256*1024*1024 = 268435456 = 0x10000000

I altered this parameter with several values but after rebooting the new images, dmesg always showed the same allocated value: 16MB.

Ok so even if G2D_SIZE isn't the answer, I haven't figured out yet why the changes aren't being enforced - please let me know if you spot the mistakes

As for Qt5... at this point I don't know how to get past the present point... so let me know if you have any ideas as well!

Thanks in advance!
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 13, 2014, 06:20:23 pm
Hi wickwire,

I'm trying to download your files on box platform, but I cannot do it, also using Windows Application.

I think that your are doing a great work with Qt5, I'm going to port it on my cubieboard and your work could help me a lot.

Any ideas about my download issue?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 13, 2014, 07:31:37 pm
Hi,

You don't need a specific box.com app to download any files, I use Linux and download files using just the web browser.

A quick word of advice though: don't try to download all files at once, for example, select all checkboxes... Box will try to generate a compact archive for download, as while that works ok for smaller files, bundling large ammounts of data like that will most likely:

a) stress the box service beyond tolerable, while they're trying to generate a single multi gigabyte archive with all the zips in it

b) keep you waiting forever, while they're trying to build you the bundled zip

My advice while downloading stuff this big, is to download each zip file individually. Start with the READMEs and the SHA1SUMs so that you know what's in there, and also that you may check file integrity for each zip file being downloaded.

I hope this helps.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 13, 2014, 07:33:18 pm
abraaleena:

Yes that was a year ago, since then, fortunately things got a lot better on the subject! :)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 13, 2014, 07:53:50 pm
Quick update:


I'm currently having trouble with my cubietruck, the ethernet port isn't performing well, most of the times the ssh connections stall/drop which is a pain.

The system itself works properly, it's just the networking part that is unstable.

I've been spending some time with it lately trying to figure it out, I would like continue with the end-to-end solutions, from sd card generation all the way to Qt5 cross-compiled libs, but since cubietruck offers more components than cubieboard, I'd also like to have some of the remaining components working, like ethernet, built-in wifi and bluetooth.

I think the instability is somewhat related to whenever I use gigabit networks + ssvb's kernel, so I decided to build cubian kernel sources to see if these other components would work better.

Ethernet did perform better, wifi is still to be enabled and I haven't actually looked at bluetooth yet - also, cubian kernel sources from github seem to only support mali libraries r3p0 at the moment.

I tested the Cinematic Demo with r3p0 on cubietruck recently and the performance is nearly half of what I was getting with r3p2-01rel1 on cubieboard 2, so I made an effort to merge ssvb's mali library imports with cubian sources. And it worked.

In the of the day, I got a cubian system up and running with mali r3p2-01rel1, 2GB RAM and ethernet working in a better fashion.

I will be trying to get wifi up and running and possibly bluetooth as well - so 2GB RAM, ethernet, wifi, bluetooth and mali r3p2-01rel1 will be the base image, and from there I'll rebuild Qt 5 on it and publish the images to box.com.

I hope people are being able to get this to work and it would be great for me to see some Qt5 cool apps popping up on youtube, based on cubie's best performance!
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 14, 2014, 02:49:25 am
I,ve seen your vids, it is incredible work, you deserve the nobel price  :-* :-* :-*
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 14, 2014, 05:32:30 am
Quote from: wickwire on March 13, 2014, 07:31:37 pm
Hi,

You don't need a specific box.com app to download any files, I use Linux and download files using just the web browser.

A quick word of advice though: don't try to download all files at once, for example, select all checkboxes... Box will try to generate a compact archive for download, as while that works ok for smaller files, bundling large ammounts of data like that will most likely:

a) stress the box service beyond tolerable, while they're trying to generate a single multi gigabyte archive with all the zips in it

b) keep you waiting forever, while they're trying to build you the bundled zip

My advice while downloading stuff this big, is to download each zip file individually. Start with the READMEs and the SHA1SUMs so that you know what's in there, and also that you may check file integrity for each zip file being downloaded.

I hope this helps.


Nothing... I cannot download. I tried under Windows, Linux, Internet Explorer, Firefox and Chrome... but nothing.

I click on "download" for "README" file, I get "Download started" message, but nothing happens.

I'm trying to cross-compile on a Cubian Base (not desktop), what I need is only the qmake.spec to verify that I'm making the right thing... but I cannot download it... uff :)

Update:
I tried to download "linux-cubieboard2-g++.tar.bz2" using my smartphone, and I got a warning message saying that you have no more bandwidth and that I cannot download files from your Box.
Can you verify it?

If you want you can upload it on my box: https://app.box.com/s/r80o73ktt35yy9bf3f2t
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 14, 2014, 06:04:34 am
It looks like Box.com caught up with the bandwidth limit. The stats show 10 times the allowed monthly bandwidth already used.

I've set up another account, just with the necessary files to cross-compile Qt5

https://app.box.com/qt5-cubieboard (https://app.box.com/qt5-cubieboard)

Let me know if that one works for you.
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 14, 2014, 06:07:08 am
Quote from: wickwire on March 14, 2014, 06:04:34 am
It looks like Box.com caught up with the bandwidth limit. The stats show 10 times the allowed monthly bandwidth already used.

I've set up another account, just with the necessary files to cross-compile Qt5

https://app.box.com/qt5-cubieboard (https://app.box.com/qt5-cubieboard)

Let me know if that one works for you.


It worked :)

Thank you very much!!!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 14, 2014, 06:33:05 am
Great! I think that it's the box.com way to tell us that the allowed bandwidth has been exceeded. That would be more complicated with the second link as the files only take a few KBs.
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 14, 2014, 06:43:02 am
Wickwire tell me if you need somthing ftp related !
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 14, 2014, 06:43:40 am
I noticed now that Cubian does not include MALI Drivers... I thought it did since Lubuntu distro has them.

I do not want to perform the whole compiling procedure, I think I'm going to apply your steps to Lubuntu.

I will let you know...
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 14, 2014, 07:08:32 am
Regarding Cubian, from what I was able to attest, cubian sources have mali kernel drivers com version r3p0.

If you're willing to have Qt run on cubieboard at about half the performance, then all you have to do is grab a stock cubian image and install sunxi-mali-libs, r3p0 version - and then compile/cross-compile Qt5 on top of that. I will work.

http://linux-sunxi.org/Binary_drivers (http://linux-sunxi.org/Binary_drivers)

If you want to have the proper bang for the buck, then you'll need mali r3p2-01rel1. Installing that version of the sunxi mali libraries on a stock Cubian system will fail, because the cubian kernel sources only support r3p0 at the moment - so you'll have to do some cubian kernel hacking. And it will also work.

For cubieboard 2, I just went with ssvb's branched kernel sources - but for cubietruck, I've been considering Cubian upgraded, simply because I'd like to have most of the remaining hardware properly detected and functional - and that's a bit like stepping out of the main graphics acceleration, Qt5 thing.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 15, 2014, 10:30:54 pm
Hi,

New uploads to the box.com images account:

Cubietruck Base Image for Framebuffer
- merged cubian sources 3.4.79 with ssvb's import for mali r3p2-01rel2
- ethernet, wifi, bluetooth working
- mali r3p2-01rel2 working with the coloured triangle

Cubietruck Qt 5.2.1 for Framebuffer
- based on the above, includes Qt 5.2.1 cross-compiled libraries and QtCinematicExperience included
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 15, 2014, 10:55:43 pm
ikeeki: I think I'll take you up on that offer - although the online storage is growing... for now I'll keep sending files to box.com, but I'll get back to you as soon as possible to upload this stuff somewhere better.

In the meantime and for smaller files, like the mkspecs and patches, I've set up another free account which will hardly hit the month cap I believe, I've also updated previous posts with that info.

Once I'm done with Qt 5.2.1 X11 for Cubietruck I think I'll hold off on generating the images - my cubieboard A10 is busted so I don't think I'll be generating images for that one, but if anyone would like to give it a try and share the images as well, I think it would be awesome.
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 16, 2014, 06:26:38 am
@Wickwire: Pm me when you need  :)
Title: Re: Qt5 build for cubieboard
Post by: Andi on March 17, 2014, 04:43:41 am
Great, i love to see this image on my cubietruck (when downloads are available again).

I will try my clutter based apps later, as well framebuffer and egl based. Now its getting fun.

:-)
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 17, 2014, 05:02:12 am
Let us know when the download will be available again... I can not wait to test Qt5.2.1 on my CubieBoard2 and put the board on my robot running the Qt Communication Server I developed.

I have a question for you: I have a TP-LINK TL-WN722N USB WiFi adapter based on Atheros chipset.
Do you know if the kernel you used supports it?

Thank you
Walter
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 17, 2014, 07:36:12 am
Hi,

Based on this post > http://www.cubieforums.com/index.php?topic=887.msg5333#msg5333

If the driver to be used is ath9k then it is built as a module on cubietruck's cubian variant, I just checked. As for firmware, if required, you'll have to check for it or add it.
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 17, 2014, 07:37:34 am
Quote from: wickwire on March 17, 2014, 07:36:12 am
Hi,

Based on this post > http://www.cubieforums.com/index.php?topic=887.msg5333#msg5333

If the driver to be used is ath9k then it is built as a module on cubietruck's cubian variant, I just checked. As for firmware, if required, you'll have to check for it or add it.

For the CubieBoard2 variant?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 17, 2014, 07:40:52 am
Hi, for the cubieboard2 variant it didn't seem to be included, so you might have to rebuild the kernel image to add it.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 17, 2014, 07:48:32 am
Since my main box.com account with all the images has its monthly traffic limit reached, I thought about an alternative:

On the secondary box.com account, the one with only the mkspecs and patches, you will find a folder named Cubian.A20.Light.Install, one for X11 and another for Framebuffer.

https://app.box.com/qt5-cubieboard (https://app.box.com/qt5-cubieboard)

Basically, the idea is, either if you have a cubieboard A20 or a cubietruck, if you download a stock Cubian image, then you should be able to "install" only the compiled bits to have everything working.
Setting up Framebuffer is slightly simpler than X11. I haven't yet tested the procedure, but it should (hopefully) work.

README included with the high-level actions needed to be taken:


On the embedded.device:

1) Get Cubian image from cubian site - either cb2 or ct
2) Copy over the new kernel image, firmware and modules dirs

3) Install the mali libraries
- follow the guide, I've included the sunxi-mali dir from my install, so just "sudo make install" should work
http://linux-sunxi.org/Binary_drivers
- if X11, sunxifb also included, as well as libdri2 - both have already been compiled, need to be installed with "sudo make install"

4) Copy over the pre-compiled Qt5 libraries
5) Copy over the pre-compiled QtCinematic Experience Demo

At this point, you should be able to execute the demo.

(additional step if you want to create qt5 apps)

On the dev.host:

1) linux 64bit OS
2) copy over the Qt5 binaries directory to /usr/local/
3) get Qt Creator from qt-project
4) get the linaro gcc compiler
5) configure Qt Creator

Give it a try and share the results!
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 17, 2014, 08:12:21 am
Im at work, raring to test it. I suggest to make a video tutorial, thats important  :-\
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 17, 2014, 08:16:20 am
At work mee too... maybe I will try in the next 9 hours.
I never updated a kernel manually so I don't assicure that I will make it in a bit of time.

Inviato dal mio SM-N9005 utilizzando Tapatalk

Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 18, 2014, 10:33:01 am
http://dl.cubieforums.com/ikeeki/IMAGES/ww/cubieboard/
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 18, 2014, 10:38:41 am
Quote from: wickwire on March 18, 2014, 10:33:01 am
http://dl.cubieforums.com/ikeeki/IMAGES/ww/cubieboard/

GREAT!
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 18, 2014, 10:39:39 am
Great, that's a really cool/professional proyect¡
In fact, when people start understand how great is it there will be wows, screams, laughs and parties  ;D
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 18, 2014, 10:40:44 am
Are there any known issues in this FW? (Missing driver, peripheral not working, ...)

Another dubt: the images are for NAND or for SD Card?
I normally use an SD Card Samsung sized 16GB, is this a problem?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 18, 2014, 10:45:48 am
These releases are only focused on this thread - Qt5. I didn't consider including stuff I didn't need, so if you need to expand kernel support, you'll have to build your own version of the kernel only, I'm afraid.
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 18, 2014, 10:49:20 am
I think that the great work is about Qt5, so it is very good... thank you!!!  :D

Re-compiling the kernel is a well known task and well documented... Qt5 for embedded ARM is not, as you know it.

I'm performing Qt5.2.1 cross-compilation also for Pandaboard ES, and I'm having a lot of problems with the dependencies.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 18, 2014, 10:55:58 am
SD Card images, 16GB should be fine - some images are 8GB while others are 4GB, it's referenced in the README file and usually on the image filename ;)
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 18, 2014, 03:57:49 pm
Well... I tested both X11 and framebuffer img on my Cubieboard2.

framebuffer works very well... boots in a few seconds WOW!
I tested QtCinematics and its ok in eglfs. The other ones do not work

X11 image gives me problem. It stops booting. I will try to DD it again.

One thing I have to say: it could be useful to have "qmake" available to compile little SW onboard without cross-compiling everything.

I saw that there is qemu in bin folder... good choice.
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 18, 2014, 07:43:36 pm
Quote from: Myzhar on March 18, 2014, 03:57:49 pm
Well... I tested both X11 and framebuffer img on my Cubieboard2.

framebuffer works very well... boots in a few seconds WOW!
I tested QtCinematics and its ok in eglfs. The other ones do not work

X11 image gives me problem. It stops booting. I will try to DD it again.

One thing I have to say: it could be useful to have "qmake" available to compile little SW onboard without cross-compiling everything.

I saw that there is qemu in bin folder... good choice.


Allora faccio prima il test della imagine fb  ;D.
Ho visto che te la sai tutte soppra Qt5, non è stranno che sei interesato a questo proyetto
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 19, 2014, 01:37:04 am
Quote from: ikeeki on March 18, 2014, 07:43:36 pm

Allora faccio prima il test della imagine fb  ;D.
Ho visto che te la sai tutte soppra Qt5, non è stranno che sei interesato a questo proyetto

Italiano? :)

Yes I love Qt5. Qt4 was a good framework, but with Qt5 they reached an optimum level. Now Qt is not only a good framework to make GUI... It is a lot more
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 19, 2014, 07:02:03 am
Myzhar: can you be more specific about the errors you got with X11? Works ok here on my cubieboard 2.

Native compiling Qt5 can be done with this guide: http://linux-sunxi.org/Qt5

Building qt5 apps straight off of this will have to be done over CLI - if you want to use Qt Creator natively, you'll have to compile it natively too.
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 19, 2014, 07:39:01 am
Quote from: wickwire on March 19, 2014, 07:02:03 am
Myzhar: can you be more specific about the errors you got with X11? Works ok here on my cubieboard 2.

Native compiling Qt5 can be done with this guide: http://linux-sunxi.org/Qt5

Building qt5 apps straight off of this will have to be done over CLI - if you want to use Qt Creator natively, you'll have to compile it natively too.

This evening I will try again and let you know.

I do not want to use QtCreator natively. Only qmake and moc... but I understood that for this I need to compile onboard...

However I noticed that newest QtCreator is well done for cross-compilation and remote-debug. Last time I tried I was using Qt 4.8 and I've done it... but with a lot of blood ;)
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 20, 2014, 07:05:41 pm
Trying the hello world in QT5, LOOOOOOOOL , this is not my dear beans/shell  :'(
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 20, 2014, 07:29:06 pm
Quote from: ikeeki on March 20, 2014, 07:05:41 pm
Trying the hello world in QT5, LOOOOOOOOL , this is not my dear beans/shell  :'(

What do you mean?
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 20, 2014, 07:41:37 pm
Quote from: Myzhar on March 20, 2014, 07:29:06 pm
Quote from: ikeeki on March 20, 2014, 07:05:41 pm
Trying the hello world in QT5, LOOOOOOOOL , this is not my dear beans/shell  :'(

What do you mean?


This:

http://www.bogotobogo.com/Qt/Qt5_TutorialHelloWorld.php (http://www.bogotobogo.com/Qt/Qt5_TutorialHelloWorld.php)
Title: Re: Qt5 build for cubieboard
Post by: pee_bee on March 20, 2014, 07:44:48 pm
Not his cup of tea!
He has a large head! ;D
Title: Re: Qt5 build for cubieboard
Post by: limbo on March 24, 2014, 02:00:51 pm
Hi,
When I configure the qmake path on Qt Creator I get the following message:
"Qt version is not properly installed, please run make install"

(http://www.mims.mut.ac.th/potipan/download/condo/abc.jpg)

Can anyone tell me how to fix this?

Thanks  :)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 24, 2014, 02:07:16 pm
Hi,

You need to mount the sd card image on your dev host, where the cross-compiled qmake hopes to find it.

do:

/usr/local/qt5cb2/bin/qmake -v

and it will confirm where it is expecting to find the corresponding cross-compiled libs - possibly /opt/qt5.cubieboard2.workbench/cubie-rootfs if you're using one of the pre-made images.

Once you have that PATH, you need to mount the SD Card Image on your dev host, to that same location.

Check the README file which should hopefully be close to the published files.
Title: Re: Qt5 build for cubieboard
Post by: limbo on March 24, 2014, 02:24:40 pm
Hi wickwire,
Thank you for your help ;D
Title: Re: Qt5 build for cubieboard
Post by: limbo on March 24, 2014, 03:11:22 pm
Hi wickwire,
For the first test with Cinematic Experience, I found the compiler message : 

"Compiler /media/nunofaria/af200616-03b9-4ebd-83a5-57537eb11880/qt5.cubieboard2/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ not found. Check the value of CROSS_COMPILE -device-option"

Please advice  :D

(http://www.mims.mut.ac.th/potipan/download/condo/fig2.jpg)
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 24, 2014, 03:43:43 pm
Hi, have you configured the linaro gcc compiler on Qt Creator? Info on that on previous posts in the thread.

Sent from my Galaxy Nexus using Tapatalk

Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 25, 2014, 08:52:52 am
Hi,

The Cubieboard 2 X11 Qt 5.2.1 set has incorrect dev host archives uploaded (usr.local.qt5cb2.tar.bz2).

Based on that, I've generated new Framebuffer/X11 sets for Cubieboard 2 - which have Qt5 and GStreamer 0.10 integration with QtMultimedia - and those will replace the previous versions in the cubieforums repository as soon as possible.

So now it is also possible to have USB Webcam Streaming working with Qt5 - I've included the cross-compiled "qt-declarative-camera" example on /opt/, for both versions X11 and Framebuffer.

Another note:

I tested the Qt5+GStreamer X11/FB setups with two different USB Webcams that I have - one of them displays properly, the other one only works on black and white. I haven't spent that much time figuring out the difference between the two, but out of the box, GStreamer had that behaviour.
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 25, 2014, 09:04:25 am
Quote from: wickwire on March 25, 2014, 08:52:52 am
Hi,

The Cubieboard 2 X11 Qt 5.2.1 set has incorrect dev host archives uploaded (usr.local.qt5cb2.tar.bz2).

Based on that, I've generated new Framebuffer/X11 sets for Cubieboard 2 - which have Qt5 and GStreamer 0.10 integration with QtMultimedia - and those will replace the previous versions in the cubieforums repository as soon as possible.

So now it is also possible to have USB Webcam Streaming working with Qt5 - I've included the cross-compiled "qt-declarative-camera" example on /opt/, for both versions X11 and Framebuffer.

Another note:

I tested the Qt5+GStreamer X11/FB setups with two different USB Webcams that I have - one of them displays properly, the other one only works on black and white. I haven't spent that much time figuring out the difference between the two, but out of the box, GStreamer had that behaviour.

You are great!

A question: does X11 version uses xcb?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 25, 2014, 09:07:16 am
Yes
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on March 25, 2014, 09:20:01 am
Which cameras have you tested?

I'm going to test it with Microsoft HD3000... I will plug two of them to see if it can support double webcam streaming (for stereo vision).
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 25, 2014, 09:34:28 am
The working one: Logitech C160 Webcam
The black and White one: Hercules HD Twist Webcam
Title: Re: Qt5 build for cubieboard
Post by: limbo on March 26, 2014, 12:30:14 pm
Excellent!  ;D
Title: Re: Qt5 build for cubieboard
Post by: wickwire on March 26, 2014, 06:42:48 pm
Quick Update:

- Cubieboard 2 FB/X11 images renewed - Qt 5.2.1 with GStreamer support on both setups - qt-declarative-camera example cross-compiled and available in the /opt dir - works with my usb webcams, described above, hopefully it will work for yours as well

- The "Base" sets for Cubieboard 2 and Cubietruck were also removed, not much point in having them there, you can always just recompile over the existing images if need be

EDIT: on the cubieforums link only, haven't updated the box.com account yet, will probably disable it as it runs out of traffic quota quite fast
Title: Re: Qt5 build for cubieboard
Post by: ikeeki on March 27, 2014, 03:12:27 am
Ill try to upload today to the other servers
Regards.
Title: Re: Qt5 build for cubieboard
Post by: semlanik on April 01, 2014, 04:18:50 pm
Hi guys. I've build Qt5 and gstreamer for cubie board. Also I've written some instructions. Cubieboard will be HW base for my openautomotive project. So http://semlanik.org/?p=62 here is post about last goals and links to repositories and documentation.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on April 02, 2014, 04:35:33 am
Hi, great work! I've also had a go at Gstreamer a while back and published renewed images - I got a usb webcam running. I've been trying to get 720p/1080p h264 video running with hw acceleration on GStreamer, did you have any success with this already?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on April 02, 2014, 08:00:56 am
Quote from: semlanik on April 01, 2014, 04:18:50 pm
Hi guys. I've build Qt5 and gstreamer for cubie board. Also I've written some instructions. Cubieboard will be HW base for my openautomotive project. So http://semlanik.org/?p=62 here is post about last goals and links to repositories and documentation.


Hi, could you confirm performance on your side using this other video sample:

http://samplemedia.linaro.org/H264/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4 (http://samplemedia.linaro.org/H264/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4)

Based on your reference, I've posted a video online comparing performance between the DiVX video you're playing and the h264 big buck bunny alternative, on my setup - with stock GStreamer 0.10 (no sunxi tweaks) running on X11:

https://www.youtube.com/watch?v=hgokN2uSSiA
Title: Re: Qt5 build for cubieboard
Post by: wickwire on April 04, 2014, 05:40:14 am
Hi,

Quick Update on my side:

Cubieboard A20 running 1080p video using GStreamer + video acceleration.

https://www.youtube.com/watch?v=OETsmG6IImw

Some tweaks were needed in order for this to work, but basically this is the result of libvdpau-sunxi + gstreamer-0.10.

The video capture isn't that great but hopefully the low CPU load will be visible.

Note:

This result, as experimental as it is, was only possible with the help of the guys at #linux-sunxi on freenode. After handling the gstreamer plugin set and integrating it with libvdpau-sunxi, I got into trouble with XTranslateCoordinates but mru, ssvb and smotocel69 helped me out with it...!

EDIT:

Hopefully this a major stepping stone onto having Qt5 handle HD video with acceleration on Cubieboard, by the means of QtMultimedia and the GStreamer backend!
Title: Re: Qt5 build for cubieboard
Post by: semlanik on April 14, 2014, 08:30:32 am
Quote from: wickwire on April 04, 2014, 05:40:14 am
Hi,

Quick Update on my side:

Cubieboard A20 running 1080p video using GStreamer + video acceleration.

https://www.youtube.com/watch?v=OETsmG6IImw

Some tweaks were needed in order for this to work, but basically this is the result of libvdpau-sunxi + gstreamer-0.10.

The video capture isn't that great but hopefully the low CPU load will be visible.

Note:

This result, as experimental as it is, was only possible with the help of the guys at #linux-sunxi on freenode. After handling the gstreamer plugin set and integrating it with libvdpau-sunxi, I got into trouble with XTranslateCoordinates but mru, ssvb and smotocel69 helped me out with it...!

EDIT:

Hopefully this a major stepping stone onto having Qt5 handle HD video with acceleration on Cubieboard, by the means of QtMultimedia and the GStreamer backend!



Hi, it's a great goal. I didn't compile x264 codec yet same with vdpau support. So I'll let you know when it will be done. But looks like there should not be any problems.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on April 14, 2014, 09:47:02 am
Well, based on my last attempt with GStreamer and VDPAU, all that remains is for Qt5/QtMultimedia to properly use the VDPAU elements to decode video.

By default, QtMultimedia works with xvimagesink it seems (which doesn't accelerate h264 videos on cubie), so it should be a matter of specifying which GStreamer elements should be used to work the video, from Qt.
Title: Re: Qt5 build for cubieboard
Post by: semlanik on April 14, 2014, 02:13:47 pm
Hm, my cubie is working without any X(For me it's useless). For qt I'm using eglfs with mali GLES. I've checked libvdpau-sunxi, there are some dependencies to libX and libxv. I'll try to replace it with surface based on mali.
According gstreamer and Qt, I think if compile ffmpeg with vdpau support, it should work from scratch with QtMultimedia over gstreamer. May be I mistake.
Title: Re: Qt5 build for cubieboard
Post by: mrsalomao on April 18, 2014, 11:47:31 pm
Hi guys,

Any attempts to build QT4 for cubieboard2? I can't use QT5 because Wacom support is broken in all QT5 releases. Also, have any of you tryed the audio playback / recording demos of QT5 on cubie? Are they working well?

Thanks!
Title: Re: Qt5 build for cubieboard
Post by: semlanik on April 19, 2014, 03:46:31 am
Quote from: mrsalomao on April 18, 2014, 11:47:31 pm
Hi guys,

Any attempts to build QT4 for cubieboard2? I can't use QT5 because Wacom support is broken in all QT5 releases. Also, have any of you tryed the audio playback / recording demos of QT5 on cubie? Are they working well?

Thanks!

Hi, I think requirements for Qt4 are softer than for Qt5, So just try to use one of tips in this topic or from my webpage:
https://git.semlanik.org/semlanik/openautomotive/wikis/step_by_step_with_cubieboard

I've played with flac, mp3, ogg audio playback using qt5 with gstreamer backend, so it's working well without any problems, at first glance.
According wacom support, possible you can fix it just by porting Qt4 plugin for wacom to Qt5.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on April 20, 2014, 05:50:16 am
Quote from: semlanik on April 14, 2014, 02:13:47 pm
Hm, my cubie is working without any X(For me it's useless). For qt I'm using eglfs with mali GLES. I've checked libvdpau-sunxi, there are some dependencies to libX and libxv. I'll try to replace it with surface based on mali.
According gstreamer and Qt, I think if compile ffmpeg with vdpau support, it should work from scratch with QtMultimedia over gstreamer. May be I mistake.


Hi,

As far as I know, VDPAU has direct dependency over the X window system, so I'm unsure if it will work with EGLFS alone.

For Qt itself that's not an issue, but for accelerated video, it might be.

As for Qt Multimedia and the video backends, I haven't yet tried changing the default backend for linux (GStreamer) so I'm guessing that, excluding VDPAU and sticking to EGLFS, one could try the libhybris solution and try to integrate it with QtMultimedia, see how that goes.

For X11, as accelerated GStreamer over VDPAU is already working (considering the early stages of development on libvdpau sunxi and the limited codec support) I'd say that once Qt Multimedia is set up to use specific videosink/video decoder options from GStreamer, we should be in business.

Qt 5.2.1 with Qt Multimedia and Gstreamer and libvdpau sunxi => Qt still tries to use xvimagesink to play the videos, and if either of these is possible, it should solve the issue:

1) configure/hack GStreamer to specifically use VDPAU as the default setup, whenever invoked

2) configure/hack Qt Multimedia -or- insert specific Qt code in the apps to specify the GStreamer VDPAU settings to be used

--------------------------------------------------------

As for FFMPEG, I'm only guessing it would also support VDPAU and that the Qt integration steps above would also have to be taken, but for FFMPEG.

In any case, should someone figure out a working solution, that would be great!


Sent from my Galaxy Nexus using Tapatalk

Title: Re: Qt5 build for cubieboard
Post by: Adibnia on April 28, 2014, 09:55:29 am


Hi ,
I made one video and i showed there how Qt 5 is running on cubietruck


http://www.youtube.com/watch?v=W7TJv_WvHII (http://www.youtube.com/watch?v=W7TJv_WvHII)
Title: Re: Qt5 build for cubieboard
Post by: contra on May 11, 2014, 10:33:54 am
Hi, I've got a couple of questions is someone could be so kind as to help me.

I've added qmake found in qt5cb2fb to Qtcreator but it says 'No compiler can produce code for this Qt version.'

In the readme notes it says 'get gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2 from the root folder > utilities'. Can someone explain further where this is? In the SD card image because I haven't found it.

I downloaded it separately from:http://releases.linaro.org/13.09/components/toolchain/binaries/ (http://releases.linaro.org/13.09/components/toolchain/binaries/) although I'm unsure if this is correct.

Which compiler file should I use? I have tried a few and qmake always complains that no compiler can produce code. For example I tried the g++ found here 'gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/arm-linux-gnueabihf/bin/g++'

Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 11, 2014, 11:12:21 am
Hi,

Yes, you have to add the g++ binary to Qt Creator's configuration. I had it on my personal box folders, but since moving stuff to the forums hosting directories, I left it behind as it isn't actually anything "custom".

The link you tracked down is correct:
http://releases.linaro.org/13.09/components/toolchain/binaries/

More specifically, this one:
http://releases.linaro.org/13.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2

Once you have the tar.bz2 in your GNU/Linux host OS, uncompress it using either CLI with tar xvjpf gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2 or using any GUI tools.

Then open up Qt Creator and go to Build & Run > Compilers tab > click Add > select GCC > Browse to the directory where gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2 got decompressed to and go to /bin

There you will find the file arm-linux-gnueabihf-g++, select it in the browse window and add it to Qt Creator.

The final step in configuring Qt Creator is combining all 3 elements: Device, Compiler and Qt Version. Do this in Build & Run > Kits

* Add the Device which should already be configured, where your cubieboard device is reachable over SSH
* Add the Compiler you've just set up
* Add the Qt Version which should already be configured, matching the qmake file in /usr/local/qt5cb2 and make sure the cubieboard image is also mounted in your Host OS.
Title: Re: Qt5 build for cubieboard
Post by: contra on May 11, 2014, 12:18:05 pm
Thanks for your reply, I have added the GCC compiler path as:

/opt/qt5.cubieboard2.workbench/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++


The Qt Version is set as: /usr/local/qt5cb2fb/bin/qmake

I have set the Kit as you suggested but the compiler tab still gives the warning: 'No compiler can produce code for this Qt version.'


When I try to compile the Qt5_CinematicExperience it gives me the following error:

:-1: error: /opt/qt5.cubieboard2.workbench/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++: Command not found

I have checked the file locations and everything is where it should be, also the SD iso is mounted correctly. Could there be some prerequisite that I am missing maybe a PATH export?

Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 11, 2014, 12:30:44 pm
Hi,

Can you post Host OS information:

lsb_release -a and uname -a
if available?

Also, which Qt5 setup are you using, if either one from my pre-made images or other?
Also, the output of /usr/local/qt5cb2fb/bin/qmake -v

thanks
Title: Re: Qt5 build for cubieboard
Post by: contra on May 11, 2014, 01:39:44 pm

david@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty



david@ubuntu:~$ uname -a
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


I am using the Qt5 from your pre-made images: http://dl.cubieforums.com/ikeeki/IMAGES/ww/cubieboard/framebuffer/cubieboardA20/Qt521/resources/usr.local.qt5cb2fb.tar.bz2 (http://dl.cubieforums.com/ikeeki/IMAGES/ww/cubieboard/framebuffer/cubieboardA20/Qt521/resources/usr.local.qt5cb2fb.tar.bz2)


david@ubuntu:~$ /usr/local/qt5cb2fb/bin/qmake -v
QMake version 3.0
Using Qt version 5.2.1 in /opt/qt5.cubieboard2.workbench/cubie-rootfs/usr/local/qt5cb2fb/lib


Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 11, 2014, 03:39:01 pm
If possible, uncompress the linaro-gcc archive to ~/Downloads

Access the resulting directory at ~/Downloads.../bin and attempt to run the arm-linux-gnueabihf-g++

./arm-linux-gnueabihf-g++

If you still get the "command not found" message, I believe it may have to do with 64bit host and a 32bit arm gcc - your system may not be supporting 32bit, and it may be required to do so. If so, try to install the ia32-libs package in order to support 32bit on your system.

Either the ia32-libs or ia32-libs-multiarch package, I believe ia32-libs was removed after Ubuntu 13.10.

Let us know how it goes, I'll see if I can grab a 64bit Ubuntu 14.04 LTS and install Qt from my images as well.
Title: Re: Qt5 build for cubieboard
Post by: contra on May 12, 2014, 03:36:18 am
I've had no luck so far, I tried downloading the 32 bit libraries. I also tried the 64 bit version of Ubuntu 13.10.

I did give the 32 bit version of Ubuntu 14.04 a try but it seems the qmake is built for 64 bit architecture.

Can you please suggest the Linux distribution that you use? Or anything that you know works.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 12, 2014, 11:29:49 am
Well, I used Linux Mint 16 64bit to cross-compile the Qt 5.2.1 sources, and I also did it on another system running Ubuntu 13.10 64bit.

I will try to have the setup up and running on an Ubuntu 14.04 LTS Desktop, if I succeed I'll post my configs.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 12, 2014, 11:59:36 am
Hi,

Virtualbox > Ubuntu 14.04 LTS Desktop Clean Install

switched to the Documents dir
wickwire@qt5box:~/Documents$

grabbed the linaro arm gcc
wickwire@qt5box:~/Documents$ wget http://releases.linaro.org/13.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2

decompressed the archive
wickwire@qt5box:~/Documents$ tar xvjpf gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar.bz2

descended to the bin dir
wickwire@qt5box:~/Documents$ cd gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/

executed the arm-gcc binary and confirmed the problem
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$ ./arm-linux-gnueabihf-g++
-bash: ./arm-linux-gnueabihf-g++: No such file or directory
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$

updated apt-get
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$ sudo apt-get update

searched for ia32-libs - 32bit support under x64
wickwire@qt5box:~/Documents$ sudo apt-get install ia32-libs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  lib32z1 lib32ncurses5 lib32bz2-1.0

E: Package 'ia32-libs' has no installation candidate


installed the suggested replacement packages
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

executed the arm gcc binary again
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$ ./arm-linux-gnueabihf-g++
./arm-linux-gnueabihf-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$


installed the missing libstdc package, 32bit version
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$ sudo apt-get install libstdc++6:i386

executed the arm gcc binary - success!
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$ ./arm-linux-gnueabihf-g++ -v
Using built-in specs.
COLLECT_GCC=./arm-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/home/wickwire/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/../libexec/gcc/arm-linux-gnueabihf/4.8.2/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/gcc-linaro-4.8-2013.09/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install --with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran --enable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard --with-pkgversion='crosstool-NG linaro-1.13.1-4.8-2013.09 - Linaro GCC 2013.09' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpc=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-isl=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-gold --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-mode=thumb
Thread model: posix
gcc version 4.8.2 20130902 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.09 - Linaro GCC 2013.09)
wickwire@qt5box:~/Documents/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin$


after this, you should be good to go in cross-compiling your Qt5 code from your Ubuntu 14.04 LTS to your Cubieboard 2 using Qt Creator.

also, if you're in a hurry to see the Cinematic demo running on your cubieboard, write the pre-made sdcard image to an available sd card if you haven't already, boot your Cubieboard and find the already deployed Cinematic Demo at /opt/ - just execute it over ssh or directly with plugged in usb keyboard and mouse and it should work out of the box! :)
(assuming I haven't forgotten to cross-compile and deploy it before generating the image...)
Title: Re: Qt5 build for cubieboard
Post by: contra on May 12, 2014, 02:11:22 pm
Hi, that worked perfectly thanks for the help. I'm loving the Cubieboard  ;D
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 12, 2014, 02:25:50 pm
Hi, great to hear it! :D

In the meantime I haven't had much time to chase the GStreamer/VDPAU/Qt5 combo, but if anyone does manage to get there, please post - So far we have Qt 5.2.1 cross-compiled and supporting GStreamer, and on the other hand, we have GStreamer running with VDPAU support (i.e h264 accelerated playback).

Qt5, by the QtMultimedia module, seems to resort to GStreamer on xvimagesink which is the default sink - but that's the one not having hardware acceleration.

I suspect that if there were a way to get Qt to explicitely ask GStreamer to use its VDPAU such as the sink, the decoder, etc - it should work.

qtgstreamer seems to enable this, but I haven't actually looked much at it - so if anyone else has any success, please write about it here! :)
Title: Re: Qt5 build for cubieboard
Post by: contra on May 12, 2014, 06:14:55 pm
I am trying to create an application that will smoothly scroll large photos across a 1080p screen, at the moment it results in tearing and is not pretty. I have also noticed screen tearing as the Sun moves around in the included demo although is is harder to see on a small image.

I know that this was mentioned earlier in the thread but was a solution ever found to enable the vertical sync for smooth movement?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 12, 2014, 06:57:26 pm
Have you tried setting up the framebuffer using fbset?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 12, 2014, 07:11:41 pm
... or maybe you could try recompiling the sunxi kernel, considering the following modification:

https://github.com/mmplayer/linux-sunxi/blob/dev/sunxi-3.4/drivers/video/sunxi/disp/dev_fb.c#L1074

uncomment the line, (cross-)compile and replace - maybe do an sdcard backup before that and keep the old kernel by renaming just in case ;)

In my case, on framebuffer was mainly focused on getting the highest FPS possible, and that meant disregarding vertical sync. But your issue is quite relevant and if either approach helps, please post back :)
Title: Re: Qt5 build for cubieboard
Post by: wayne.zwhu on May 13, 2014, 09:58:15 pm
Hi, wickwire,
Thank you so much for sharing your work with us, and I appreciate what you have done so far. I am a newbie to linux, and currently I am working on my cubieboard 1(1g version) to try to get the Qt5 working on it. I noticed that in the first link, there are only resources for Cubie2 and CubieTruck.
Can you give me some hints on how to cross-compiling Qt 5 on cubie1? is it same like what you did to cubie2 and CubietTruck?
Title: Re: Qt5 build for cubieboard
Post by: contra on May 14, 2014, 06:34:33 am
Quote from: wickwire on May 12, 2014, 07:11:41 pm
... or maybe you could try recompiling the sunxi kernel, considering the following modification:

https://github.com/mmplayer/linux-sunxi/blob/dev/sunxi-3.4/drivers/video/sunxi/disp/dev_fb.c#L1074

uncomment the line, (cross-)compile and replace - maybe do an sdcard backup before that and keep the old kernel by renaming just in case ;)

In my case, on framebuffer was mainly focused on getting the highest FPS possible, and that meant disregarding vertical sync. But your issue is quite relevant and if either approach helps, please post back :)


Thanks Wickwire, I will try this, if I have any success with Vertical Sync I will post my findings.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 14, 2014, 06:46:39 am
Quote from: wayne.zwhu on May 13, 2014, 09:58:15 pm
Hi, wickwire,
Thank you so much for sharing your work with us, and I appreciate what you have done so far. I am a newbie to linux, and currently I am working on my cubieboard 1(1g version) to try to get the Qt5 working on it. I noticed that in the first link, there are only resources for Cubie2 and CubieTruck.
Can you give me some hints on how to cross-compiling Qt 5 on cubie1? is it same like what you did to cubie2 and CubietTruck?


Hi,

yes I believe it should work even on Cubieboard A10. I can't say for sure that the pre-compiled Qt5.2.1 libraries I shared will work, but the cross-compile procedures from source should work properly.

The main element for this are the mkspec files and those aren't A10/A20 specific so you can use the ones I already published to do your work on Cubieboard A10.

Qt5 relies on the sunxi mali libraries which are available for both A10 and A20 - and regarding A20 alone, there are tweaks that can me made to the script.fex file in order to use the A20 SoC mali400 to its full potential.

On A10, I'd say you wouldn't have the fex optimizations, but Qt5 should work properly, only at a lower framerate when compared with Cubieboard2 and Cubietruck.

My goal was to have all devices up and running with Qt5, I do have a Cubieboard A10 but the HDMI is broken so until I'm able to fix it or get a new unit, I'd be counting on the rest of the community to work on it and post results.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on May 14, 2014, 06:49:51 am
Quote from: contra on May 14, 2014, 06:34:33 am
Quote from: wickwire on May 12, 2014, 07:11:41 pm
... or maybe you could try recompiling the sunxi kernel, considering the following modification:

https://github.com/mmplayer/linux-sunxi/blob/dev/sunxi-3.4/drivers/video/sunxi/disp/dev_fb.c#L1074

uncomment the line, (cross-)compile and replace - maybe do an sdcard backup before that and keep the old kernel by renaming just in case ;)

In my case, on framebuffer was mainly focused on getting the highest FPS possible, and that meant disregarding vertical sync. But your issue is quite relevant and if either approach helps, please post back :)


Thanks Wickwire, I will try this, if I have any success with Vertical Sync I will post my findings.


Ok, I'm not sure if it'll actually lock the FPS to sync with the screen, but at the very least you might be able to compare performance in FPS (which should drop) and possibly evaluate the tearing sun issue (less tearing, possibly)
Title: Cubieboard A20 > Qt 5.3.0 + FB + VSync
Post by: wickwire on May 29, 2014, 12:15:59 pm
Quote from: contra on May 12, 2014, 06:14:55 pm
I am trying to create an application that will smoothly scroll large photos across a 1080p screen, at the moment it results in tearing and is not pretty. I have also noticed screen tearing as the Sun moves around in the included demo although is is harder to see on a small image.

I know that this was mentioned earlier in the thread but was a solution ever found to enable the vertical sync for smooth movement?


Quote from: wickwire on May 12, 2014, 07:11:41 pm
... or maybe you could try recompiling the sunxi kernel, considering the following modification:

https://github.com/mmplayer/linux-sunxi/blob/dev/sunxi-3.4/drivers/video/sunxi/disp/dev_fb.c#L1074

uncomment the line, (cross-)compile and replace - maybe do an sdcard backup before that and keep the old kernel by renaming just in case ;)

In my case, on framebuffer was mainly focused on getting the highest FPS possible, and that meant disregarding vertical sync. But your issue is quite relevant and if either approach helps, please post back :)


Hi, I've finally had some free time to mess with my Cubieboard A20 - Qt 5.3.0 working on framebuffer mode - and I've also managed to test that solution with the vsync.

Looks like it actually works, it may be more perceptible "live", rather than on the published videos - and I don't know exactly how it will working with your app and the image scrolling, but using the cinematic demo, the sun orb doesn't tear anymore! :)

You'll need to recompile the kernel after enabling the function and copy over the new uImage to the /boot partition on the SD Card - let us know how that goes with your app! :)

Title: Re: Qt5 build for cubieboard
Post by: mcwong on June 05, 2014, 04:02:58 am
Hi Wickwire,

Appreciate your hardwork here. I had went thru many round on this thread but I have some questions to ask before I more on.

My scenario:
I would like to develope an application by using Qt5 in my host PC and cross compile and run in cubietruck. My host PC is Ubuntu 14.04 LTS(32bits) and my cubietruck is Lubuntu 12.10 (Linaro).
So my source code will written in Qt5 Ubuntu and need to cross compile and running in Cubietruck (Lubuntu) So your attach file onlike is suitable for me to use? My host pc is 32 bit ubuntu will it affected? Any simple way for my case?

Would like to ask on your file you had provided:
1. sdcard_image_tar (cubian-3.4.79.gmac.bcmdhd.bt.mali.r3p2-01rel2.x11.4gb.img)
    > This file need to flash in nand cubietruck? Or is boot from SD Card? So I cannot use Lubuntu 12.10?
2. The BuildQT5X11.bash is running in cubietruck right?
3. In host PC what OS should I use? Do I need to perform ./configure in my host PC? If yes, can you share the ./configure option for host PC?
3. For the ./configure from qt open source5.2.1 need to run at host pc and cubietruck. (2 times) ?
4. File usr.local.qt5cb2x11.tar
    > The file is locate (usr/local) at host PC or cubietruck? What is this use for? Need to run qmake -v in cubietruck?
5. File gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar
    > The file it is use for cubietruck when doing ./configure or host pc setup for qtcreator?
6. File linux-cubieboard2-g++.tar
    > This file is use for host or cubietruck? It need to include during ./configure qt source

Sorry for the many questiones, really need your advise how to setup my Host & Cubietruck.
Myself only need to run Qtcreator in my host PC and cross compiled and run in Cubietruck, that all I hope.

Need your help to guide me. I had went thru your readme file but i don't understand. I'm newbie for development embedded stuff.

Thanks a lot
Title: Re: Qt5 build for cubieboard
Post by: rose28357 on June 05, 2014, 04:45:38 am
Quote from: mcwong on June 05, 2014, 04:02:58 am
Would like to ask on your file you had provided:
1. sdcard_image_tar (cubian-3.4.79.gmac.bcmdhd.bt.mali.r3p2-01rel2.x11.4gb.img)
    > This file need to flash in nand cubietruck? Or is boot from SD Card? So I cannot use Lubuntu 12.10?

It is a SDcard image, thus it will only boot from sdcrad. you can not flash a sdcard image to nand in fel mode !

There are some tutorials in this forum which explain how you can copy the SDcard content to existing nand partitions.
in short words:
1) flash lununtu to nand in fel mode. check if it boots (i think you did already)
2) Boot from sdcard-image
3) copy files from sdcard boot partiton /dev/mmcblk0p1 to nandpartition /dev/nanda or /dev/nand1 (it depends on your lubuntu nand partiotion schema)
4) copy rootfile systeme from /dev/mmcbkl0p2 to /dev/nandb or /dev/nand2. dont copy /tmp or other volatile files. Search for copying rootfs to hdd. this procedures will also work for copying rootfs to nand.
5) edit uEnv.txt on /dev/nanda or /dev/nand1 to match the rootfilesystem lokation

There are some mor details i dont remenber now ....
Title: Re: Qt5 build for cubieboard
Post by: wickwire on June 05, 2014, 05:04:35 am
Hi,

I'll try to answer to the best of my knowledge  :)

QuoteMy scenario:
I would like to develope an application by using Qt5 in my host PC and cross compile and run in cubietruck. My host PC is Ubuntu 14.04 LTS(32bits) and my cubietruck is Lubuntu 12.10 (Linaro).
So my source code will written in Qt5 Ubuntu and need to cross compile and running in Cubietruck (Lubuntu) So your attach file onlike is suitable for me to use? My host pc is 32 bit ubuntu will it affected? Any simple way for my case?


Since you're set with your own host system and cubieboard system, you'll need to follow the instructions from the start:

1) install the mali libraries on your cubietruck
2) make an SD card image out of your cubietruck installation
3) use the image on your host OS to cross-compile Qt 5
4) load the update image onto the SD card, boot cubietruck and use the hostOS for Qt5 cross-development

My pre-made environments will do you no good since I've cross-compiled stuff on an x64 Host, so the qmake binary which runs on the HostOS is x64.
To use the pre-made environments, I'd advise using a 64bit Linux Host OS.

QuoteWould like to ask on your file you had provided:
1. sdcard_image_tar (cubian-3.4.79.gmac.bcmdhd.bt.mali.r3p2-01rel2.x11.4gb.img)
    > This file need to flash in nand cubietruck? Or is boot from SD Card? So I cannot use Lubuntu 12.10?
2. The BuildQT5X11.bash is running in cubietruck right?
3. In host PC what OS should I use? Do I need to perform ./configure in my host PC? If yes, can you share the ./configure option for host PC?
3. For the ./configure from qt open source5.2.1 need to run at host pc and cubietruck. (2 times) ?
4. File usr.local.qt5cb2x11.tar
    > The file is locate (usr/local) at host PC or cubietruck? What is this use for? Need to run qmake -v in cubietruck?
5. File gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux.tar
    > The file it is use for cubietruck when doing ./configure or host pc setup for qtcreator?
6. File linux-cubieboard2-g++.tar
    > This file is use for host or cubietruck? It need to include during ./configure qt source


1) the images are for SD card
2) this script is used to cross-compile Qt5, you should only consider it - and adjust it to your system - if you're going to cross-compile Qt5 from source code
3) if you're going to do the work from scratch, you can use either 32bit or 64bit HostOS
3.1) the configure line for Qt5 is run once, on the HostOS - I organized the steps on the bash script but you may run it manually
4) this tar.bz2 is for the HostOS.

Basically, when you cross-compile Qt5, you're on the HostOS and you're using an SD Card image from your cubietruck. What happens with the cross-compile procedure is that the Qt5 libraries are cross-compiled to ARM and placed on the SD Card image on the HostOS, and the Qt5 binaries (qmake, qmlscene, etc) are natively compiled whatever your HostOS is based on (x64, x86, etc).

When you configure Qt Creator on the HostOS and attempt to cross-compile a Qt5 app:

- Qt Creator reaches out to the natively compiled qmake in /usr/local/qt5/qt5cb2x11
- the qmake there is linked to the cross compiled libraries on the SD Card Image, which must be mounted on your HostOS
- the same SD Card image must be written to an SD Card and booted with your cubietruck - so your cubietruck is a match for the HostOS environment
- the app source code is compiled to ARM, deployed to your cubietruck and remotely executed.

5) gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux is what you'd call the toolchain. It is the ARM compiler that will be used on the HostOS, to produce ARM executables/libraries - it is the base for the cross-compile procedure.

6) linux-cubieboard2-g++.tar.bz2 is used in the cross-compilation procedure, on the HostOS. Those are the config files which will configure Qt5 to best work with Cubieboard. The decompressed directory should be copied over to the qtbase/mkspecs/devices directory, before running the configure line for Qt5 on the HostOS.

There are a lot of steps to perform this from scratch, and while I consider important to know them, it should be accessible as a pre-built system ready for development - unfortunately it isn't something that can easily be done, takes time and effort.

While my pre-made environments should speed things for everyone and get you to app development faster, they are not without some setup steps.

I'm thinking about alternatives, I think I may have some, I'll update the thread if/when I do, so stay tuned! :)
Title: Qt5Box
Post by: wickwire on June 06, 2014, 05:32:31 am
EDIT:

Check for Qt5Box updates either on the first post of this thread (http://www.cubieforums.com/index.php/topic,173) or on my blog (http://wickwire2099.blogspot.pt/)

As a means to jumpstart Qt development on Cubieboard, I started a small project of my own - Qt5Box.

Qt5Box is a humble attempt at a complete development suite for Qt5 on Embedded.

At the moment, it consists of a VM appliance for Virtualbox which includes everything in order to develop, build and deploy Qt5 Apps from a traditional desktop or laptop.

Since it is based on Virtualbox (4.3.12 or above), it is platform agnostic which means it should be usable on top of basically any OS running Virtualbox.

The VM is based on Ubuntu 14.04 LTS x64, includes all cross-compiled libraries, a pre-configured Qt Creator IDE and the SDCard images with which it cross-compiles the code.

Using the solution implies the following steps:

1) grabbing the Virtualbox Appliance file (the .ova)
2) importing the ova on Virtualbox
3) unmounting the SDCard Images which are already mounted at boot
4) extracting the image files from the VM (use SCP or Virtualbox Shared Folders or some other means for that)
5) writing the image files to 4GB+ SD cards

And that's it. Let Cubieboard boot up and then access Qt Creator > Tools > Devices and adjust the IP address of  your Cubieboard system if needed.

Important Notes

The OVA file is currently being hosted on Box.com, on an upgraded account. I've decided to host the files myself - although they can be freely shared of course - in an attempt to lighten the forum's resources, while thanking everyone involved in supporting this thread and the work we all have been doing on this.

I will try to maintain the account for as long as possible, but if you feel this project is relevant to you, consider a small donation for storage costs.

How to download Qt5Box?

Collaborators will be given access to the files - to become a Collaborator, send me a PM with a valid email account to be linked to the project and also if you're interested, share your intentions with this solution.

Any issues with the VM files, usage, bugs, etc - please address them here in the thread! :)
Title: Re: Qt5 build for cubieboard
Post by: Myzhar on June 06, 2014, 06:12:15 am
Great idea!!!

Inviato dal mio SM-N9005 utilizzando Tapatalk

Title: Re: Qt5 build for cubieboard
Post by: lawrence on June 06, 2014, 10:46:48 am
Again, nice work.
6G is a bit too large to host here, its sucky that there really aren't many options for large files.


Lawrence.
Title: Re: Qt5 build for cubieboard
Post by: mcwong on June 08, 2014, 08:13:57 pm
Hi wickwire ,

Thank you very much on your details explanation. Very appreciate it. I will try it out and let you knonw my result.

Again thanks

:)
Title: Re: Qt5 build for cubieboard
Post by: mcwong on June 08, 2014, 09:20:32 pm
Quote from: rose28357 on June 05, 2014, 04:45:38 am
Quote from: mcwong on June 05, 2014, 04:02:58 am
Would like to ask on your file you had provided:
1. sdcard_image_tar (cubian-3.4.79.gmac.bcmdhd.bt.mali.r3p2-01rel2.x11.4gb.img)
    > This file need to flash in nand cubietruck? Or is boot from SD Card? So I cannot use Lubuntu 12.10?

It is a SDcard image, thus it will only boot from sdcrad. you can not flash a sdcard image to nand in fel mode !

There are some tutorials in this forum which explain how you can copy the SDcard content to existing nand partitions.
in short words:
1) flash lununtu to nand in fel mode. check if it boots (i think you did already)
2) Boot from sdcard-image
3) copy files from sdcard boot partiton /dev/mmcblk0p1 to nandpartition /dev/nanda or /dev/nand1 (it depends on your lubuntu nand partiotion schema)
4) copy rootfile systeme from /dev/mmcbkl0p2 to /dev/nandb or /dev/nand2. dont copy /tmp or other volatile files. Search for copying rootfs to hdd. this procedures will also work for copying rootfs to nand.
5) edit uEnv.txt on /dev/nanda or /dev/nand1 to match the rootfilesystem lokation

There are some mor details i dont remenber now ....


Thanks your info rose...
:)
Title: Qt5Box v0.2 is almost out
Post by: wickwire on June 17, 2014, 09:33:48 am
Hi,

Qt5Box v0.2 is in its final stages, I'm hoping I can publish the Virtualbox Appliance file to my Box.com account still this week.

- The VM Desktop now uses Gnome Classic without visual effects

- Updated Target List

         - Cubieboard A10
         - Cubieboard A20
         - Cubietruck

- All Targets work with Qt 5.3.0

- X11 and Framebuffer variants for each Target

- Framebuffer versions were built with the VSync Patch applied to the kernel sources


Important Notes:

Everything is included in the VM - sources, config files, etc - all that is required to generate kernel and modules, cross-compile Qt5, etc. - although everything is already pre-built, you just have to write the SD Card images and use Qt Creator to write code, compile and deploy.

Donations for cloud storage costs through my blog are welcome but optional - you don't have to donate to download.

The Cubieboard A10 Target was included without validation that all is running properly - as my Cubieboard A10 has broken graphics - so if some of you out there own a working A10 with HDMI and care to try out the images, please do so and report back on any issues you may find.

In order to download the files from the Box.com account, please send me a private message here in the forum with a valid email address that I may add to the account share list.

Those of you who already have access to the Box.com account won't need to do it.
Title: Qt5Box v0.2 is out!
Post by: wickwire on June 19, 2014, 07:22:51 am
Qt5Box v0.2 is already available:


Aside from Cubieboard2/Cubietruck, A10 support is also included but it requires testing, I built it without being able to confirm proper performance since my cubieboard A10 has broken HDMI.

So if anyone out there with an A10 wishes to join in and test stuff, that would be great.

Also, to everyone who posted/PM'd regarding Qt5Box working with other A10 based dev boards:

I don't know if it will, and probably won't be able to "officially" support those other devices, if I don't happen to own one as well.

My guess is that, at best, Qt5 will work, but you might lose on the remaining components integration for that board - in any case, it would be nice to know if the solution is broad enough on similar hardware, as it is, so if that's the case, try it out and post back the results!
Title: Re: Qt5 build for cubieboard
Post by: wickwire on June 20, 2014, 01:06:06 pm
Hi,

The thread is very long by now, so I decided to grab a few more relevant posts and information and update the main post - that way, hopefully, everyone can focus on the most relevant bits of Qt5 on Cubieboard.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on July 16, 2014, 10:30:44 am
Hi guys,

ikeeki kindly offered his working Cubieboard A10 to the Qt5Box, and as a result, if any of you are using A10 boards, please consider the following adjustments to the SD Card Images included in Qt5Box v0.2:

cb1-rootfs a.k.a. Cubieboard A10 Framebuffer:

- /opt needed write permissions for app deployment

after booting your cubieboard from the supplied SD Card image, change permissions to /opt like so:

# chmod -R a+rwx /opt/


that way, Qt Creator will be able to deploy the app files to your cubieboard.



cb1-rootfs-x11 a.k.a. Cubieboard A10 X11:


- /opt needed write permissions for app deployment (same as above)

- updated /etc/slim.conf with the correct user for auto-login
(having the wrong user set up would prevent slim from starting up properly and as a result of that, no Desktop)

Edit /etc/slim.conf and update the following line:

default_user        cubie


... and this is it for Cubieboard A10.

These fixes will be introduced in the next version of Qt5Box!
Title: Re: Qt5 build for cubieboard
Post by: mycnc on July 22, 2014, 12:41:50 am
Hello.
I'm trying to run Cinematic Experience for CB2 FB.

It is compiled in Qt5Box.
If I run it from Qt5Box/QtCreator or directly from CB2 console I get the same result:

"Could not initialize egl display."
Please help.

Upd: I run my Qt 2D application with option "-platform linuxfb:fb=/dev/fb0".
If I do the same with CinematicExperience - I get frozen screen (no blink cursor), ssh access is still available.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on July 22, 2014, 11:22:33 am
Hi,

I should have set up some variables on /etc/environment with the proper platform to use: eglfs
please confirm that /etc/environment has Qt variables in there


As far as I recall, all A20 targets were working out of the box - only A10 needed some minor OS permission fixes, now detailed in the README.1st file.

I will grab the files as soon as I can and re-test the setup for cb2+FB.

In the meantime, please confirm that when using Qt Creator you're not accidentally choosing the Cubieboard2 X11 target instead of FB, and please post the complete output you get as soon as you run the cinematic demo over command line - as well as the actual command line being used.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on July 22, 2014, 12:04:43 pm
Hi,

I've just tested the Cubieboard 2 A20 Framebuffer image and all is fine, can anyone else confirm this issue reported by mycnc...?

By the way, mycnc are you using Qt5Box v0.2?
Title: Re: Qt5 build for cubieboard
Post by: mycnc on July 22, 2014, 12:07:44 pm
Thank you for your support.

yes, I used exactly FB compilation.
My 2D project compiled in Qt5Box/FB works fine with mentioned option "-platform linuxfb:fb=/dev/fb0"

I added TSLIB settings into etc/environment to get working resistive touchscreen:
QT_QPA_PLATFORM=eglfs
QT_QPA_EGLFS_HIDECURSOR=0
QT_QPA_EVDEV_KEYBOARD_PARAMETERS='grab=1'

TSLIB_TSEVENTTYPE=raw
TSLIB_CONSOLEDEVICE=none
TSLIB_FBDEVICE=/dev/fb0
TSLIB_TSDEVICE=/dev/input/event5
TSLIB_CALIBFILE=/etc/pointercal
TSLIB_CONFFILE=/usr/etc/ts.conf
TSLIB_PLUGINDIR=/usr/lib/ts



I just checked X11 set - CinematicExperince works fine out of the box

Title: Re: Qt5 build for cubieboard
Post by: mycnc on July 22, 2014, 12:09:06 pm
Quote from: wickwire on July 22, 2014, 12:04:43 pm
By the way, mycnc are you using Qt5Box v0.2?

yes
Title: Re: Qt5 build for cubieboard
Post by: wickwire on July 22, 2014, 12:39:56 pm
mycnc, could you please post the output hash for the following file on your Cubieboard's OS:

cubie@Cubian:~$ sha1sum /usr/local/qt530cb2fb/lib/libQt5Core.so

thanks
Title: Re: Qt5 build for cubieboard
Post by: mycnc on July 22, 2014, 01:09:02 pm
for FB-
cubie@Cubian:~$ sha1sum /usr/local/qt530cb2fb/lib/libQt5Core.so
61cbc95144556b72ce3312a706700be66d03e907  /usr/local/qt530cb2fb/lib/libQt5Core.so



sorry, another issue.
I switched to X11.
ldd for my application reports some errors:
cubie@Cubian:/opt/myCNC/myCNC/CB2$ ldd myCNC
        libGLESv2.so => /usr/lib/libGLESv2.so (0xb6f11000)
        libEGL.so => /usr/lib/libEGL.so (0xb6ef5000)
        libQt5OpenGL.so.5 => not found
        libQt5Svg.so.5 => not found
        libQt5Widgets.so.5 => not found
        libQt5Network.so.5 => not found
        libQt5Sql.so.5 => not found
        libQt5Gui.so.5 => not found
        libQt5Core.so.5 => not found
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6ee6000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6edb000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6ebf000)
....


However it is ok for CinematicExperience and QtQuick components.
All the libraries are in the /usr/loca/qt530.... folder so the issue about ldconfig i suppose ?


Title: Re: Qt5 build for cubieboard
Post by: wickwire on July 22, 2014, 01:16:26 pm
Hi,

for FB: the sha1sum checks out OK, however I'm having different results than you:

If I generate a new Hello World app with Qt Creator as follows:

New Project > QtQuick Application > Qt Quick Component Set > Qt Quick 2.2 > Kit Selection > Cubieboard A20 Qt 5.3.0 [FB]

It will deploy and run on my Cubieboard 2 with the FB image running, while attached to an HDMI screen.

EDIT: (Qt Cinematic Experience also runs OK this way for me)

However, if I attempt to run the app using -platform linuxfb:fb=/dev/fb0 like you stated, I get the following output error:


cubie@Cubian:/opt/helloWorld/bin$ ./helloWorld -platform linuxfb:fb=/dev/fb0
This plugin does not support createPlatformOpenGLContext!
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile  0)
Aborted
cubie@Cubian:/opt/helloWorld/bin$
Title: Re: Qt5 build for cubieboard
Post by: kalosha on August 10, 2014, 11:22:58 am
Sorry

Do we have SD image ready with Qt for Cbieboard2 ?

Thanks
Title: Re: Qt5 build for cubieboard
Post by: wickwire on August 10, 2014, 11:53:43 am
Hi,

Qt5Box is a VirtualBox VM that includes sdcard images with Qt5 already installed.
Title: Re: Qt5 build for cubieboard
Post by: kalosha on August 10, 2014, 12:38:32 pm
Hi wickwire,

Thank you for replay,  Should I send to you Pm with my mail for Qt5?

Thanks
Title: Re: Qt5 build for cubieboard
Post by: kalosha on August 24, 2014, 03:13:10 am
hI wickwire,

I download your image 3 times and can't import in VM.
have got this error:
Line 2: Incorrect namespace 'http://schemas.dmtf.org/ovf/envelope/2' found.


my VM Workstation version: 10.0.1 build-1379776

any idea ?

Thanks
Title: Re: Qt5 build for cubieboard
Post by: wickwire on August 24, 2014, 06:21:15 am
Quote from: kalosha on August 24, 2014, 03:13:10 am
hI wickwire,

I download your image 3 times and can't import in VM.
have got this error:
Line 2: Incorrect namespace 'http://schemas.dmtf.org/ovf/envelope/2' found.


my VM Workstation version: 10.0.1 build-1379776

any idea ?

Thanks

Hi,


1) if you are able to unzip the downloaded archives, then it's no use re-downloading them and wasting valuable storage traffic bandwidth.

2) If you can't unzip them and form the single OVA file from them, then use the SHA1SUMS file to check your zip files health and find out which file is damaged and download just that one.

3) Although it's written almost everywhere that Qt5Box is Virtualbox based, you're using VMWare.
Ask the VMWare guys what the error message means, maybe they have an idea on how you'd be able to convert formats.

Or even simpler, just use VirtualBox.

Title: Re: Qt5 build for cubieboard
Post by: kalosha on August 24, 2014, 10:51:48 am
Hi wickwire,

SHA1SUMS is correct.

I will try with Virtualbox. Sorry this is my fault.


Thanks
Title: Re: Qt5 build for cubieboard
Post by: othiman on September 04, 2014, 05:39:24 am
Hi wickwire,

thanks a lot for sending me the link to the Box account. I downloaded all files of the V0.2 and now try to extract the ova. I tried several programs like 7zip, serveral linux unzips, Windows Explorer, but none is able to extract the archive. I already checked the sha1sums and they are all correct. Which program did you use for packing the file?

Best regards,
othiman
Title: Re: Qt5 build for cubieboard
Post by: othiman on September 04, 2014, 10:35:47 am
Hi,

I somehow managed to extract the ova by concatenating the files and then unzip afterwards. I get the following hash value:
sha1sum qt5box.ova
f96f3d2b5b782b2eb6708788c07f793aaa62b144  qt5box.ova

Is this correct? Maybe you can add the hash of the qt5box.ova also to the SHA1SUM file so everyone can verify if the unpacking worked correctly.

I would also suggest to compress and split the file with 7zip next time (-v option for splitting). This way extracting QT5Box should work as expected an all platforms.

Best regards, othiman
Title: Re: Qt5 build for cubieboard
Post by: wickwire on October 11, 2014, 09:22:55 am
Hi everyone,

Qt5Box 0.3 - Codename Isaac
is currently being uploaded to Box.com

New features are listed in the main topic of this thread (http://www.cubieforums.com/index.php/topic,173.msg569.html#msg569)

@othiman: thanks for the input, I've generated 7zip split archives this time and included sha1sums for the OVA file as well as the split archives.
Title: Re: Qt5 build for cubieboard
Post by: kalosha on November 25, 2014, 03:12:58 pm
Hi wickwire

I download all files. all sha1sum for qt5box03.zip.0XX files are correct.
I extract qt5box03.zip and here is result

fciv.exe qt5box03.zip -sha1
//
// File Checksum Integrity Verifier version 2.05.
//
0088140d917c873692e15f86e25c2b33f02abbc6 qt5box03.zip


is this sum correct?
I can't extract this zip file my winrar and zip programs throws error.


Thanks
Title: Re: Qt5 build for cubieboard
Post by: wickwire on November 25, 2014, 03:27:40 pm
Hi, have you tried 7zip to unzip? Once you have the OVA file, import it on Virtualbox
Title: Re: Qt5 build for cubieboard
Post by: kalosha on November 25, 2014, 03:37:10 pm
yes I try but can't extract OVA from qt5box03.zip :(

is my sha1sum correct for qt5box03.zip file?


Thanks
Title: Re: Qt5 build for cubieboard
Post by: wickwire on November 26, 2014, 12:05:14 pm
Hi, using 7zip on windows you just select qt5box03.zip.001, right click > 7-zip > Extract to "qt5box03".

It will combine the zip files and extract the OVA file directly to a qt5box03 directory - no zip file in-between.

The extracted OVA file sha1sum will then match the OVA.SHA1SUM value - I've just finished trying it out on Windows 8.1 64bit and it worked properly.  :)

7ZIP.SHA1SUM includes the zip files sha1 hashes for validation
OVA.SHA1SUM includes the extracted OVA file sha1 hash validation

both files are correct for validation
Title: Re: Qt5 build for cubieboard
Post by: kalosha on November 26, 2014, 02:50:46 pm
ok I understand

check attachment, what can I say more
Title: Re: Qt5 build for cubieboard
Post by: wickwire on November 26, 2014, 03:45:52 pm
Can you share OS specs + 7zip version?
Title: Re: Qt5 build for cubieboard
Post by: kalosha on November 27, 2014, 01:52:14 pm
sure

7zip - version 9.20
OS - Win7 64bit SP1

details in attachment


Thanks
Title: Re: Qt5 build for cubieboard
Post by: kalosha on December 02, 2014, 01:54:36 pm
any idea?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 02, 2014, 01:59:36 pm
Under Tools > Options in 7-zip, which extensions are enabled?

You shouldn't get a zip when extracting, this is what you should do/see (sorry, my Windows is in Portuguese):

Right click > Extract to...
(http://ibin.co/1jHRcNGmTqVz)

... and the qt5box03 directory is created and the OVA extracted into it
(http://ibin.co/1jHRqSet7KuH)

If you're not getting this expected behaviour and since all individual zip files you have are checksum OK, I'd say it has something to do with Windows 7 + 7-zip combo perhaps, or some option you have on that machine. Maybe try to decompress the OVA on another computer, if possible?
Title: Re: Qt5 build for cubieboard
Post by: CristianoNunes on December 03, 2014, 07:25:03 am
Hello! I´m starting with cubie and want to install Qt5 on my cubie2. There are a "how to" that I can follow to install? I already have acess to BOX but when I enter on web site I saw a lot of file with the same size and I dont know which one use. BR Cristiano - Brazil
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 03, 2014, 09:28:24 am
Hi,

Yes, there is a README.1st file which explains how to use the Virtualbox appliance.

Basically, you should download all the files in Qt5Box > VMs > v0.3 if you already have access
then use 7-zip to decompress the zip slip archives by selecting the first one > qt5box03.zip.001
then import the resulting OVA file in VirtualBox and boot the Virtual Machine.
Title: Re: Qt5 build for cubieboard
Post by: CristianoNunes on December 03, 2014, 11:14:01 am
wickwire, I saw you windows menu on portuguese? Are you from Brazil?
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 03, 2014, 11:15:33 am
Hi, nope - Portugal
Title: Re: Qt5 build for cubieboard
Post by: homerjay on December 05, 2014, 05:14:23 pm
Hi,
I correctly loaded VM with qt5box 0.3 and tried both SD cards images for cubietruck.
That's fine but still i can't get Wifi module working, i tried to modprobe bcmdhd just like i did on the cubian official image but wifi is not getting up due to a strange error (it tries to power up and then it power off with an Android error (android?)).
Can you please confirm that it has been tested with bcmdhd mounted?

Because as far as i can guess and searching for it on google i found it is probably an error in kernel compilation of that module driver, and i was hoping to don't recompile the whole image trying to fix it.

Thanks!
Title: Re: Qt5 build for cubieboard
Post by: CristianoNunes on December 05, 2014, 09:33:48 pm
Hi! I already have the VM working fine here. Now, I don´t have any idea how to create a image to Cubie2. There are a step by step to me create the image. Thanks!
Title: Re: Qt5 build for cubieboard
Post by: kalosha on December 06, 2014, 03:10:59 am
Sorry but inside is only zip file :( qt5box03.zip

here is image, and archive file name pointed to this zip file. as I understand understand.
Title: Re: Qt5 build for cubieboard
Post by: homerjay on December 06, 2014, 07:08:14 am
Quote from: homerjay on December 05, 2014, 05:14:23 pm
Hi,
I correctly loaded VM with qt5box 0.3 and tried both SD cards images for cubietruck.
That's fine but still i can't get Wifi module working, i tried to modprobe bcmdhd just like i did on the cubian official image but wifi is not getting up due to a strange error (it tries to power up and then it power off with an Android error (android?)).
Can you please confirm that it has been tested with bcmdhd mounted?

Because as far as i can guess and searching for it on google i found it is probably an error in kernel compilation of that module driver, and i was hoping to don't recompile the whole image trying to fix it.

Thanks!


Error log from dmesg is

[   11.477426] ANDROID-ERROR) wl_android_wifictrl_func_add: platform_driver_register timeout
[   11.500296] dhd_customer_gpio_wlan_ctrl: call customer specific GPIO to turn off WL_REG_ON
Title: Re: Qt5 build for cubieboard
Post by: Leibnitz on December 06, 2014, 03:05:03 pm
Quote from: kalosha on December 06, 2014, 03:10:59 am
Sorry but inside is only zip file :( qt5box03.zip

here is image, and archive file name pointed to this zip file. as I understand understand.


Friend, this happened with me too. When I re-check what's happen I saw that was missing one file (the last one), when I download that and try again, 7zip opened and I saw file qt5box03.OVA and get extract it perfectly.
Title: Re: Qt5 build for cubieboard
Post by: Leibnitz on December 06, 2014, 03:08:32 pm
Quote from: CristianoNunes on December 05, 2014, 09:33:48 pm
Hi! I already have the VM working fine here. Now, I don´t have any idea how to create a image to Cubie2. There are a step by step to me create the image. Thanks!


Hello CristianoNunes,

Please, see if this article can help you: http://docs.cubieboard.org/tutorials/cb2/installation/cb2_lubuntu_card_install
Title: Re: Qt5 build for cubieboard
Post by: Leibnitz on December 06, 2014, 03:38:39 pm
Quote from: CristianoNunes on December 05, 2014, 09:33:48 pm
Hi! I already have the VM working fine here. Now, I don´t have any idea how to create a image to Cubie2. There are a step by step to me create the image. Thanks!


CristianoNunes, I believe that it can help you too: http://dl.cubieboard.org/model/cubieboard2/Doc/debian-server/Linux-card-installation.pdf
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 07, 2014, 04:50:07 am
Quote from: homerjay on December 06, 2014, 07:08:14 am
Quote from: homerjay on December 05, 2014, 05:14:23 pm
Hi,
I correctly loaded VM with qt5box 0.3 and tried both SD cards images for cubietruck.
That's fine but still i can't get Wifi module working, i tried to modprobe bcmdhd just like i did on the cubian official image but wifi is not getting up due to a strange error (it tries to power up and then it power off with an Android error (android?)).
Can you please confirm that it has been tested with bcmdhd mounted?

Because as far as i can guess and searching for it on google i found it is probably an error in kernel compilation of that module driver, and i was hoping to don't recompile the whole image trying to fix it.

Thanks!


Error log from dmesg is

[   11.477426] ANDROID-ERROR) wl_android_wifictrl_func_add: platform_driver_register timeout
[   11.500296] dhd_customer_gpio_wlan_ctrl: call customer specific GPIO to turn off WL_REG_ON


Hi,

I did recompile the sunxi kernel in order to include mali r3p2-01rel2 but I didn't mind much about additional components on cubietruck, so it's possible that something went missing for wifi and that you'd just have to do some extra work in your case...
Title: Re: Qt5 build for cubieboard
Post by: kalosha on December 07, 2014, 05:25:26 am
sorry which file is missing??

Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 07, 2014, 06:03:34 am
...that would be qt5box03.zip.034...

@Leibinitz thanks for solving the 7-zip decompress mystery!
Title: Re: Qt5 build for cubieboard
Post by: kalosha on December 07, 2014, 03:42:44 pm
Quote from: wickwire on December 07, 2014, 06:03:34 am
...that would be qt5box03.zip.034...

@Leibinitz thanks for solving the 7-zip decompress mystery!


yes 10x :)
Title: Re: Qt5 build for cubieboard
Post by: CristianoNunes on December 14, 2014, 05:10:15 pm
Hello Wickwire!! On VM I found those A20 images to load on uSD card. How I know what the diference betwen then? 
Title: Re: Qt5 build for cubieboard
Post by: wickwire on December 14, 2014, 05:44:33 pm
Hi,

- base images are framebuffer, no X
- desktop images are X enabled
- a20 images are cubieboard 2
- a20-ct images are cubietruck
Title: Re: Qt5 build for cubieboard
Post by: aneox on December 29, 2014, 05:58:44 pm
Very very interesting work.

https://www.youtube.com/watch?v=6wiTN6axMBE
https://www.youtube.com/watch?v=BwH7ON6F25c

https://github.com/mireq/buildroot-a20-olinuxino
https://github.com/mireq/a20-olinuxino-micro-autobuild

autobuild script very cool, just clone and run make.

Whay should we do to fork it on cubieboard2?
Title: Re: Qt5 build for cubieboard
Post by: aneox on December 30, 2014, 04:32:11 am
I ve got answer from author
Quote
Hello,
software compiled for OlinuXino 20 and Cubieboard2 is compatible
except script.bin and u-boot. Cubieboard2 can boot OlinuXino image
after exchange of u-boot an script.bin. My system image is here:
https://github.com/mireq/a20-olinuxino-micro-autobuild/releases. This
image also includes Qt5 and sega genesis emulator
(https://www.youtube.com/watch?v=qlesmTtsiXM).


Happy new Year!!
Title: Re: Qt5 build for cubieboard
Post by: Essien on January 28, 2015, 03:22:05 am
Hi Wickwire,
I'm trying using the QTbox with EGLFS. It works well for the display. But the keyboard has no response when the display is start. I'm using Cubietruck and the img file in QTbox. Do you have any suggestion how can I fix this problem. Thanks very much.
Essien
Title: Re: Qt5 build for cubieboard
Post by: wickwire on January 28, 2015, 05:00:56 am
Hi Essien,

Try starting your app on the cubietruck by appending the following to the command line:

-platform eglfs -plugin EvdevKeyboard -plugin EvdevMouse

if that also fails, check if it's a permissions issue, accessing the keyboard and mouse:

- run the same command line but as root

if it works, then you need to adjust permissions on the system to access your keyboard and mouse using a regular user - something similar to this:

# cat /etc/udev/rules.d/99-input.rules
    KERNEL=="mice", NAME="input/%k", MODE="664", GROUP="input"
    KERNEL=="mouse*", NAME="input/%k", MODE="664", GROUP="input"

Then if your Qt Creator doesn't have the -plugin EvdevKeyboard -plugin EvdevMouse parameters, just add them so that when you deploy your apps, they run with permissions.
Title: Re: Qt5 build for cubieboard
Post by: Searaphim on February 02, 2015, 12:28:51 pm
Hey wickwire, I've started to use your QtBox3 for my cubietruck. I've editted the cubietruck device that was already on QtCreator to use my own IP and Port and tested the connection (success). I've also made sure the project runs on your cubietruck Kit and added the following lines in the .pro file of the project I've loaded:

# Add more folders to ship with the application, here
folder_01.source = qml/content
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01


Now when I try to run the cinematic experience that was already in the box Qt returns Connection error: Timeout waiting for reply from server.

I've checked the auth.log file on my cubietruck for more information on what happened. The session is succesfully opened but then it says Unable to open env file :/etc/default/locale:No such file or directory.
Right after that it says: "subsystem request for sftp by user linaro"
then it says Bad packet lenght 2040392620.
And the session is closed.

From my understanding everything required for cross-compilation with a cubietruck should already be there right? The tutorials you've made for the cubieboard2 are assuming I'm not working with your box so I'm kind of lost. My guess is that I haven't set up the cubietruck properly to work with your box. Am I missing something? I really need help at this point.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 02, 2015, 12:53:08 pm
I'm actually not really sure what kind of connectivity issues you might have there, but just to make sure - as the errors you're getting state a "linaro" user, I'm thinking you're using your own cubietruck SD Card image.

If that's the case, then you should really use the included sd card images that ship with Qt5Box (i.e. reside inside the VM) - and those are Cubian based, with a cubie user on port 36000, so no need to change Qt Creator's kit configurations, except perhaps IP address.

So to make sure, here are the steps you should be taking:




Title: Re: Qt5 build for cubieboard
Post by: Searaphim on February 05, 2015, 10:08:36 am
Thanks for the help, I've been able to cross-compile the cinematic experience on my cubietruck. Only change I had to do though was to edit a file to get a VGA output instead of HDMI (I work with a VGA screen).

BUT! The cinematic experience itself seems a bit broken (I've watched what it looks like on youtube), my background is completely black, the moving yellow circle is a big white rectangle for me... I don't really know why. Could it be because I changed the screen output settings?

I've also noticed that there's no difference weither I boot the app with the FB kit or the X11 Kit.

This is what I get from the Qt application output after I launch the app:

EGLFS: Unable to query physical screen size, defaulting to 100 dpi.
EGLFS: To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 05, 2015, 10:23:52 am
If by some chance I left a broken example inside the VM, grab a clean working version from here:

https://bitbucket.org/wickwire/qt530_cinematicexperience

I can't remember if I've tested all variants on all devices, but using the sources above, you should get a clean Cinematic Experience, working on Qt 5.3.0+ and then test it on your setup! :)
Title: Re: Qt5 build for cubieboard
Post by: Searaphim on February 05, 2015, 10:42:19 am
Thanks a bunch, it works! I don't know why the last one was broken but you might want to replace it :P

There's only a weird artefact (A black square of the size of a character like when you type in a terminal) flashing.

Also, any clue on how to recover from shutting down the application from Qt? When I stop it it just freezes and doesn't go back to the cubian console.
Title: Re: Qt5 build for cubieboard
Post by: wickwire on February 05, 2015, 10:50:46 am
I'm assuming you're running everything on framebuffer, if that's the case then what you're seeing is the cursor blinking - and if you type some text, you should see it flashing as well.

Ways to get around this > http://www.cubieforums.com/index.php/topic,173.msg5854.html#msg5854

you can set the Qt variables directly on the command line, just before the command to run or on /etc/environment for a permanent fix

Title: Re: Qt5 build for cubieboard
Post by: Searaphim on February 05, 2015, 11:10:46 am
I tried to add the "echo 0 > /sys/class/graphics/fbcon/cursor_blink" line to the /etc/environment folder but it doesn't seem to change anything :o I didn't really expect it to work since its not a QT parameter but what am I supposed to do with that line?

Also, any clue about how to recover from stopping an app from QT? To return to the cubian console and not just let the screen freeze? (I can't seem to exit the app without a reset, tried Ctrl + C and stuff)Fixed


All of that isn't exactly important right now. What I do need to know though is if anyone has tried to use the webkit with the QtBox3 because apparently there is no webkit built on it for now (Qt says unknown module when I try to include stuff from the webkit, like QWebView). I really need the webkit for the app I'm building because there's a website I need to show on it.
Title: Re: Qt5 build for cubieboard
Post by: dwlinux on February 09, 2015, 03:39:52 am
hi, wickwire.
I'm use linux+busybox+qt on A20, how can i add gpu accelerate and HW decode.
Thanks!
Title: Re: Qt5 build for cubieboard
Post by: Searaphim on February 10, 2015, 10:23:48 am
I can confirm that the integrated wifi in the cubietruck doesn't work on your current image. Did you use sunxi-3.4? Take a look at this https://linux-sunxi.org/Cubietruck/AP6210 That means the kernel needs to be recompiled with the proper patches.

If I simply apply the patches on the /opt/kernel.sources/linux-sunxi directory in the box and then follow the HOWTO instructions in /opt/kernel.sources/ to build the kernel it should be fine right?

Thing is the instructions only mention "patch -p1 < 0003-Sunxi-adaptation-for-mali-r3p2-01rel2-kernel-module.patch" and there's also a "0001-Framebuffer-Sunxi-Mali-Vsync.patch" in the directory. Do I apply that patch too? I just wanna be sure that the patched kernel I build will still work in this cross-compilation environment.

Also, I'm still trying to figure out how to build QtWebKit+QtWebKitWidgets. As you can see they're missing in /opt/qt5.cubie2/ct-rootfs-fb/usr/local/qt521ctfb/include

EDIT: So far I fail at patching the kernel. Since I've never worked with kernels before after I built it I didn't really know how to install it properly on the cubietruck. All I did is tranfer and replace the uImage and the 3.4.79-02247-g1f255d6-dirty directory located in /boot with the new ones I made but after a reboot the machine wouldn't start anymore. It boots but VGA/HDMI outputs no longer work and the ethernet also seems to be broken since I can't communicate with it with SSH anymore. These things work if I boot the machine on my linaro OS on the nand though but no matter how many times I format the SD card and put back a working cubian image these things still don't work anymore using the SD card.

EDIT2:
Managed to recover from this, bought a new SD card heh. HDMI still won't work though and I still need to put on the cubietruck a patched kernel that supports cubietruck's integrated wifi...
Title: Re: Qt5 build for cubieboard
Post by: titan83 on February 15, 2015, 03:13:40 am
First, wickwire, great thank for your work! It was very useful.
I have a small question to you: I need to configure other Ubuntu instance to crosscompile for cubie.
I want to copy armhf compiler and Qt instance from your vm to my, but I have 32-bit Ubuntu, so I failed.
Ok, I have a work crosscompiler and I can to build my own Qt. I ran fixQualifedLibraryPAths, and after it I ran ./configure, where I use -no-eglfs option, because building failed without it.
I builded Qt successful, but I have a problem - my email library don't building in this Qt instance. However this library build success on desktop kit. In your vm it fails to build too.
Can you post your ./configure options for X11 Qt 5.2.1 version?
Thanks.
Title: Re: Qt5 build for cubieboard
Post by: titan83 on February 15, 2015, 01:16:05 pm
I answer for my question: for building Qt with SSL support we should:
1. Install libssl-dev on host.
2. Copy includes from $host$/usr/include/openssl to $rootfs$/usr/include/openssl.
3. Copy includes from $host$/usr/include/arm-linux-gnueabihf/openssl to $rootfs$ /usr/include/arm-linux-gnueabihf/openssl.
4. use key -openssl in ./configure command.
5. Copy new libQtNetwork with SSL support from $rootfs$/usr/local/qt_bla_bla/lib to cubie /usr/local/qt_bla_bla/lib.

This is result of one day hard work.
Hope it will useful for somebody.

Good bye.
Title: Re: Qt5 build for cubieboard
Post by: Searaphim on February 17, 2015, 05:15:34 pm
After I patched the kernel for Wifi and built it following the HOWTO and the patching process from linux-sunxi I end up with the modules folder and the uImage but I have no clue what to do with them to boot the patched kernel on the SD Card.
Title: Re: Qt5 build for cubieboard
Post by: hossein4737 on February 24, 2015, 04:08:13 am
hi wickwire
i  downloaded your virtualbox image and successfully started its linux but i dont know where to start my work, i found your scripts(./bakeqt_cb2.bash) but i got the following errors on it:
db2.cpp:42:20: fatal error: sqlcli.h: No such file or directory
compilation terminated.
make: *** [db2.o] Error 1
DB2 disabled.
InterBase auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o ibase.o ibase.cpp
ibase.cpp:42:19: fatal error: ibase.h: No such file or directory
compilation terminated.
make: *** [ibase.o] Error 1
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o mysql.o ../mysql/mysql.cpp
../mysql/mysql.cpp:42:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make: *** [mysql.o] Error 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o mysql.o mysql.cpp
mysql.cpp:42:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make: *** [mysql.o] Error 1
MySQL (thread-unsafe) disabled.
OCI auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o oci.o oci.cpp
oci.cpp:42:17: fatal error: oci.h: No such file or directory
compilation terminated.
make: *** [oci.o] Error 1
OCI disabled.
ODBC auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o odbc.o odbc.cpp
odbc.cpp:45:17: fatal error: sql.h: No such file or directory
compilation terminated.
make: *** [odbc.o] Error 1
ODBC disabled.
iODBC auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o iodbc.o iodbc.cpp
iodbc.cpp:42:17: fatal error: sql.h: No such file or directory
compilation terminated.
make: *** [iodbc.o] Error 1
iODBC disabled.
PostgreSQL auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o psql.o psql.cpp
psql.cpp:42:22: fatal error: libpq-fe.h: No such file or directory
compilation terminated.
make: *** [psql.o] Error 1
PostgreSQL disabled.
SQLite2 auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o sqlite2.o sqlite2.cpp
sqlite2.cpp:42:20: fatal error: sqlite.h: No such file or directory
compilation terminated.
make: *** [sqlite2.o] Error 1
SQLite2 disabled.
TDS auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o tds.o tds.cpp
tds.cpp:42:22: fatal error: sybfront.h: No such file or directory
compilation terminated.
make: *** [tds.o] Error 1
TDS disabled.
NIS auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o nis.o nis.cpp
arm-linux-gnueabihf-g++ -Wl,-O1 -o nis nis.o   -lrt -lpthread -ldl --sysroot=/media/home/cubieboard2_test/qt5/binary -lnsl
NIS enabled.
Cups auto-detection... ()
arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard --sysroot=/media/home/cubieboard2_test/qt5/binary -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-cubieboard2-g++ -I. -o cups.o cups.cpp
cups.cpp:42:23: fatal error: cups/cups.h: No such file or directory
compilation terminated.
make: *** [cups.o] Error 1
.
.
.
.

may i ask you to provide for us a tutorial that how to build our qt on your virtualbox? it seems your prepared image is a bit large!

many thanks
Title: Re: Qt5 build for cubieboard
Post by: LiRuiming on March 18, 2015, 01:33:32 am
hi~Thanks for your shared.
I am making a system on cubieboard,and Qt4.6.2 I have compiled success with fb and no x11 and directfb.But when I use the V4L2 and Qt to show a video capture,the CPU is to high(more than 80%,lots of spend in YUV420P to RGB).
I see you have mentioned the gstreamer and libsunxi-mali,is that possible to use Qt and gstreamer to create a player?how about the CPU's used....?
Well,the last is libsunxi-mali,is that a framebuffer Graphics acceleration?or a gstreamer's plugin?

CPU's type:A10
Thanks~
Title: Re: Qt5 build for cubieboard
Post by: sagueso on December 17, 2015, 05:10:21 pm
Hello, I have QT5 compiled in my desktop and configured to compile  with arm-gnueabihf for generate executables by Cubieboard A20. If someone need help with this them communicate with me. The IDE configurate is QT Creator.
Title: Re: Qt5 build for cubieboard
Post by: Dariush on December 23, 2015, 06:39:39 pm
Hi.
I've installed the sunxi-mali as the mentioned instruction.
The problem is when i run the test program, the following error happens:
Error: eglInitialise failed!
I used the x11 not the framebuffer.
The display output is LCD.
Any Suggestion?