Most smartphones use ARM processors. Much like how most PCs use x86 processors, for various reasons ARM has become the CPU of choice for mobile devices. Similar to x86, there are different versions of ARM processors that support different features. One of the biggest differences is which instruction set is supported. Instructions are the smallest units of what a processor can do, and an instruction set are the particular units that a processor knows how to run. For Intel, instruction sets were changed when they went from the 386 to the 486 to the Pentium and so on. For ARM, the instruction sets are numbered, with the most current one in use being ARMv7 (with ARMv8 in development). Confusingly, ARM’s processors themselves have similar naming, with the ARM11 being the generation that supports the ARMv6 instruction set, and ARM Cortex being the generation that supports the ARMv7 instruction set. All high-end smartphones that are currently shipping use processors that support the ARMv7 instruction set. The Apple iPhone 4S, Samsung Galaxy S2 and Galaxy Nexus, as well as others all come with similar processors. They’re all similarly fast as processors in smartphones go, and ARMv7 contains lots of features that allow programs to run very quickly.

How is this relevant to Firefox Mobile? Currently the builds we’re producing only run on processors that support ARMv7. This is partially because we’ve been working on performance for quite a while, and it’s much harder to get acceptable performance on a slower processor, so targeting only faster processors makes sense. (This is the same reason that Chrome for Android only runs on Android phones running the latest version of Android.) It’s also partially because all modern JavaScript engines ship with a JIT, which is a highly specialized piece of code that needs to know intimate details about the type of processor it’s running on. We used to produce additional builds that supported ARMv6 alongside our ARMv7 builds, but we saw lots of ARMv6-specific crashes in our crash reporting system, and we didn’t have the resources to tackle them all. Additionally, we were focused on making Firefox Mobile run well on ARMv7 processors; so making it run well on ARMv6 seemed like a stretch at the time.

Coming back to the present, we’ve got a revitalized mobile team working on a revamped Firefox Mobile that’s much faster than previous versions, so the performance target seems much more within reach. We also had people attending MozCamps and other Mozilla events across the globe last year. Dietrich visited Nairobi for some Mozilla Kenya events and found that the most widely used Android phones in Kenya are all ARMv6 devices. In addition, there are lots of Android phones being sold in China that are ARMv6. Even in the USA there are some low-end Android devices being released that are still ARMv6, like the LG Optimus Hub, which shipped in October of 2011. As of that date roughly 58% of the Android install base was comprised of ARMv6 phones. That’s a huge segment of the market that we’re not supporting.

Because of this, during the Firefox Mobile revamp Doug roped me in and asked if I would look into getting our ARMv6 builds back up and running. I started working on it figuring it wouldn’t be too bad since we used to produce builds. As it turns out, I was wrong. We managed to break things in quite a few ways since we disabled those builds. A few of them were simple fixes in our build configuration (although one of those took Mike Hommey and I a solid week of debugging to track down), but I also ran into a few problems with our custom linker. Firefox Mobile ships with a replacement for the system dynamic linker on Android. It’s pretty complicated, but this is the reason that Firefox only takes up about 15MB, whereas Chrome for Android takes up nearly 50MB after installation. Being a complicated piece of code there were some hard-to-diagnose bugs in it. Thankfully, with some input from Jacob Bramley from ARM we were able to track down the remaining problem and get builds working again.

With all the setbacks and other issues it’s not unreasonable to ask why we’re doing this. Clearly this isn’t the end of the process by any means. We still have to get automated builds back up and running on our build farm. We will undoubtedly have to shake out more ARMv6-specific bugs in our JavaScript engine and elsewhere. We’ll almost assuredly have to do some work to make performance acceptable. It’s a lot of work and it will take time, but this seems like the right thing to do given the number of users we can reach. You can follow along in Bugzilla if you’re interested in this work.

10 Responses to “Firefox Mobile on ARMv6 processors”

  1. Don Albertson Says:

    Thanks for the info. I always thought that Android made hardware differences irrelevant but it seems there are ways to dig below the OS

  2. Janko Says:

    Just keep going 🙂 , it’s great that someone is working on this.
    I’ve bought new phone recently and it has Arm6 processor, a lot of people still can’t buy better phones with Arm7.
    Is there some builds we can test right now, or we have to wait for automated builds?
    I can’t wait to run Firefox on my mobile phone, and use Sync. 🙂

  3. Antoine Turmel (GeekShadow) Says:

    Thanks for taking care of ARMv6 users 🙂
    I have an HTC Magic which is waiting for awesomeness.

    Not sure but it would be good to have ARMv6 too for Boot2Gecko.

  4. Firefox Mobile coming backwards to your (ARMv6) phone • Mozilla Links Says:

    […] forward, and as Ted Mielczarek, Mozilla build expert, explains, Mozilla has both now: a stronger mobile team, and a more complete […]

  5. Arialia Says:

    Not only in Kenya or China, also in Europe

    As i can’t yet install Firefox on my Samsung GT-I5500 ( named also Corby or Europa) , i think is it an armv6 phone.

    it is a good little phone ( sold first with android 2.1 but work fine in android 2.2)

    So very interesting in your work 🙂

    Please remove pub for firefox android in firefox browser … too hard to see that when you have a little phone android like mine ….

  6. philipp Says:

    is there any experimental .apk version for armv6 available yet, so that we can try out firefox and see the early status of developement?

  7. Firefox Mobile Coming To ARMv6 based handsets Says:

    […] has addressed this issue now and support for ARMv6-based handsets is coming soon. Mozilla’s Ted Mielczarek explains in his blog post, “Currently the builds we’re producing only run on processors that […]

  8. Portal Najnowszych Technologii - Grzglo: Firefox dla Androida wraca na urządzenia z ARMv6 Says:

    […] podstawie: Firefox Mobile on ARMv6 processors oraz Firefox Mobile coming backwards to your (ARMv6) […]

  9. Jerrin Says:

    I am from India and really exited to hear Firefox for armv6 is going to be released. Waiting for Nightly builds to be realsed.

  10. Firefox on lower-end Android phones – Dust in the net Says:

    […] For more information, please go to the semi-official announcement : […]