<commit_before>---
layout: page
title: QPi
permalink: /qpi/
---

# Setting up the Qt Arch SDK for the Raspberry Pi 0/1/2/3

## Overview

Qt can run quite nicely on the Pi(s), as long as you are not running it under Xorg/X11. The packaged versions of Qt run the gamut, but I have yet to see a Qt packaging which targets kms/console usage, or which has functional wayland support (outside of Intel hardware) as shipped.

I have divided the packages into:

Raspberry Pi 0/1/2

which use the vc stack and the propietary drivers/blobs (and have CEC support)

and

Raspberry Pi 3

which targets aarch64 and hence uses mesa.

I happen to be a big fan of cross compilation rather than compilation on target, which simply removes all joy from iterative development. We provide 2 packages, one for the Raspberry Pi and one for the host machine, which once installed allow you to cross compile for the Raspberry Pi from your Arch host machine. These packages are simply tar balls, so they should even run outside of Arch in a suitably modern Linux install. (The packaging is frosting)

The AUR recipes used to generate the installed packages are here (in case you are into that kind of thing):

## AUR recipes
[qt-sdk-raspberry-pi-target-libs,qt-sdk-raspberry-pi](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qt-sdk-raspberry-pi)

I am supplying packages, which you can simply consume, or magical dangerous bash scripts which you can embrace in disdain for your sovereignty.

Or you can simply proceed to making it happen by following these instructions. Clearly you proceed at your own risk, and neither myself nor my employer provide any binding guarantees or assurances. Kiss your poodle goodbye.

## Instructions

0. [Install the appropriate Arch on a fresh sd card](https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2)
1. Boot the Raspberry Pi
2. Download and run the following [script](http://chaos-reins.com/scripts/setup_qpi.sh) on the RPI
3. I personally normally do this by allowing root login via ssh and then grabbing the script via curl
4. curl http://chaos-reins.com/scripts/setup_qpi.sh > setup_qpi.sh
5. bash setup_qpi.sh
6. I would strongly recommend increasing the video ram to 512 in /boot/config.txt (The compositor alone requires more than the default 64 due to the sexy background wave effect)
7. Run this [script](http://chaos-reins.com/scripts/setup_qpi_host.sh) on your Arch host machine
8. In order for mdns hostname resolution to work, you have to enable [this](https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2) which I can't safely automate
9. Mount your Arch sysroot on your host (recommend NFS, mounting "/" under /mnt/pi)
10. You are now set to use Qt Creator to develop and deploy to your Raspberry Pi 2
11. Please note, you might have to explicitly "test" the device in the device page of Qt Creator in order for deployment to work. (pessimistic)<commit_msg>Update documentation<commit_after>---
layout: page
title: QPi
permalink: /qpi/
---

# Setting up the Qt Arch SDK for the Raspberry Pi 0/1/2/3

## Overview

Qt can run quite nicely on the Pi(s), as long as you are not running it under Xorg/X11. The packaged versions of Qt run the gamut, but I have yet to see a Qt packaging which targets kms/console usage, or which has functional wayland support (outside of Intel hardware) as shipped.

I happen to be a big fan of cross compilation rather than compilation on target, which simply removes all joy from iterative development. We provide 2 packages, one for the Raspberry Pi and one for the host machine, which once installed allow you to cross compile for the Raspberry Pi from your Arch host machine. These packages are simply tar balls, so they should even run outside of Arch in a suitably modern Linux install. (The packaging is frosting)

## Platforms
### Raspberry Pi 0/1(armv6)2/3(armv7)

uses the vc stack and the propietary drivers/blobs (and has CEC support). 2 Packages split along architectual lines.

### Raspberry Pi 3 (aarch64)

uses the mesa stack.

## AUR recipes
[qt-sdk-raspberry-pi-target-libs,qt-sdk-raspberry-pi](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qt-sdk-raspberry-pi)

The AUR recipes used to generate the installed packages are here (in case you are into that kind of thing):
I am supplying packages, which you can simply consume, or magical dangerous bash scripts which you can embrace in disdain for your sovereignty.

Or you can simply proceed to making it happen by following these instructions. Clearly you proceed at your own risk, and neither myself nor my employer provide any binding guarantees or assurances. Kiss your poodle goodbye.

## Instructions

0. [Install the appropriate Arch on a fresh sd card](https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2)
1. Boot the Raspberry Pi
2. Download and run the following [script](http://chaos-reins.com/scripts/setup_qpi.sh) on the RPI
3. I personally normally do this by allowing root login via ssh and then grabbing the script via curl
4. curl http://chaos-reins.com/scripts/setup_qpi.sh > setup_qpi.sh
5. bash setup_qpi.sh
6. I would strongly recommend increasing the video ram to 512 in /boot/config.txt (The compositor alone requires more than the default 64 due to the sexy background wave effect)
7. Run this [script](http://chaos-reins.com/scripts/setup_qpi_host.sh) on your Arch host machine
8. In order for mdns hostname resolution to work, you have to enable [this](https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2) which I can't safely automate
9. Mount your Arch sysroot on your host (recommend NFS, mounting "/" under /mnt/pi)
10. You are now set to use Qt Creator to develop and deploy to your Raspberry Pi 2
11. Please note, you might have to explicitly "test" the device in the device page of Qt Creator in order for deployment to work. (pessimistic)
{'fraction_non_alphanumeric': 0.06563245823389022, 'fraction_numerical': 0.013296965564268667, 'mean_word_length': 4.261883408071749, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1590798', 'n_tokens_mistral': 1723, 'n_tokens_neox': 1616, 'n_words': 855}