FirefoxOS for Developers
Architecture
FirefoxOS has three architectural layers:
- Gaia: the UI
- Gecko: the engine
- Gonk: all the rest
Gaia
Gaia is the UI layer of FirefoxOS and includes all of the built-in apps.
- Gaia apps are built with HTML, CSS and JavaScript
- Gaia developers use git
- Gaia code is at: https://github.com/mozilla-b2g/gaia/
- All FirefoxOS apps run on top of Gecko
Gecko
Gecko is Mozilla's web platform layer. It includes the HTML, CSS, and JavaScript engines and also Web APIs like WebGL, WebAudio, and Device Storage
- Gecko is written in C++, JavaScript and webidl
- Gecko developers use hg.
- Gecko code is here: http://hg.mozilla.org/mozilla-central
- Gecko runs on top of Gonk
Gonk
The parts of FirefoxOS that are not Gaia and not Gecko are called Gonk. This includes Android and Linux code and proprietary driver code ("blobs") from chipset vendors
- Gonk is developed in C and C++
- Gonk developers use github
- Gonk code is at https://github.com/mozilla-b2g/B2G
- And also in many other sub-repos https://github.com/mozilla-b2g
Setup for FirefoxOS Development
- Create accounts
- Install required software
- Clone FirefoxOS repos
- Join IRC and mailing lists
Much of what follows is derived from: https://github.com/bocoup/gaia-notes/blob/master/development-cycle.md
Github and Bugzilla
- Create an account on Github
- Create a Bugzilla account at https://bugzilla.mozilla.org/
- Each engineer should have their own accounts
- Once you have worked on the project long enough, you may be granted (or can ask for) commit rights so you can check in code.
Install Software
- git and hg for source code version control
- Android Developer Tools, for the adb command for controlling phones over USB: http://developer.android.com/sdk/index.html
Clone Repos
Depending on what part of FirefoxOS you'll be working on, you will need local copies of one or more of the following repos:
-
git clone git://github.com/mozilla-b2g/gaia.git
- Or create your own fork on github and clone that.
-
hg clone http://hg.mozilla.org/mozilla-central/ src
-
git clone git://github.com/mozilla-b2g/B2G.git
-
Follow directions in the README
Communication
- FirefoxOS developers use IRC channels #gaia and #b2g on irc.mozilla.org
- dev-gaia mailing list or google group
- dev-b2g mailing list or google group
- (The mailing lists may soon be integrated into a single list.)
- Communication also takes place in Bugzilla comments
- Github is used for code reviews, but not for discussions
Gaia Workflow
- Product requirement ->
- User story ->
- Bugzilla bug ->
- Github pull request ->
- Reviews (technical, ux, security) ->
- Code checkin
- Close bug
Bugzilla Tips
- Use "add an attachment" to attach a patch (or link to a github pull request) to a bug
- Set the "r?" flag on the attachment to request review
- You must specify a reviewer
- "r+" means review granted
- "r-" means review denied: more work is required before the code can land.
- Check the "need more information" box at the bottom of the page to get another developer's attention
- Add "checkin-needed" to the Keywords field at the top of the page to request code landing when reviews are complete.
Other Resources
FirefoxOS for Developers
By David Flanagan
FirefoxOS for Developers
A high-level introduction to FirefoxOS and the things you need to know to hack on it.
- 4,572