Author Topic: Qt5 build for cubieboard  (Read 164347 times)

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Qt5 build for cubieboard
« 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

Update: 11-10-2014

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

Changes include:
  • All stable Qt5 versions from 5.0.0 to 5.3.2 cross-compiled for both X11 and Framebuffer, for each of the Cubieboard devices (Cubieboard A10, Cubieboard A20, Cubietruck)
  • GStreamer 0.10 + libsunxi-mali (video acceleration on GStreamer) available on the X11 Cubieboard A20 SD Card Image (haven't had the time to do it for A10 and CT as well, but it should also work)
  • Jenkins CI is installed in the VM and configured to do automated cross-compiles of Qt5 for the devices
  • I haven't tested all the library variations due to limited time on this but hopefully most/all of them will work properly - once I get to test them and also by having some feedback on things from you guys, hopefully in the next iterations of Qt5Box I'll get more of them tested and working


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)

Could not create the egl surface: error = 0x300b
Post #1
Post #2
Post #3


Framebuffer tweaks - blinking cursor + keyboard grab

arm-linux-gnueabihf/libz.a: could not read symbols: Bad value
Question
Answer

changing resolution

Framebuffer Tearing Effect (Vsync issues)
Question
Answer



------------------------------- 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:

Code: [Select]
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!
« Last Edit: December 03, 2014, 06:13:22 pm by wickwire »

Offline Max

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #1 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.

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #2 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:

Code: [Select]
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:


Code: [Select]
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!
« Last Edit: March 13, 2013, 08:21:04 pm by wickwire »

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #3 on: March 14, 2013, 07:24:23 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!

Offline lawrence

  • Administrator
  • Sr. Member
  • *****
  • Posts: 299
  • Karma: +15/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #4 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... :)


Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #5 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:
Code: [Select]
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:
Code: [Select]
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!

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #6 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...!

Offline lawrence

  • Administrator
  • Sr. Member
  • *****
  • Posts: 299
  • Karma: +15/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #7 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


Framebuffer on Cubie by 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);




Offline lawrence

  • Administrator
  • Sr. Member
  • *****
  • Posts: 299
  • Karma: +15/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #8 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).

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #9 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!

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #10 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:

Code: [Select]
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

Code: [Select]
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

Code: [Select]
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:


Code: [Select]
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:

Code: [Select]
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:
Code: [Select]
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!
« Last Edit: March 17, 2013, 03:49:29 pm by wickwire »

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #11 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!

Offline lawrence

  • Administrator
  • Sr. Member
  • *****
  • Posts: 299
  • Karma: +15/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #12 on: March 18, 2013, 09:27:38 am »
Did you try my suggestion to change the create window code to something like
Code: [Select]
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)

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #13 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:

Code: [Select]
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!

Offline wickwire

  • Full Member
  • ***
  • Posts: 144
  • Karma: +10/-0
    • View Profile
Re: Qt5 build for cubieboard
« Reply #14 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:

Code: [Select]
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#
« Last Edit: March 18, 2013, 01:44:34 pm by wickwire »