Building Firefox for Mobile (Fennec) on Maemo SDK

Recently I built Firefox for mobile (Fennec) for Maemo, because I wanted the latest version. A few modifications had to be made and I decided to describe the process.

Note:If you don’t want to build Fennec yourself, you can skip reading and download the latest version here.

First of all, if you want to develop for Maemo, you’ll need the Maemo 5 SDK. Follow the instructions to get a working SDK for your OS.

Next you’ll have to download Fennec’s code:

hg clone  http://hg.mozilla.org/releases/mozilla-release

There are multiple mercurial repositories and mozilla-release is the current release of Firefox, for more information see Getting Mozilla source code using Mercurial.

Switch to the repository’s folder:

cd mozilla-release

And create .mozconfig file. I used the following:

ac_add_options --enable-application=mobile/xul
ac_add_options --disable-update-channel
ac_add_options --enable-update-packaging
ac_add_options --disable-tests
ac_add_options --disable-debug-symbols
ac_add_options --disable-elf-hack
ac_add_options --enable-strip
ac_add_options --enable-default-toolkit=cairo-qt
ac_add_options --with-maemo-version=5

ac_add_options --enable-cpp-rtti

mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl

ac_add_options --enable-optimize
ac_add_options --disable-debug
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options MOZ_OBJDIR="@TOPSRCDIR@/obj-build"
ac_add_options --with-arm-kuser
ac_add_options --with-thumb=toolchain-default
ac_add_options --with-float-abi=toolchain-default
ac_add_options --with-branding=mobile/xul/branding/unofficial
ac_add_options --prefix=/opt/mozilla
ac_add_options --libdir=/opt/mozilla
export LDFLAGS="-Wl,-z,norelro"

Since this is not an official build, the branding is set to unofficial.

Apply the patch, I created, to fix the build issues:

hg import --no-commit maemo.patch

It has to be downloaded in the repository’s folder.

Start the build:

make -f client.mk build_all

When the build is ready, create the package:

cd obj-build/
make deb

The package will be named:

./obj-build/mobile/xul/fennec_VERSION_armel.deb

Note: this article is based on How to build Fennec on Harmattan_SDK.

You can leave a response, or trackback from your own site.

4 responses to “Building Firefox for Mobile (Fennec) on Maemo SDK”

  1. misterc says:

    maybe you should advertise that your build of Fennec only works with Thumbs2?

  2. Reading says:

    @misterc
    Not true. I have Fennec-17 on CSSU-Testing not-Thumb, thank to Vladislav.

  3. Make says:

    Is this still valid way to build Fennec?

  4. Vladislav says:

    At the time I wrote this post Fennec was not supported by Mozilla any more, but its makefiles still existed. Now day are completely removed from the source tree, so unfortunately it cannot be built.

Leave a Reply