This section provides useful documentation covering different ways in which Firefox OS (codename Boot2Gecko, or B2G) can be modified/customized during the build process, and how you can help to develop the low level platform areas such as Gecko and Gonk.
Note: If you are specifically interested in helping to develop Gaia, Firefox OS's user interface, you should consult our Developing Gaia pages instead.
General contribution notes
Since Gecko is an integral part of the Firefox browser, contributing to Firefox OS-related parts of Gecko is a pretty similar process to Gecko in general; contributing to Gonk is also pretty similar. Basically, you need to get to know the community, learn how the codebase works, and find bugs to work on. A good place to start earning about the contribution process is Contributing to the Mozilla codebase.
You should learn about Gecko — how it works and how it is structured. The MDN Gecko homepage has some useful notes on this, as does the Gecko:Overview page on the Mozilla Wiki. For information on (Firefox OS-specific) APIs, see the WebAPI Mozilla Wiki page for an overview of the work, and the MDN WebAPI page for an index of all documented APIs.
Next, look at Gonk, the kernel that Firefox OS runs on top of. Gonk is basically another porting target for Gecko, just like Mac OS X, Windows and Linux are in the case of Desktop Firefox versions. Gonk itself is really just a stripped down version of the Android Open Source Project — we tend not to change much of Gonk itself since most of the source code isn't under our control, and the device partners we work with to create Firefox OS devices usually provide device-specific code to interface between the device and Gecko/Gonk.
There is still work to be done on APIs, however. Most Gonk-specific Gecko code either uses #ifdef MOZ_WIDGET_GONK
to only enable it in Firefox OS, and/or are contained in gonk
subdirectories, such as gecko-dev/hal/gonk
. Try cloning the gecko-dev repo locally and having a look around. Our Mozilla Source Code Directory Structure article is also useful.
Next, you should learn more about Firefox OS architecture, how to Build Firefox OS (start with the Firefox OS build process summary), and how to Port Firefox OS to other devices.
Firefox OS is developed as a series of separate Modules: review the Firefox OS Modules page to get an idea of how the codebase is grouped, and learn who the main module owners are so you can get an idea of who to talk to if you need help.
Note: To find help, the best places to start are the dev-b2g mailing list, and the #b2g chatroom on Mozilla IRC.
Specific Firefox OS development topics
- Filing bugs against Firefox OS
- This article provides a guide to filing bugs against any aspect of Firefox OS.
- Modifying the hosts file
- A guide to what can be achieved by modifying the Firefox OS hosts file.
- Customization with the .userconfig file
- How to customize the build and execution of Firefox OS by changing the
.userconfig
file. - Customizing the b2g.sh script
- An explanation of what can be achieved by customizing the b2g.sh script, which runs the b2g application and controls many aspects of the system.
- Customizing DNS
- This article outlines a procedure to change the DNS servers for all interfaces (wifi, cellular, etc.) on a Firefox OS device.