3 Minutes      July 25, 2012      Programming Programming/PHP

Install Firefox OS Desktop Builds on CentOS 64 Bit

Firefox OS is a Mobile OS, original name is Boot to Gecko (B2G). Firefox OS is an open source operating system in development by Mozilla. What is Firefox OS anyway and how is it different compared to other platforms (Android and iOS)? Firefox OS a new fully open mobile ecosystem based on HTML5 with open web standards and it is programmed in C++ and JavaScript. They want to make an OS where every application is written in HTML5 and CSS. It has a hardware abstraction layer which is codenamed Gonk. It uses platform independent Javascript APIs for different functions like SMS, camera, and bluetooth. It also has platform independent system apps like lock screen, phone dialer which are all written in HTML5. The user interface of Firefox OS is called Gaia. All that appeares on the screen after the boot up has some or the other part made of Gaia.

Mozilla this week released an early desktop version of Firefox OS that will let developers experience the mobile OS before comes to phones. The builds are available for Mac, Windows, and Linux. It’s not as simple as installing an application, there is some configuring you’ll have to do, but the process is relatively simple. You can find simple instructions for installing Firefox OS desktop builds from Mozilla’s Tony Chung’s blog post. Below you can find complete instructions to install Firefox OS Desktop Builds on CentOS 6.3 64 Bit.

Install Packages

Run the following commands in a shell to install the needed tools (as root):

$ yum groupinstall "Development Tools" "Development Libraries" "GNOME Software Development"
$ yum install mercurial autoconf213 glibc-static wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel git wget make zip gcc libnotify-devel curl-devel java

Download the latest yasm rpm and install it:

$ wget http://pkgs.repoforge.org/yasm/yasm-1.1.0-1.el6.rf.x86_64.rpm
$ rpm -Uvh yasm-1.1.0-1.el6.rf.x86_64.rpm
$ rm yasm-1.1.0-1.el6.rf.x86_64.rpm

Clone Gaia

Clone Gaia project from Github (~160MB):

$ mkdir fos
$ cd fos
$ git clone git://github.com/mozilla-b2g/gaia

Clone Gaia

Download & Install Xulrunner

Download xulrunner in the fos directory (~330MB):

$ make -C gaia profile

Make Gaia Profile

Make Gaia Profile Finished

Building Boot to Gecko 64 Bit Version

Download and extract the code (~100MB):

$ mkdir src
$ cd src
$ wget http://hg.mozilla.org/mozilla-central/archive/tip.tar.gz
$ tar -zxvf tip.tar.gz

Create a file named mozconfig in the mozilla-central directory:

$ cd mozilla-central
$ vi mozconfig

Here’s an example of mozconfig:

mk_add_options MOZ_OBJDIR=../build
mk_add_options MOZ_MAKE_FLAGS="-j9 -s"
ac_add_options --enable-application=b2g
ac_add_options --disable-libjpeg-turbo
ac_add_options --enable-tests

In the mozilla-central directory:

$ make -f client.mk build

The build will appear in ../build folder.

Running Boot to Gecko

My folder structures:

fos
|-- gaia
|   |-- ...
|   |-- profile
|   `-- ...
`-- src
    |-- build
    |   |-- ...
    |   |-- dist
    |   |   |-- bin
    |   |   |   |-- ...
    |   |   |   |-- b2g
    |   |   |   `-- ...
    |   |   `-- ...
    |   `-- ...
    `-- mozilla-central
        |-- ...
        |-- mozconfig
        `-- ...

Run B2G with the generated profile:

$ cd ../build/dist/bin
$ ./b2g -profile /home/alfan/fos/gaia/profile

Done! you should see the content now.

Firefox OS Home Screen

Firefox OS Menu

Firefox OS Add Contact

Firefox OS Browser

Firefox OS Game - Cut the Rope

Senyum, Cermin Keadaan HatiSystem V IPC dan POSIX di PHP (CentOS 6.3)