Coder Social home page Coder Social logo

vasild / b2g Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla-b2g/b2g

0.0 1.0 0.0 1.62 MB

Boot to Gecko aims to create a complete, standalone operating system for the open web.

Home Page: https://wiki.mozilla.org/B2G

License: Other

Shell 57.00% Perl 23.15% Python 14.61% Ruby 5.24%

b2g's Introduction

Boot to Gecko (B2G)

Boot to Gecko aims to create a complete, standalone operating system for the open web.

You can read more about B2G here:

http://wiki.mozilla.org/B2G

follow us on twitter: @Boot2Gecko

http://twitter.com/Boot2Gecko

join the Mozilla Platform mailing list:

http://groups.google.com/group/mozilla.dev.platform

and talk to us on IRC:

#B2G on irc.mozilla.org

Prerequisites

Linux

Additionally, if you're building the emulator, you probably need the the Mesa implementation of OpenGL. On Ubuntu, this is the libgl1-mesa-dev package.

Ubuntu 12.10 ships with gcc 4.7 by default, which causes build errors pretty early in the process. To use gcc 4.6, edit .userconfig and add

export CC=gcc-4.6
export CXX=g++-4.6

Of course, you'll need the g++-4.6 package installed.

OSX

Note: Some B2G subrepositories contain files whose names differ only in case. Amazingly, the build seems to work properly on OSX case-insensitive file systems, despite this. But if you do |./repo status|, you'll see lots of spurrious "modified files" corresponding to these pairs of files whose names differ only in case. Try not to worry about it.

Configure

Run config.sh to get a list of supported devices:

./config.sh

And then run config.sh for the device you want to build for:

./config.sh [device name]

Udev Permissions

If you get "error: insufficient permissions for device"...

Obtain ID of device manufacturer (first 4 hexidecimal digits before colon):

$ lsusb

Add a line to /etc/udev/rules.d/android.rules (replacing XXXX with 4 digit ID):

SUBSYSTEM=="usb", ATTRS{idVendor}=="XXXX", MODE="0666"

Restart udev before re-plugging your device for it to be detected:

$ sudo service udev restart

Re-run configure:

./config.sh [device name]

Building against a custom Gecko

It can sometimes be useful to build against a different Gecko than the one specified in the manifest, e.g. a mozilla-central checkout that has some patches applied. To do so, edit .userconfig:

GECKO_PATH=/path/to/mozilla-central
GECKO_OBJDIR=/path/to/mozilla-central/objdir-gonk

Note that if you switch your userconfig's gecko path, you need to rm -rf the objdir and rebuild.

Build

Run build.sh or bld.sh to build B2G.

./build.sh

If you want to just build gecko or some other project, just specify it:

./build.sh gecko

Flash/Install

Make sure your phone is plugged in with usb debugging enabled.

To flash everything on your phone:

./flash.sh

To flash system/userdata/boot partitions on fastboot phones:

./flash.sh system
./flash.sh boot
./flash.sh user

To update gecko:

./flash.sh gecko

To update gaia:

./flash.sh gaia

Update Repos

To update all repos:

git pull
./repo sync

To update a specific repo (eg, gaia):

./repo sync gaia

Debug

To restart B2G and run B2G under gdb:

./run-gdb.sh

To attach gdb to a running B2G process:

./run-gdb.sh attach

Test

To run the Marionette test suite on the emulator:

./test.sh

To run specific tests (individual files, directories, or ini files):

./test.sh gecko/dom/sms gecko/dom/battery/test/marionette/test_battery.py

Specify the full path if you're using a different Gecko repo:

./test.sh /path/to/mozilla-central/dom/battery/test/marionette/test_battery.py

b2g's People

Contributors

a2sheppy avatar andreasgal avatar benfrancis avatar dhylands avatar digoreis avatar dwilsoncaf avatar etiennesegonzac avatar gabrielesvelto avatar gregorwagner avatar jhford avatar jlebar avatar joneschrisg avatar jrmuizel avatar marshall avatar michaelwu avatar nbp avatar nth10sd avatar philikon avatar reuben avatar shianyow avatar vasild avatar vvuk avatar whimboo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.