A tiny update for Firefox OS on Raspberry Pi

1 minute read

Many of you have been waiting for updates on Firefox OS on the Raspberry Pi. Unfortunately my time is very limited at the moment, and a lot of things are to be done. To get you a bit better involved, I did two things. First, the patch repository with all necessary patches to get Firefox OS building on Raspberry Pi is online. And second, the meta-b2g layer has been changed so that it now can produce a SDK which can be used for compiling Firefox OS with, so that you don't need work with all the OpenEmbedded/Yocto stuff any more.

Patch Repository

You can find the Mercurial patch repository containing all patches for the Mozilla source code necessary to build Firefox OS here:

https://www.philipp-wagner.com/hg/mc-b2g-patches/

To use it, checkout a mozilla-central source tree. Then go to the .hg folder inside your checkout, and checkout the patches repository:
hg clone https://www.philipp-wagner.com/hg/mc-b2g-patches patches

Then go back to the root of your mozilla-central source tree, and update it to the version given in the .hg/patches/changeset file. Now apply all patches by running

hg qpush -a

SDK

Not everybody want's to build a whole distribution only to hack on Firefox OS -- but to compile it, a cross-compiler and various libraries for the target are necessary. To make cross-compiling easier, I've added a new target to the OpenEmbedded/Yocto meta-b2g layer. You can now run

bitbake meta-b2g-sdk

and it will create an installable SDK (after building you can find it in tmp/deploy/sdk in your OpenEmbedded build folder). I've also uploaded a precompiled version (155 MB).

Install it by simply running the shell script, choose an installation location, and after a couple of seconds you have everything setup to cross-compile Firefox.

 

To compile Firefox OS, get a checkout of mozilla-central and patch it as described above. Then get the mozconfig file from the meta-b2g repository.

$> source /opt/poky/1.4+snapshot/environment-setup-armv6-vfp-poky-linux-gnueabi
$> export MOZCONFIG=/path/to/your/downloaded/mozconfig-b2g-linuxgl-rpi

Now you can build Firefox OS just as always:

$> make -f client.mk build

Things left to do

A lot! I currently don't get around to do new binary images, so you need to build from source to get support e.g. for newer/some Raspberry Pi models with different DDR memory on them (they require a newer firmware).

But I hope the SDK as well as the patch queue will help some people to do some changes themselves more easily.