Boot to Gecko Introduction

32
Mozilla Boot to Gecko 平台技術概況 陳鵬宇 (float)<[email protected]> May 19, 2012/MOSUT

description

 

Transcript of Boot to Gecko Introduction

Page 1: Boot to Gecko Introduction

Mozilla Boot to Gecko 平台技術概況

陳鵬宇 (float)<[email protected]>

May 19, 2012/MOSUT

Page 2: Boot to Gecko Introduction

MOSUT 2

什麼是 Boot to Gecko(B2G)

● Mozilla's open source mobile operating system based on Linux and Mozilla's Gecko technology.

Page 3: Boot to Gecko Introduction

MOSUT 3

概念

● The idea is essentially to have all user-accessible software running on the phone be a Web app that uses advanced HTML5 techniques and device APIs to access the phone's hardware directly via JavaScript.

Page 4: Boot to Gecko Introduction

MOSUT 4

系統介紹

● Gaia● Gecko● Gonk

Page 5: Boot to Gecko Introduction

MOSUT 5

Gaia

● The user interface of b2g. Everything drawn to screen after b2g starts up is some part of Gaia. Gaia implements a lock screen, home screen, telephone dialer, text-messaging application, camera app, ... and many more.

Page 6: Boot to Gecko Introduction

MOSUT 6

Gaia

● Gaia is written entirely in HTML, CSS, and JavaScript. Its only interface to the underlying operating system is through Open Web APIs, which are implemented by Gecko. Gaia works well when run on top of b2g; however, since it only uses standard web APIs, it works on other OSes and in other web browsers.

Page 7: Boot to Gecko Introduction

MOSUT 7

Gaia

Page 8: Boot to Gecko Introduction

MOSUT 8

可能會有人想問

Page 9: Boot to Gecko Introduction

MOSUT 9

可能會有人想問為什麼只有一張圖?

Page 10: Boot to Gecko Introduction

MOSUT 10

因為 ...改版了

Page 11: Boot to Gecko Introduction

MOSUT 11

Page 12: Boot to Gecko Introduction

MOSUT 12

Gecko

● The "application runtime" of b2g. At a high level, Gecko implements the open standards for HTML, CSS, and JS and makes those interfaces run well on all the OSes that Gecko supports.

Page 13: Boot to Gecko Introduction

MOSUT 13

Gonk

● The lower-level "operating system" of b2g. Gonk consists of a linux kernel and userspace hardware abstraction layer (HAL).

Page 14: Boot to Gecko Introduction

MOSUT 14

Gonk

Gaia

Gecko

Web app

…......

b2g

kernel

Page 15: Boot to Gecko Introduction

MOSUT 15

比較

Page 16: Boot to Gecko Introduction

MOSUT 16

Boot

Boot Loader Kernel init

Page 17: Boot to Gecko Introduction

MOSUT 17

Userspace process architecture

Page 18: Boot to Gecko Introduction

MOSUT 18

Gecko: Processing input events

● input-device drivers● Gonk app shell● EventHub● DOM

Page 19: Boot to Gecko Introduction

MOSUT 19

Gecko: Graphics

● At the very lowest level, Gecko uses OpenGL ES 2.0 to draw to a glcontext that wraps the hardware framebuffers.

● Gecko draws directly to VRAM.

Page 20: Boot to Gecko Introduction

MOSUT 20

Page 21: Boot to Gecko Introduction

MOSUT 21

Web app

● Web apps are apps built using standard Web technologies.

● manifest.json

Page 22: Boot to Gecko Introduction

MOSUT 22

manifest.json

https://developer.mozilla.org/en/Apps/Manifest

Page 23: Boot to Gecko Introduction

MOSUT 23

Intsall app

● navigator.mozApps.install(manifestURL)

or

● Put app in gaia/apps/● make install-gaia

Page 24: Boot to Gecko Introduction

MOSUT 24

Marketplace

https://marketplace.mozilla.org/

Page 25: Boot to Gecko Introduction

MOSUT 25

Demo

Page 26: Boot to Gecko Introduction

MOSUT 26

Page 27: Boot to Gecko Introduction

MOSUT 27

Run B2G

Page 28: Boot to Gecko Introduction

MOSUT 28

Firefox Nightly + gaia

http://alivedise.github.com/blog/2012/05/05/gaia/

Page 29: Boot to Gecko Introduction

MOSUT 29

Emulator

● QEMU Emulator

http://www.figuiere.net/hub/blog/?2012/03/13/818-building-b2g-on-fedora-field-notes

Page 30: Boot to Gecko Introduction

MOSUT 30

Device

● Samsung Galaxy S2● Samsung Nexus S

Page 31: Boot to Gecko Introduction

MOSUT 31

Reference

● https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko

● https://wiki.mozilla.org/B2G/Architecture

● http://pydoing.blogspot.com/2010/12/javascript-example.html

● http://mozlinks-zh.blogspot.com/2012/05/gaia-mozilla-b2g.html

● http://www.slideshare.net/robhawkes/mdn-hackday-london-boot-to-gecko-the-future-of-mobile

Page 32: Boot to Gecko Introduction

MOSUT 32

Thank you

Question?