Release 0.2 – Tuning Firefox for the Raspberry Pi

Posted: November 29, 2011 in Uncategorized

It’s been an interesting 2 weeks. My focus shifted from using about:config settings in Firefox to building Firefox from source, and playing with the mozconfig file settings. The mozconfig file is a file that is completely optional when building Firefox from source, but is useful for turning on/off various features, and specifying certain aspects of the build.

After discussing the mozconfig file with some individuals at CDOT, and on the Moznet IRC channel, I’ve come up with this mozconfig file.

  • ac_add_options --enable-application=browser

This option specifies that Firefox will be built, and not Thunderbird or XULRunner.

  • ac_add_options --disable-debug
  • ac_add_options --enable-optimize=-Os
  • ac_add_options --disable-tests
  • ac_add_options --disable-url-classifier

These options disable various extraneous aspects, making the final build slimmer and less memory-intensive. Also, the optimize=-Os tells the make script to optimize the build for size, rather than performance.

These options were the only options used in my original build, which was done in my Fedora 13 64-bit virtual machine. This build was successful, although I had to install some software dependencies, but there were no major hiccups. This build of Firefox was stable, and ran well.

While testing this build, I found that when Firefox is started, it used approximately 10MB less RAM than the stock Firefox, as well as about 100MB less virtual memory. This is a noticeable decrease.  The issue comes when visiting ‘busy’ webpages with a lot of content, or when opening multiple tabs. While my new build uses less memory than before, the usage still balloons when tabs are opened. I’ll have to look into limiting the number of tabs opened.

At this point, I thought it was appropriate to get a working ARM build of Firefox using my mozconfig file. This is where the last line of my mozconfig is used:

  • ac_add_options --with-arm-kuser

This option lets the builder know it is building on an ARM device.

When I began building on an ARM device, I was set up with a Panda board to build on. I found that since the kernel on this device was not installed via RPM, I could not proceed with the build, as a number of dependent packages would not install, claiming the wrong kernel was present. I was given the solution by Jordan Cwang, who informed me of the fake-kernel-provides RPM. This package installs itself, and simply hides itself in my system as an ‘updated kernel,’ so yum will see it, and think I have a higher version, official kernel. This allowed me to install the dependent packages, and proceed with my build.

Everything proceeded well, until I hit another roadblock. The output of my latest build attempt, which can be found here, gives the following error code:

{standard input}: Assembler messages:
{standard input}:44: Error: selected processor does not support `strd r4,r5,[r10,#24]'
{standard input}:79: Error: selected processor does not support `ldrd r4,r5,[r10,#(4*6)]'

This error, as it was pointed out by Chris Tyler, indicates there is assembler code being executed that is not supported by the ARM processor being used.

At this point, I have no leads on where to go from here. Any advice as to my mozconfig file would be greatly appreciated. I am sometimes in the irc.mozilla.org #seneca channel on IRC, as well as the freenode #seneca channel.

Jeff

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s