[B2G] Build the Boot to Gecko Runs on QEMU

Boot to Gecko (B2G)是由Mozilla所發表的雲端作業系統,性質類似於Chrome OS,基本的差異在於,Chrome OS專注在提供新的Netbook使用體驗(完全基於網路,thin-client裝置的概念),但是B2G的目標是提供一個良好且開放的Web應用程式運行環境。以下是官方網站上所提及,對於這套系統著力的幾個方向,

  • New web APIs: build prototype APIs for exposing device and OS capabilities to content (Telephony, SMS, Camera, USB, Bluetooth, NFC, etc.)
  • Privilege model: making sure that these new capabilities are safely exposed to pages and applications
  • Booting: prototype a low-level substrate for mobile devices (phones and tablets)
  • Applications: choose and port or build apps to prove out and prioritize the power of the system.

以下談談如何將他build起來,幾個簡單的步驟便可以在模擬器上跑起來,
1. Get the B2G source code from Github
2. Prepare your build environment
    $> sudo apt-get install ccache
3. Go to the B2G’s work directory
4. Config to build for emulator
    $> make config-qemu
5. Start to Build
    $> make
6. Start up the B2G
    $> ./emu.sh

來看看開機後的畫面,左邊是進入Home Screen的畫面、右邊是程式列表、再往下中間是進入Settings的畫面。

再來看看另外的應用程式,下方左邊是SMS Message應用程式、右邊是Browser。

這裡我們看到console內的相關資訊,下方是/system/app內的應用程式列表,可以找到一個B2G.apk,居然將近14MB,不小啊。再往下是build.prop檔案的內容,從這邊可以找到一些系統及映像檔編譯資訊。看起來目前是基於Android 2.3.5系統來做修改。

雖然官網上說這套作業系統不是基於Android,但就目前的成果來看,似乎大部份Android環境都還留著,也許日後會陸續拿掉,就一步一步來看吧。目前B2G使用qemu模擬環境來運行,就跟Android一樣,沒有多好的效能表現,官方的安裝說明提到可以使用Galaxy SII和Nexus 4G來運行,但目前手邊也沒有這兩支機子,但就目前來看,稍微處理一下應該可以上Beagleboard或Pandaboard吧。
如果你想要了解B2G的UI設計概念,可以參考這裡B2G/UI

3 comments

  1. Trying libraries: c dl gcc m
    Library c is needed, can't exclude it (yet)
    Library dl is not needed, excluding it
    Library gcc is needed, can't exclude it (yet)
    Library m is needed, can't exclude it (yet)
    Library c is needed, can't exclude it (yet)
    Library gcc is needed, can't exclude it (yet)
    Library m is needed, can't exclude it (yet)
    Final link with: c gcc m
    BFD: busybox: warning: sh_link not set for section `.ARM.exidx'

發佈留言