This article provides a reference for all the B2G build, Gaia build, and Gecko build variables and commands you might need during Firefox OS-related build operations.
B2G build
Variables
- Example
- xxx
Commands
./repo sync- xxx
./config.sh- xxx
Gaia build
Variables
See the Gaia MakeFile for the definition of all these variables.
ADBxxxAPP- Some commands can act on all of gaia or on one application only. This environment variable defines if we want a command to act on one app only, and if so, which app.
B2G_SYSTEM_APPS- Ensures that the system apps are installed on the system partition.
GAIA_DIRxxxPROFILE_DIRxxxPROFILE_FOLDER- This defines the folder where the profile will be generated. By default it's
gaia/profilefor normal profiles andgaia/profile-debugforDEBUG=1profiles (see below.) COREWEBAPPS_DIRxxxSCHEMExxxGAIA_DOMAINxxxDEBUG- When set to 1, the generated profile is suitable to be used with Firefox desktop or the Firefox OS simulator (B2G Desktop):
DEBUG=1 DESKTOP=0 make.
This includes thehttpd.jsextension and configured preferences so that you can access applications usingapp://<appname>.gaiamobile.org/. Some applications are known to work like this, most notably the SMS application. LOCAL_DOMAINSxxxDESKTOP- This includes a set of extensions in the
DEBUGprofile to allow the Gaia System app to be loaded in Firefox. This is quite broken these days and deprecated in favor of Mulet. It's set to 1 by default whenDEBUG=1is used, but because this is really broken these days, so you'll want to disable it.
Be careful as this also doesn't work with the Firefox OS Simulator (B2G Desktop) at all. DEVICE_DEBUG- Enables a more developer-friendly experience: turns on adb debugging with devtools, disables the lock screen, and enables prefs to allow debugging of certified apps.
NO_LOCK_SCREENxxxSCREEN_TIMEOUT- When set to 0, this sets a preference in the profile to disable screen timeout.
SYSTEMxxxGAIA_PORTxxxGAIA_LOCALES_PATHxxxGAIA_INSTALL_PARENTxxxLOCALES_FILExxxGAIA_KEYBOARD_LAYOUTSxxxGAIA_KEYBOARD_DOWNLOADABLE_LAYOUTSxxxGAIA_KEYBOARD_ENABLE_USER_DICTxxxLOCALE_BASEDIRxxxBUILD_APP_NAME- Essentially an alias for
APP(see above). PRODUCTION- Creates a production build (rather than engineering); Facebook app id and some other production app ids are used with this. Alternatively
make productionwill work GAIA_OPTIMIZE- When set to 1 this runs optimization steps when building Gaia applications such as JS code minification. Not all gaia applications are affected by this, as the feature is opt-in.
GAIA_DEVICE_TYPExxxGAIA_DEV_PIXELS_PER_PX- The pixel density of the target device. This affects which image and/or video assets are copied into the build. This defaults to 1, but higher spec devices need higher resolultion assets — for example the Flame should use a value of 1.5. It is aliased as
GAIA_DPPX. DOGFOOD- Turns on Dogfood Gaia build.
MOZILLA_OFFICIAL- When nonzero, a Mozilla-branded build will be produced. The default is 0.
GAIA_DEFAULT_LOCALE- xxx
GAIA_PRETRANSLATExxxGAIA_CONCAT_LOCALESxxxGAIA_DISTRIBUTION_DIR- Use this to specify a customized Gaia; see the Market customizations guide for more details.
GAIA_APPDIRSxxxGAIA_ALLAPPDIRSxxxGAIA_MEMORY_PROFILE- xxx
NOFTU- When set to 1, this sets a preference in the profile to disable the FTU.
REMOTE_DEBUGGERxxxTARGET_BUILD_VARIANTxxxSETTINGS_PATHxxxFTU_PING_URLxxxKEYBOARD_LAYOUTS_PATHxxxCONTACTS_IMPORT_SERVICES_PATHxxxEMAIL_SERVICES_PATHxxxSTAGE_DIRxxxGAIA_APP_TARGETxxxBUILD_DEBUG- xxx
VARIANT_PATH- xxx
REBUILD- xxx
P- xxx
VERBOSE- xxx
RAPTOR- Enables performance marks and measures to output metadata to logcat. Usage:
RAPTOR=1 make reset-gaia SHARE_PERF_USAGE- xxx
DEFAULT_KEYBOAD_SYMBOLS_FONT- xxx
DEFAULT_GAIA_ICONS_FONT- xxx
MOZ_APPROX_LOCATION- Use this to turn on the privacy panel; the default is off, except in engineering builds.
Commands
The following is an abbreviated list of the most common commands you'll need. A much more detailed list can be found in the Gaia make options reference.
make- Makes only the profile.
make reset-gaia- Deletes the previous profile and installs a new Gaia profile.
make install-gaia- Installs Gaia on top without deleting anything.
make production- Does the same thing as
PRODUCTION=1 make reset-gaia. make clean- Removes the generated profile.
make really-clean- Removes the generated profile and the directory's xul-runner; you should only run this when things are totally borked.
Gecko build
Variables
MOZ_BUILD_DATE- Sets the build id to a specific build date/time.
B2G_DEBUG- xxx
VARIANT- Specifies the Gecko variant you want to build. Valid types are detailed below:
eng |
This is the default flavor. A plain
|
|---|---|
user |
This is the flavor intended for final release.
|
userdebug |
make userdebug
The same as
|
Note: This table is inspired by the Android Build Variants table.
Commands
./build.sh buildsymbols- Makes build symbols for debugging; see Uploading symbols to Mozilla's symbol server.
./build.sh gecko-update-full- Creates an OTA mar file; see Firefox OS update packages.
./build.sh gecko-update-fota- Creates a FOTA mar/zip based on files containing only a subset of files and directories; see Firefox OS update packages.
./build.sh gecko-update-fota-full- Creates a FOTA mar/zip based on files; see Firefox OS update packages.
./build.sh gecko-update-fota-fullimg- Creates a FOTA mar/zip based on partitions; see Firefox OS update packages.
Document Tags and Contributors
Tags:
Contributors to this page:
Superluk,
chrisdavidmills,
kskarthik,
nhirata,
Sheppy,
sfoster,
eliperelman,
gsvelto,
julienw
Last updated by:
Superluk,