Skip to content

Instantly share code, notes, and snippets.

@jedp
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedp/641edd9b7d521a92cef9 to your computer and use it in GitHub Desktop.
Save jedp/641edd9b7d521a92cef9 to your computer and use it in GitHub Desktop.
Setting up the B2G project for Flame

Setup

Make sure you have all the dependencies installed

On Mac, create a case-sensitive filesystem

See the steps on devmo.

Clone the B2G project

(On the Mac, do this inside the volume you created)

git clone git@github.com:mozilla-b2g/B2G.git

Configure for Flame

Have your phone attached to your computer to do this, so that the config script can pull binaries down.

In the B2G project directory:

./config.sh flame

Edit the .userconfig file

# Cores to use
MAKE_FLAGS=-j6

# Skip the First-Time Use screens
NOFTU=1

# Enable source inspection from within gaia dev tools
DEVICE_DEBUG=1

# See https://bugzilla.mozilla.org/show_bug.cgi?id=771765#c34
export MOZ_NUWA_PROCESS=1

# Path to your gecko source tree, which will be cross-compiled
# to run on the device
GECKO_PATH=/path/to/firefox/mozilla-central

# There is a GAIA_PATH variable, but it does nothing.

VARIANT=userdebug   # include test apps
#VARIANT=user        # omit the test apps

Building and flashing

To build gecko, inside your B2G project dir:

./build.sh gecko

To flash gecko, likewise:

./flash.sh gecko

To build and flash gaia, inside your gaia dir, not the B2G dir:

rm -rf profile && make reset-gaia

To push a new user.js to the profile on the device, e.g., to set a pref:

adb shell stop b2g
adb push ./user.js /data/local/user.js
adb shell start b2g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment