Difference between revisions of "RaspberryPi qOrbiter"
(Created page with "-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 Mak...") |
(Initial notes on virtual pi setup ... more to follow.) |
||
Line 3: | Line 3: | ||
-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. | -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-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. | ||
+ | |||
+ | |||
+ | ==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 | ||
+ | |||
+ | add | ||
+ | console=ttyAMA0 | ||
+ | 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 |
Revision as of 17:56, 28 May 2012
-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.
Contents
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.
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
add
console=ttyAMA0
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