@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.
- Begin by installing the latest Raspbian Image on your SD card.
- 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).
- 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).
- Reboot the Raspberry Pi 2. If it doesn't happen automatically, call
sudo reboot
.- Once rebooted, log in with username
pi
and passwordraspberry
(unless you changed it above).- 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
- Unpack the release:
cd ~
tar xvf of_v0.8.4_linuxarmv7l_release.tar.gz
- 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
- Install the linux dependencies:
cd ~/of_v0.8.4_linuxarmv7l_release/scripts/linux/debian/
sudo ./install_dependencies.sh
- 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
- Compile an example:
cd ~/of_v0.8.4_linuxarmv7l_release/examples/3d/3DPrimitivesExample/
make
- Run the example:
make run
.Have fun!
Posts: 5
Participants: 5