Quantcast
Channel: arm - openFrameworks
Viewing all articles
Browse latest Browse all 364

Raspberry Pi 2 Setup Guide

$
0
0

@bakercp wrote:

Hello all, I finally got a Raspberry Pi 2 and wanted to post a quick how-to. Since Raspberry Pi 2 uses the armv7 architecture, there are a few extra (but simple) steps to getting the latest release of openFrameworks (0.8.4) working. This is a followup to another thread here.

  1. Begin by installing the latest Raspbian Image on your SD card.
  2. Plug the Raspberry Pi 2 into into an ethernet connection, HDMI monitor, keyboard and mouse. Then plug it in to power (if you must use wifi see the comment below).
  3. Assuming this is your first time starting with the fresh Raspbian image from step 1, make the initial Raspbian configurations. If it isn't your first time, you can get back to the Raspbian configuration screen by calling sudo raspi-config). We recommend that you configure the following:
    • Expand the file system.
    • Change User Password
    • Set your preferred internationali(s/z)ation preferences (this is particularly important if you are not using a British English keyboard).
  4. Reboot the Raspberry Pi 2. If it doesn't happen automatically, call sudo reboot.
  5. Once rebooted, log in with username pi and password raspberry (unless you changed it above).
  6. On the Raspberry Pi 2 command line, download the OF 0.8.4 linuxarmv7 distribution. Note this is the linux armv7 distribution, NOT the linux armv6 (which is what you would use for any Raspberry Pi before version 2).
    • cd ~
    • curl -O http://www.openframeworks.cc/versions/v0.8.4/of_v0.8.4_linuxarmv7l_release.tar.gz
  7. Unpack the release:
    • cd ~
    • tar xvf of_v0.8.4_linuxarmv7l_release.tar.gz
  8. Add the updated Raspberry Pi 2 makefiles to the release:
    • cd ~
    • curl https://raw.githubusercontent.com/openframeworks/openFrameworks/master/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.rpi2.mk -o of_v0.8.4_linuxarmv7l_release/libs/openFrameworksCompiled/project/linuxarmv7l/config.linuxarmv7l.rpi2.mk
  9. Install the linux dependencies:
    • cd ~/of_v0.8.4_linuxarmv7l_release/scripts/linux/debian/
    • sudo ./install_dependencies.sh
  10. Set an environmental variable. This must be done before using the makefile system each time you enter a new terminal or restart the Raspberry Pi 2. It can be automated by adding it to the end of your bash init script (e.g. your bash ~/.profile file). The following tells the make system to use all 4 cores for compiling and to use the Raspberry Pi 2 variant of the armv7 makefiles (you manually added it in step 8).
    • export MAKEFLAGS=-j4 PLATFORM_VARIANT=rpi2
  11. Compile an example:
    • cd ~/of_v0.8.4_linuxarmv7l_release/examples/3d/3DPrimitivesExample/
    • make
  12. Run the example:
    • make run.

Have fun!

Posts: 5

Participants: 5

Read full topic


Viewing all articles
Browse latest Browse all 364

Trending Articles