Firefox OS

This page details how to build Firefox OS and flash your phone

Phone

 * Obviously, you will need a smartphone supported by Firefox OS, see list here.
 * fastboot must be enabled, you may need to unlock the bootloader for that. This operation is out of the scope of this document.

Computer

 * 64bit install
 * 4GB of RAM
 * 30GB of disk space (sources alone take 14GB)

Packages
Firefox OS requires gcc 4.6, it will not build with any other version.

Quite a few other packages are required, so we might as well create a set.

You also need the 32bit versions of ncurses and zlib

Udev
Unless you want to use adb/fastboot as root, you may need to add a rule to udev (and have your user be part of the plugdev group)

Now adb should be able to detect your phone

You won't be able to flash your phone via USB if adb/fastboot is not working. You can also flash the phone from an archive in the sdcard but this is beyond the scope of this document

Backing up your data
TODO

Find your phone's codename
See this table.

Choose a Firefox OS version
The list of versions available can be seen here. As of this writing, v1.3 is the lastest stable version but you can build any version you want.

Python
Firefox OS uses python to fetch the sources, unfortunatly it only works with python2, if your default python interpreter is python3, you will need this small hack

Fetching
The last command will start fetching the sources, this will take a very long time, possibly hours since it basically downloads 14GB of data.

GCC
Building requires gcc-4.6, it won't work with gcc 4.7 which is the current version used by Gentoo

Build
Building takes quite some time and displays a lot of warnings.

Flashing
TODO