Firefox OSのアーキテクチャと
構成技術について
Makoto Kato
Technical Adviser, Mozilla Japan
About Mozilla
About Mozilla

•

•

Mozilla Foundationは
AOL/Netscapeから2003年
に分離した非営利組織
主なプロダクト
•
•
•

Firefox (Web Browser)
Thunderbird (Mail Client)
Firefox OS (Mobile OS)
“Our mission is to promote
openness, innovation &
opportunity on the Web”
ARM Platform上での取り組み
— NokiaのMaemo

/ MeeGo PlatformでのWebブラ
ウザ (Firefoxベース)
— NVIDIAのTegra 1上でのWindows CE用Webブラ
ウザ
— Android版Firefox
Firefox OS

7
Firefox OS
— 2011年から開始されたプ

ロジェクト
— コードネーム Boot to
Gecko (B2G)
— HTML5を用いたモバイル
OS
— ブラウザエンジンのみのシ
ンプルな構成
— オープンソースにて開発
— 開発中のソースコード
も公開
Architecture

Firefox OS Presentation Title
HTML対応を表明している従来型OS

Native
Application

Native
Application

Core Libraries

HTML
Application

HTML
Application

Web Runtime
(ex. WebKit / Blink / Trident)

Core Libraries & GUI Toolkit

Kernel
Firefox OS / B2G

HTML
Application

HTML
Application

HTML
Application

HTML
Application

Web Runtime + Core Libraries
Kernel
Basic Architecture of B2G

Gaia

Gecko
Gonk

• UX/UIを提供
• アプリケーション

• Web APIs
• ネットワークアクセス
• HTML/CSS レンダリング
• Linux
• Drivers / Daemon (MediaServer / RIL etc)
Gaia
— Firefox

OSでのアプリケーション層
— Web Stack (HTML / CSS / WebGL /
JavaScript)で書かれる
— Home screen
— Browser
— Mail
— Camera
— Gallery etc
— APIによって利用できる権限が異なる
— Web App
— Privileged App
— Certified App
UI Framework – Building Blocks
Gecko = Rendering Engine & APIs

Gecko
JavaScript Rendering
Engine
• HTML
• CSS
• SVG
• MathML
• WebGL

Web API

Networking Security

• Device
access

• HTTP
• SSL / TLS
• WebSocket
• WebRTC

• Permission
Gecko
— Firefox

(デスクトップ版 / Android版) でも利用さ
れているレンダリングエンジン
— デスクトップ版で実装されているものは基本す
べて利用可能
— アプリケーションから利用できるAPIはすべてこ
こで実装される
— Firefox OSではいくつかのデバイスアクセスの機
能が追加されている
— RIL, Bluetooth, Wifi and etc
Gonk = Linux kernel + user space / library

wpa_supplicant

RIL damon

Other daemons

Linux Kernel
Device

Libraries
(Bionic /
OpenGL ES /
etc)

Etc…
Gonk

— Linux kernel + User space Library + Daemon
— Daemonはデバイスアクセスのため
— User space LibraryにはAndroidのソースコードを

利用
— すべてではなくGeckoを動かすための最小限の
構成
Process Model

Application

Main
Process
(b2g)

Application

Application

Content
Process

Content
Process

Content
Process

Kernel/HAL - Gonk
Process Model

各アプリケーションはContent Process上で独立して動作
ハードウェアデバイスやカーネルにアクセスする役目は
Main Processが担当
— Main ProcessとContent ProcessはIPCを利用して相互通
信
— Content Processがデバイスにアクセスする際にはIPCに
てMain Processと通信
— アプリケーション間通信もMain Processを通じてIPCを
利用
—
—
Porting Firefox OS / B2G to your devices
— ビルドシステムはAndroidベース
— ドライバ層はAndroidと同様
— Firefox OS 1.0/1.1 = Android 4.0 (ICS)
— Firefox OS 1.2+ = Android 4.0 (ICS) or

Android

4.3 (JB)
— Gralloc / OpenGL ES 2 / libstagefright /
OpenMAX / etc
— カーネルはLinuxのためinitを利用して独自プロセ
スを起動することも可能
Schedule

CY
2013Q2
2013Q4
2014Q1?
2014Q2?
(4半期毎)

Firefox OS version
1.0.1
1.1
1.2
1.3
…

Gecko version
18
18
26
28
…+2
References
Firefox OS
— http://www.mozilla.org/ja/firefox/os/
— Firefox OS description
— https://developer.mozilla.org/en-US/Firefox_OS
— Roadmap
— https://wiki.mozilla.org/B2G/Roadmap
— Porting Guide
— https://developer.mozilla.org/en-US/Firefox_OS/Porting
— Firefox OSコミュニティ
— http://fxos.org/
—
Thank you

Firefox OSのアーキテクチャと構成技術