Difference between revisions of "RaspberryPi qOrbiter"

From LinuxMCE
Jump to: navigation, search
m (Status)
m (Raspberry Pi Setup)
Line 33: Line 33:
Save these selections by clicking Apply and OK
Save these selections by clicking Apply and OK
==Raspberry Pi Setup==
==Virtual Raspberry Pi Setup==
As I don't have a rpi yet I used qemu to do some initial testing.
As I don't have a rpi yet I used qemu to do some initial testing.
My setup was a 12.04 VM.
My setup was a 12.04 VM.

Revision as of 01:16, 1 June 2012

Device Specification

-The Raspberry Pi is an ARM based computer the size of a credit card. 700Mhz, 256MB RAM, Ethernet, 2xUSB, GPIO

-256MB of RAM is insufficient to build lmce. MakeRelease and MakeRelease_PrepFiles both fail with out of memory errors due to the limited memory available on the RPi. -Cross-compiling will be required. More notes to follow.

Cross Compilation setup

Initially this section will have information specific to getting Qt on Pi going. Its pre-packaged and fairly easy to install.

At the time of writing Qt on Pi tarball is at version 0.2. Get the tarball here http://www.raspberrypi.org/downloads at the bottom of the page. This has a premade SD image plus the toolchain and sysroot install required for cross compilation.

If you are about to install this on your current machine with a working Qt development environment DON'T

You will need to either set up a VM or a chroot environment as the qt5 shipped with this image isn't setup to install alongside an x86 install. They plan on having these play nice in future releases.

Qt5, Toolchain and sysroot install

This is documented on the QtonPi wiki but basically after you have downloaded the qtonpi tarball extract the three files within. Then as root extract [opt-qt5-current.tar.bz2] and [toolchain-and-sysroot-armv5tel.tar.bz2]

$ cd /
$ sudo tar -jxvf /path to extracted image files/opt-qt5-current.tar.bz2
$ sudo tar -jxvf /path to extracted image files/toolchain-and-sysroot-armv5tel.tar.bz2

Qt creator

The tarball comes with a recent version of qtcreator, but since then qt2.5 RC has come out, Should be safe enough to use that instead. Just install that by executing the .bin installer. Hold that thought, qt2.5 creator RC doesn't have the deploy steps set up

Within Qt creator you need to point it at your cross tool chain compiler+debugger:

  1. Tools->Options->Build&Run then Tool Chains
  2. then select add, in the drop-down pick GCC
  3. Select GCC and browse for compiler to

and for the debugger


Save these selections by clicking Apply and OK

Virtual Raspberry Pi Setup

As I don't have a rpi yet I used qemu to do some initial testing. My setup was a 12.04 VM. You can either install qemu

sudo apt-get install qemu-system

Or you can build qemu from git. You only need to do this if the qemu on your distro doesn't support the Broadcom SOC (ARM1176 core) on the Pi. In order to boot your image you will need a suitable kernel for your emulator, there is one available here http://dl.dropbox.com/u/45842273/zImage_3.1.9 Boot your virtual Pi

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 rw panic=1" qtonpi-sdcard-0.2.img -redir tcp:5022::22



to the -append param to have the boot console re-directed to the terminal.

the -redir tcp:5022::22 redirects port 22 (ssh) on the virtual Pi to port 5022 on the host enabling you to ssh in.

ssh pi@localhost -p5022

qOrbiter on Pi


28/05/2012 - Unfortunately I have not been able to get my compiled qOrbiter to run on my virtual setup. Depending on the combination of kernel I use and/or SD image I either get an illegal instruction or and error creating a vchiq instance.

And given that the vchiq lib stuff is to do with the GPU, which is initialised in firmware, this may be a bit of an impass until I get actual hardware.

30/05/2012 - Have just receive my rPi and my previously compiled qOrbiter starts and gets past the vchiq/illegal instruction I had. I have other issues before I get it going but all going in the right direction.

Code Changes

According to the current Qt Documentation adding

greaterThan(QT_MAJOR_VERSION, 4) {
       QT += widgets
       QT += quick1
   } else {
       QT += declarative

to the pro file loads the correct modules for both Qt4/Qt5. At the moment my code and svn differ and not in a nice way - once I get everything #ifdef'd into place I'll either stick a patch here or check it in with golgoj4 approval :)

Raspberry Pi distros

Looking at http://elinux.org/RPi_Distributions there are quite a few to choose from.

Which is the best fit? I don't know.

I'm starting with QtonPi but I don't know if a full fedora release is necessary. This is actually a trimmed down fedora release no X, graphics written direct to fb

Mer/Meego might be a good fit too.