Skip to content

Raspberry Pi Getting Started

danthemellowman edited this page Jan 6, 2013 · 64 revisions
  1. Install the latest Raspbian image, according to the instructions in the Official Quickstart Guide.
    • Make sure you are working with the the "hard float" version of wheezy (aka "Raspbian"), not the soft-float version (aka "Soft-float Debian “wheezy”).
  2. Please note if you are booting for the first time you will need to have a USB keyboard and either a HDMI Monitor or a HDMI to DVI/VGA adapter depending on your setup. Please read this guide as it contains a lot of useful information about bringing up your pi for the first time. Please select the following options from the configuration screen described in the previous guide.
    • expand_rootfs, this expands the root file-system to your full SD card.
    • ssh, enable sshd at boot
    • memory_split, you should configure the GPU/CPU memory split to be 50/50 between the GPU and CPU (128MB/128MB for 256MB models and 256MB/256MB for 512MB models). You can change this later by following step 4 of this guide.
  3. Once you are logged in to the RPI on the command line (via SSH or plugged into a screen) make sure your system is up-to-date.
    • sudo apt-get clean
    • sudo apt-get update
    • sudo apt-get upgrade
    • Note: The above steps may take a little while.
    • If you are still having issues updating apt-get run the following command then repeat the steps from above: sudo rm /var/lib/apt/lists/* -vf
  4. Update the raspberry-pi firmware and configure the memory split between the CPU and GPU
    • first install git: sudo apt-get install git
    • run sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
    • then execute the rpi-update
    • edit /boot/config.txt and set gpu_mem option to gpu_mem=128 for the 256mb pi and gpu_mem=256 for the 512mb pi
    • reboot your pi
  5. Then clone this repo:
    • git clone https://github.com/openFrameworks-RaspberryPi/openFrameworks/
    • Note: If you want to contribute code to the this project, create your own branch and submit a pull request to the develop-raspberrypi branch of this repo.
    • Note: For purposes of discussion below, $(OF_ROOT) is will be location of the openFrameworks root folder you created during this cloning process.
  6. Then move into your newly created directory ...
    • cd openFrameworks
  7. ... and checkout the master-raspberrypi branch:
    • git checkout master-raspberrypi
    • Note: The master-raspberrypi branch is our best effort at a "it was working the last time we checked" branch. master-raspberrypi is almost always a little bit behind the develop-raspberrypi branch, which usually working, but is currently being developed at a rapid pace, so don't be surprised if you get odd errors. Either one you choose, if you find errors, please leave bug reports in our issue tracker. To use the develop branch, git checkout develop-raspberrypi.
  8. Next, you will need to install the dependencies using the following command:
sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer0.10-nice gstreamer0.10-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-alsa libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev gstreamer0.10-ffmpeg libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev libjack-jackd2-dev python-lxml python-argparse portaudio19-dev alsa-utils
  1. Next you need to build the core openFrameworks libraries. To do so, navigate to the $(OF_ROOT)/libs/openFrameworksCompiled/project folder on your RPI and run:
    • make to build the Release library.
    • or
    • make Debug to build the debug library.
    • Note: This will use the new makefile system to automatically detect your system and will load the platform specific configurations found in the linuxarmv6l subfolder. This platform specific makefile is used for compiling BOTH core libraries AND compiling specific oF projects. If you are experimenting with missing features, you may need to modify that file at some point. It is very well documented (in fact all of the new makefile system is heavily commented, so feel free to look around and make suggestions!).
    • Note: This initial build of the release openFrameworks static libs may take 10-15+ minutes. If you have the need for speed and have an Ubuntu desktop machine to spare, see the Raspberry Pi Cross Compiling Guide.
  2. Assuming everything went well with the the last step, you can now navigate to the $(OF_ROOT)/apps/devApps folder and try out a few simple RPI apps. To try the simplest one, go to the raspberrypi_hello_world folder and run:
    • make
    • Note: This may take a few minutes to run the first time. Then navigate into bin and run the app as instructed.
  3. To run other examples or try out your own program, for the moment we recommend copying the raspberrypi_hello_world example. In the future, projectGenerator will make this easier.
    • Note: If you are a developer, please take a look at the config.make file and the addons.make files in the project directory.
Clone this wiki locally