Firefox OS (Boot to Gecko)

There has been lot of mobile wars going on in recent years. Today when we talk about Mobile OS, the top contenders that comes to mind are Android and iOS. Both are good operating systems and it’s matter of preference whose device you choose.

But I was never fascinated by devices of these both operating systems so I never bought Android or iOS device because my mobile usage limited. I use it only for calls, SMS, maps (with GPS), and rarely use camera (because I prefer taking photos with P&S or DSLR) and Bluetooth. Plus the most important thing which I look before buying a phone is power consumption (Stand-by and Talk time). I immediately reject phones with Stand-by less than 600hours and Talk time less than 6 hours because I hate phones consuming battery within a day.

It’s not a wise decision to buy a high-end phone which has lot of features which you never use. I have seen many users of high-end phones (like Galaxy S2/S3, Galaxy Note, iPhone 4/4s) who even don’t know what these devices are capable of. That’s my personal opinion and everyone has their own choice of buying devices according to their needs or style or some other reason.

This article is not about what are my mobile needs or how I purchase phones. It’s about Firefox OS (Boot to Gecko), the upcoming Mobile OS from Mozilla. Initially when I read news about Firefox OS, I thought it will be another ordinary OS like Android, iOS, Windows Phone, WebOS, BBOS or Meego which will be Linux based and will have some language to create native apps for it and will have battery timing that sucks, and its high-end phones will be expensive, and each version (like Android versions 2.3, 4.0, 4.1) will become obsolete after few years, blah blah blah… same boring old stuff.

Few days ago I watched a talk on Firefox OS and I found that it’s not what I was thinking about it. It’s a very unique and different idea which forced me to look deeper in this project. I explored Mozilla’s wiki for Firefox OS and decided to write an article explaining why this project seems interesting to me.

What Exactly is Firefox OS?

Firefox OS will be its final name after release and Boot to Gecko is its code name. Mozilla promotes open web and open software so it’s based on bare Linux kernel, device drivers, Gecko engine (engine used in Firefox browser), everything else in Firefox OS is based on open web technologies (HTML5, CSS3, and JavaScript). UI of the OS, plus all the apps are developed using these open web technologies. Home screen, menu, camera app, phone dialer, everything is HTML5 based. The coolest part is you can edit any part of UI in the phone if you know these technologies. To understand why these things are important to you, and what this OS can do for the end user, let’s take a look at very high level architecture of it.

Firefox OS Architecture

You can divide Firefox OS in three parts. Gonk, Gecko, and Gaia as shown below:

Firefox OS Architecture


Gonk is small tripped down Linux kernel designed to be very fast, lite and resource efficient. It also contains Hardware Abstraction Layer which provide friendly APIs to directly access hardware resources. But these APIs are not for developers. These APIs are used in Gecko (layer above Gonk). Final thing which it contains are the device drivers for the device on which it will run. In short you can say Gonk is a small Linux distribution on which Gecko is ported.


Gecko as most of you may know is the layout engine used in Firefox. But in Boot to Gecko, it’s more than a layout engine. It not only provides an environment to run apps written using HTML, CSS, and JavaScript, but also provide friendly JavaScript APIs to access hardware resources like battery, camera, Bluetooth, etc.

So now things started making sense. Gonk abstracts hardware and provide system APIs in C language to Gecko. Gecko is ported to run on top of Gonk and make use of its system APIs and provides abstraction in form of friendly JavaScript APIs. Now everything on top of Gecko (even the UI of Firefox OS) will be written using HTML5, CSS3, and JavaScript.


Gaia is the UI written using pure HTML5, CSS3, and JavaScript which runs on Gecko and make use of JavaScript APIs exposed by it. Gaia provides the all the required UIs and basic apps (Browser, Calendar, Calculator, Camera, Email, Radio, Music, etc) for the phone. As it’s written in standard open APIs, you can test it in any HTML5 standard compliant browser.

Enough with the technical details. Let’s see why these set of technologies is so cool and useful for end-user.

What’s Special for End-User?

We have looked Firefox OS from technical point of view. End-User don’t care what technologies Mozilla used to implement their OS. So in this section I am gonna explain why this architecture and selection of technologies is important and how it’s useful for the end-user and app developers.

Less Resource Hungry

As explained above Firefox OS is based on bare Linux kernel, and Gecko engine which execute apps. So it takes very less device resources. It can run smoothly even on 256MB of RAM.

Battery Timing

As mentioned above it uses very less resources compared to Android, iOS, Windows Phone. This means it will consume less power and give long battery timing.

Lite and Fast

Again it’s not only less resource hungry, but also fast and lite because of it will be executing nothing more than HTML5, CSS3, JavaScript.

Never Gets Obsolete

This is the coolest thing of Firefox OS. It will never get obsolete unlike other operating systems like Android has versions 2.3.x, 4.0.x, 4.1.x. and they older ones gets obsolete with the passage of time. But your phone with Firefox OS will never get obsolete because it will continue to run newer apps because the apps are based on open web technologies (HTML5, CSS3, JavaScript). Also the new APIs/features added in the OS will affect on the Gonk or Gecko part.

No Porting Issue

Developers don’t need to port their apps from Android or iOS. They can simply create native app for Firefox OS from their web app using a simple JSON based manifest file. You can now start submitting apps to Mozilla Marketplace (which open soon later this year).

Mozilla is non-profit organization and they are not hungry like Google, Apple or Microsoft so they are creating a solution which will not only be affordable by everyone but also not get obsolete any sooner since your purchase of device.

Don’t forget to subscribe via Email or RSS to get the latest updates from

Favorite Open Source Softwares

Most of the Open Source softwares are much better than their proprietary alternatives. So I prefer to look for Open software before going for any

Interview Experience With Google

ecently I got a chance to give an interview to Google for Front-End Software Engineer. It was a nice experience and I learned a lot