Foxberry Pi Demo
This page describes how to install Firefox OS alongside a Raspberry Pi running Raspbian, without disturbing the main Raspbian installation. The Firefox-OS-on-Raspberry-Pi project is known by the codename "Foxberry Pi".
WARNING: for the time being, this demo software is just that, literally demoware. It has no long-term support plan or API compatibility guarantees, and may eat your homework. This demo is mostly intended for developers who are prepared to deal with bleeding-edge software.
Prerequisites
You need a Raspberry Pi, of course. Models B and B+ should work equally well. This guide assumes your Raspberry Pi (here after RPi) is running a recent Raspbian OS. Other distributions will probably work, but haven't been tested.
Install WebIOPi on your RPi. Be sure to test that WebIOPi is working correctly before proceeding.
This guide assumes your RPi is connected to the host machine via Ethernet. A connection through a wifi dongle or USB networking (or ...) should work fine, but hasn't been tested.
It's strongly recommended that you install sshfs on your host machine. On Fedora,
sudo yum install fuse-sshfs
Or on Ubuntu,
sudo apt-get install sshfs
This guide assumes your RPi has the default user "pi" configured.
You need to be able to ssh into your RPi. This means that
- Your Raspberry Pi must have ssh access enabled
- You need to know either your RPi's hostname or IP address. The default hostname is "raspberrypi". We'll call this address
$rpiaddress
from here on.
Ensure that the following command, run from your host computer, allows you to log into your RPi
ssh pi@$rpiaddress
(You'll need to enter the password, which by default is "raspberry". But you changed the password, right? Right??)
Set up Firefox OS inside Raspbian
Download the Firefox OS demo files: File:Foxberry-pi-demo-0.0.tar.gz. Copy the package to your RPi and then extract it into your home directory with
cd tar zxvf Foxberry-pi-demo-0.0.tar.gz
This should create a ffos
folder in your home directory.
Set up your host for web development
Go to a folder you'd like to use for development. We'll refer to that folder as $dev
. Run the following commands
cd $dev mkdir ffos sshfs pi@$rpiaddress:/home/pi/ffos ffos
This mounts a special filesystem on your host machine's $dev/ffos
mount point. The filesystem passes reads and writes through to your Raspberry Pi's ~/ffos
folder. This allows you to develop code using your host computer's editor and without needing to explicitly synchronize files. This is usually far more convenient than alternatives.
Open the file $dev/ffos/app/html/app.js
in your code editor. If you can't open that file, something has gone wrong in your sshfs or RPi setup.