Firefox OS デスクトップクライアント「b2g」を Linux ( Fedora 20 ) にインストールする


Firefox OS を Linux ( Fedora 20 ) にインストールする手順。

前もって準備すべきパッケージ類

autoconf 2.13
bison
bzip2
ccache
curl
flex
gawk
git
gcc / g++ / g++-multilib
java sdk (jdk)
make
OpenGL shared libraries
patch
X11 headers
32-bit ncurses
32-bit zlib
mercurial
dbus-glib-devel
yasm
gstreamer-devel
gstreamer-plugins-base-devel

ソースコードのダウンロード

mercurialの場合

hg clone http://hg.mozilla.org/mozilla-central
cd mozilla-central
hg pull -u

gitの場合

git clone https://github.com/mozilla/gecko-dev
cd gecko-dev
git pull

.mozconfig の作成

ダウンロードしてきたディレクトリの中に「.mozconfig」を作成する。
内容は以下の通り。

. "$topsrcdir/b2g/config/mozconfigs/common"

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

# This option is required if you want to be able to run Gaia's tests
ac_add_options --enable-tests

# turn on mozTelephony/mozSms interfaces
# Only turn this line on if you actually have a dev phone
# you want to forward to. If you get crashes at startup,
# make sure this line is commented.
#ac_add_options --enable-b2g-ril

ビルド

./mach build

Gaia のダウンロード

git clone https://github.com/mozilla-b2g/gaia
cd gaia
git pull

custom-setting.json の作成

gaia/build/config/custom-setting.json を作成。
内容は以下の通り。

{
    "lockscreen.enabled": false,
    "lockscreen.locked": false,
    "devtools.debugger.remote-enabled": true
}

プロファイルの作成

gaia ディレクトリの中で make を実行する。

make DESKTOP_SHIMS=1 NOFTU=1 DEBUG=1

デスクトップクライアントの実行

b2gの .mozconfig の MOZ_OBJDIR で指定したところに、build ディレクトリができているので、その中の「dist/bin/b2g」を実行する。

/path/to/b2g -profile /path/to/gaia/profile-debug

起動画面

ホーム画面

もう少し詳しい説明は、
http://www.mixp.net/firefox-os/1030
にあります。

2015年1月3日 Qiitaデビューしました。
2014年以前の記事は、
http://www.mixp.net
へどうぞ。--伊良部