Coding Chase - Projects

My 3D Hub

Thank You For Donating:

Ikeeki (linux-sunxi@irc.freenode.net)
Computer Troubleshooters Brasil

Monday, 19 January 2015

Cubieboard + Native Qt5

This is an updated guide on how to natively compile Qt5 for the Cubieboard devices - X11 variant

This guide considers that:

- Cubian will be the distro used
- "Cubian X1 is out Oct 08, 2014" < http://cubian.org/2014/10/08/cubian-x1-is-out/
- no changes will be made to the script.bin file
- no changes will be made to the kernel

As a result of this, the included mali library support is for r3p0 only (less performant than r3p2-01rel2 but still pretty good)

1) get the mali libraries working

based on http://linux-sunxi.org/Mali_binary_driver

Note: on this particular setup, I did not have to:
- set device permissions
- install the UMP (neither package or source, it came pre-installed)
- build libdri2 (r3p0 X11 only) < but did have to apt-get install libx11-dev libxext-dev libdrm-dev

sudo apt-get update
sudo apt-get install git build-essential autoconf automake xutils-dev screen
mkdir mali
cd mali/
git clone --recursive https://github.com/linux-sunxi/sunxi-mali.git
cd sunxi-mali/
make config
make
sudo make install
cd test/
ls -l
make

Reboot and get the triangle going.

2) Natively compile Qt5

based on this guide http://linux-sunxi.org/Qt5_For_Mali_Binaries

- But before getting started, some preparations are required:
- based on this generic "Building Qt5 from Git" tutorial > http://qt-project.org/wiki/Building_Qt_5_from_Git, we need to get some dependencies installed:
- QtWebkit > sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby (haven't tried it, ignored it)
- Qt WebEngine > sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev (haven't tried it, ignored it)
- Libxcb > sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev

Note: on Libxcb, the regex expression failed with some circular dependencies, so I excluded the conflicting packages from the regex list:

sudo apt-get -s install $(cat libxcb_pkg_list)
(libxcb_pkg_list supplied below)

back to building Qt5 (5.1.0) - Cubieboard A20:

./configure -release -opensource -confirm-license -opengl es2 -no-eglfs -no-linuxfb -no-pch && make -j3 && sudo make install


testing with QtCinematic Experience (https://bitbucket.org/wickwire/qt530_cinematicexperience/downloads)

unzip wickwire-qt530_cinematicexperience-4eb9046d310b.zip
cd wickwire-qt530_cinematicexperience-4eb9046d310b
ls -l
/usr/local/Qt-5.1.0/bin/qmake .
make
./Qt5_CinematicExperience
DISPLAY=:0 ./Qt5_CinematicExperience

Window displaying Qt Cinematic Experience ;)


#### libxcb_pkg_list ####

libxcb-composite0
libxcb-composite0-dbg
libxcb-composite0-dev
libxcb-damage0
libxcb-damage0-dbg
libxcb-damage0-dev
libxcb-doc
libxcb-dpms0
libxcb-dpms0-dbg
libxcb-dpms0-dev
libxcb-dri2-0
libxcb-dri2-0-dbg
libxcb-dri2-0-dev
libxcb-glx0
libxcb-glx0-dbg
libxcb-glx0-dev
libxcb-randr0
libxcb-randr0-dbg
libxcb-randr0-dev
libxcb-record0
libxcb-record0-dbg
libxcb-record0-dev
libxcb-render0
libxcb-render0-dbg
libxcb-render0-dev
libxcb-res0
libxcb-res0-dbg
libxcb-res0-dev
libxcb-screensaver0
libxcb-screensaver0-dbg
libxcb-screensaver0-dev
libxcb-shape0
libxcb-shape0-dbg
libxcb-shape0-dev
libxcb-shm0
libxcb-shm0-dbg
libxcb-shm0-dev
libxcb-sync0
libxcb-sync0-dbg
libxcb-sync0-dev
libxcb-xevie0
libxcb-xevie0-dbg
libxcb-xevie0-dev
libxcb-xf86dri0
libxcb-xf86dri0-dbg
libxcb-xf86dri0-dev
libxcb-xfixes0
libxcb-xfixes0-dbg
libxcb-xfixes0-dev
libxcb-xinerama0
libxcb-xinerama0-dbg
libxcb-xinerama0-dev
libxcb-xprint0
libxcb-xprint0-dbg
libxcb-xprint0-dev
libxcb-xtest0
libxcb-xtest0-dbg
libxcb-xtest0-dev
libxcb-xv0
libxcb-xv0-dbg
libxcb-xv0-dev
libxcb-xvmc0
libxcb-xvmc0-dbg
libxcb-xvmc0-dev
libxcb1
libxcb1-dbg
libxcb1-dev
libxcb-util0
libxcb-util0-dev
libxcb-image0
libxcb-image0-dev
libxcb-keysyms1
libxcb-keysyms1-dev
libxcb-render-util0
libxcb-render-util0-dev
libxcb-ewmh-dev
libxcb-ewmh2
libxcb-icccm4
libxcb-icccm4-dev
libxcb-present0
libxcb-present0-dbg
libxcb-sync1
libxcb-sync1-dbg
libxcb-xkb-dev
libxcb-xkb1
libxcb-xkb1-dbg
libxcb-cursor-dev
libxcb-cursor0
libx11-xcb-dev
libglu1-mesa-dev
libxrender-dev
libxi-dev

#### libxcb_pkg_list ####

Friday, 16 January 2015

Getting Started with Cubieboard [eBook]

It's been a while since I've updated the blog,

I've been focusing lately on Jolla/SailfishOS and Qt5/QML, so Qt5Box v0.4 is still under development for Qt5.4 and possibly adding Raspberry Pi and maybe some additional development boards.

There have been, however some interesting developments regarding the Cubieboard devices (a new board is coming out soon, carrying a mighty A80 SoC) and also a new book came out:

Getting Started with Cubieboard

As the title implies, this is a book mostly aimed at beginners, but valuable nonetheless - some key notions regarding SD Card prepping, Linux OS distributions and more are included and there is also code material available for each chapter (such as fex files, configuration files and even the Fedora distro for it).

While most advanced topics such as video/graphics manipulation aren't addressed in depth with this book (as those are also subjects for more advanced use), it'll most definitely help getting started with the board, so if you're at this point, might as well consider reading it!

Monday, 22 December 2014

QtAV Revisited

Ok, so having a bit of free time to pursue QtAV on cubieboard and following the lead developer's pointers on the previous post, I managed to capture some footage of the results I got so far.

First and foremost, some technical data:


  • using my Cubieboard A20 for this test
  • running Cubian X Desktop, stock version (no modifications done to either script.bin, kernel, X...)
  • natively compiled Qt 5.1.0 for the device
  • included all the pre-compiled dependencies supplied by Wang:



The first run was using the ffmpeg decoder, the second run was using cedarv (failed) and the third run also with cedar succeeded, but the results were pretty much on par with the existing problems with cedar decoding on A10/A20.

If you notice something missing or if you've had proper success beyond this point, please don't hesitate in posting below and sharing your setup with everyone else!

Friday, 21 November 2014

QtAV

Hi,

I've been working on other projects recently, but while browsing around for all things video accelerated, I came accross QtAV.

QtAV seems to be what was missing in order to integrate Qt and hardware video acceleration on Cubieboard!

I haven't tested yet, don't know if it supports the libcedarx proprietary blobs and/or libvdpau-sunxi but if the youtube videos are anything to go on, it looks pretty promising...!

If you didn't know about it, here's the Github Project page, and if you have, add a comment below with your experiences with it!

... Would it be worth it for Qt5Box's next release?

Saturday, 18 October 2014

Gstreamer Hyperloop

So I've been trying to get Gstreamer and Qt to play nice with each other on Cubieboard, but so far, no go.

Distinct attempts so far have been as follows:
  1. Hacking QtMultimedia to specifically invoke the working vdpausink pipeline
    1. this seems to be handled by  qtmultimedia/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp on the Qt5 sources, on the VM host.
  2. Setting the default playbin2 pipeline on GStreamer to use the vdpau elements, with GST_RANK_PRIMARY + 1
    1. this seems to be handled by gst-plugins-bad-0.10.23/sys/vdpau/gstvdpau.c in the embedded rootfs (check the previous Gstreamer + libvpau-sunxi post)
Scenario #1 got me all the way to invoking VDPAU to a black screen from Qt and scenario #2 won't go all the way even from gst-launch on account of qtdemux:

playsink gstplaysink.c:2922:is_raw_pad:<playsink0:video_sink> Caps contains raw and non-raw structures:

video/x-vdpau-video, chroma-type=(int)0, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ];
video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ];
video/x-raw-yuv, format=(fourcc)YV12, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ];
video/x-raw-yuv, format=(fourcc)NV12, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ]


