Mobile/Build/Fennec

From MozillaWiki
< Mobile‎ | Build
Revision as of 01:05, 3 December 2008 by GavinSharp (talk | contribs) (autoconf was fixed in bug 450948, not sure why these other options are here)
Jump to navigation Jump to search

Building Fennec and Xulrunner

pull the code from hg

hg clone http://hg.mozilla.org/mozilla-central
cd mozilla-central
hg clone http://hg.mozilla.org/mobile-browser mobile

Your mozconfig should look like this:


# cs2007q3 gcc 4.2 is busted, we think, and doesn't
# look in the expected places. --dougt.
# $PWD/... was added due to bug 463076
export LDFLAGS="-Wl,-rpath-link,$PWD/dist/bin/:/usr/lib:/lib"

# Options for client.mk.
mk_add_options MOZ_BUILD_PROJECTS="xulrunner mobile"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../mobilebase

# Global options
#ac_add_options --enable-debug
#ac_add_options --disable-optimize

# XULRunner options
ac_add_app_options xulrunner --enable-application=xulrunner
ac_add_app_options xulrunner --disable-javaxpcom

# Enabling --with-arm-kuser implies Linux on ARM and enables kernel
# optimizations for that platform
ac_add_app_options xulrunner --with-arm-kuser

# Disabling tests due to bug 454881
ac_add_options --disable-tests

# mobile options
ac_add_app_options mobile --enable-application=mobile
ac_add_app_options mobile --with-libxul-sdk=../xulrunner/dist

make sure you have libIDL:

If building for Maemo in Scratchbox, follow the instructions from the Maemo Build page, and remember to set your PKG_CONFIG_PATH environment variable.

then build:

make -f client.mk build

Running Fennec on Maemo

If you did the above in a Maemo Scratchbox for the CHINOOK_ARMEL target, you can run the build on the N800/N810 device.

Create a Fennec tarball:

cd ../mobilebase/mobile/
make package

You'll now have a tarball in mobilebase/mobile/dist/ named fennec-0.3.en-US.linux-arm.tar.bz2. Copy it to your device (you'll probably want to run bunzip2 on it first, since Maemo doesn't include it).

Extract and launch from a command line (X Terminal) on the device:

$ tar xf fennec-0.3.en-US.linux-arm.tar 
$ cd fennec
$ ./fennec

Building Fennec with the Gecko SDK

First download the appropriate Gecko SDK from [1]


Then pull Mozilla (for the build system) Fennec from hg

hg clone http://hg.mozilla.org/mozilla-central
cd mozilla-central
hg clone http://hg.mozilla.org/mobile-browser mobile


Your mozconfig should look like this:

# Options for client.mk.
mk_add_options MOZ_BUILD_PROJECTS="xulrunner mobile"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-fennec


ac_add_options  --enable-application=mobile
ac_add_options  --with-libxul-sdk=<path to the SDK you downloaded and extracted>

Note: if you are building for x86 ubuntu, you will want to add "ac_add_options --disable-dbus" to your mozconfig


And finally, build

make -f client.mk build