This document introduces step-by-step instructions to build Firefox OS for APC 8950.
Porting method comes from Mozilla. Details can be found at:
Building prerequisites can be found at:
Building process follows official building guidelines for Firefox OS, which can be found here:
- https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build
- https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building
Assume that we already setup the build environment, below are the steps:
The very first step, before you can start your first build, is to clone the B2G repository. This will not fetch everything, but only the B2G build system and setup utilities.
Notes:
- We use GitHub ssh access method, so please make sure to setup your ssh key first.
- The guide to setting up your ssh key can be found here: https://help.github.com/articles/generating-ssh-keys
To clone the repository, use git:
$ git clone [email protected]:apc-io/apc_b2g_b2g.git B2G
After cloning (which should only take a minute with a fast connection), change into the B2G directory:
$ cd B2G
Switch to device specific branch (apc8950-master):
$ git checkout apc8950-master
Once you've retrieved the core B2G build system, you need to configure it for the device on which you plan to install it.
Run the following command for this purpose:
$ ./config.sh wmid
For more details on using config.sh, see:
To start building, run:
$ ./build.sh
For more details about building process, see:
As we use the official flashing method of APC 8950 (which is different from the one by Mozilla), flash.sh won't work. However, flash.sh is still required to flash some specific modules, such as Gecko or Gaia. For more details about using flash.sh, please see:
After building process is successful, the output will be available at out/target/product/wmid. From here we'll need the following files:
- boot.img
- recovery.img
- rootfs.b2g_yymmdd.xxx.tgz
For flashing steps, we will need an SD card (with at least 1GB free storage, even though the actual firmware update package takes only about 200MB).
Here are the steps:
- Clone the firmware update source:
$ git clone [email protected]:apc-io/apc_8950_firmware_update.git
- Switch to B2G branch:
$ git checkout B2G
-
Copy the content of apc_8950_update_firmware to the root directory of the SD card.
-
Copy new boot.img & recovery.img to {SDCARD}/bspinst/ and accept to overwrite existing files.
-
Copy new rootfs.b2g_yymmdd.xxx.tgz to {SDCARD}/bspinst/packages/. Remember to remove the previous rootfs tarball there.
-
Remove the SD card, put it into the device.
-
Reboot the device. The flashing process will start automatically.