A third possibility is to go with qtgstreamer, an alternative to QtMultimedia - still working that angle as well!

Thursday, 16 October 2014

Qt5Box 0.3 - some issues

Just a quick update on v0.3:

I just noticed that the Cubieboard A10 SD Card images haven't been updated for the misconfigurations reported on the previous README:

  • Setting proper permissions on /opt (both framebuffer and X11)
  • Changing the automatic login user on /etc/slim.conf from "wickwire" to "cubie" (X11)

These fixes have been corrected on 0.3, towards 0.4 with hopefully I'll launch with Qt 5.4.x when it comes out.

I'll also attempt to include libvdpau+GStreamer on A10 X11 and Cubietruck X11, if I can!

Saturday, 11 October 2014

Qt5Box 0.3 - "Isaac"

Finally, Qt5Box 0.3 is out! 

This release includes a Jenkins CI setup, which I've been using to perform automated Qt5 cross-compile jobs, as well as accelerated GStreamer support using libvdpau-sunxi (only available on X11, and specifically to Qt5Box, only on the Cubieboard A20 X11 SD Card Image).

I didn't have time yet to reproduce the steps on Cubieboard A10 and Cubietruck, but basically everything's documented here in the blog, in previous posts.

Using Jenkins, I've been able to successfully include about 60 variations on Qt5, from all stable releases beginning on 5.0.0 all the way up to 5.3.2, for each Cubieboard device, and both X11 and Framebuffer.

Hopefully with Jenkins I'll be able to roll out the next Qt5Box versions faster - Qt 5.4 is just around the corner and there's always the possibility of including more devices than just the Cubieboard family!

Last but not least, a special thank you to Isaac Chavarria a.k.a. Ikeeki for lending me his working Cubieboard A10, which was vital to get things going for this release...!