Skip to content

Latest commit

 

History

History
108 lines (62 loc) · 3.41 KB

building-guide.md

File metadata and controls

108 lines (62 loc) · 3.41 KB

1. INTRODUCTION

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:

2. BUILDING STEPS

2.1. PREPARE FOR YOUR FIRST BUILD

Assume that we already setup the build environment, below are the steps:

2.1.1. CLONE B2G REPOSITORY

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:

To clone the repository, use git:

$ git clone git@github.com: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

2.1.2. CONFIGURE B2G FOR YOUR DEVICE

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:

2.2. START THE BUILD

To start building, run:

$ ./build.sh

For more details about building process, see:

3. FLASH TO THE DEVICE

3.1. NOTES AND REQUIREMENTS

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).

3.2. FLASHING STEPS

Here are the steps:

  • Clone the firmware update source:
$ git clone git@github.com: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.