Changes

Jump to: navigation, search

Hacking b2g on Raspberry Pi

564 bytes added, 19:56, 21 September 2014
Preparing a development environment
== Preparing a development environment ==
To hack b2g on the RPi, you'll want to set up a few things. First, a serial console is strongly recommended. (A serial console is basically required for kernel development.) You can purchase a serial-to-USB or serial-port connector for your RPi. Some RPi kits also include one of these. A common serial-to-USB adapter included in RPi kits requires you to connect the black lead to pin 6 (ground), the white lead to pin 8 (GPIO14, UART0_TXD), and the green lead to pin 10 (GPIO15, UART0_RXD). You don't need to connect the red lead if your RPi already has a power source. The b2g kernel is pre-configured to open a serial console for the RPi, so all you need to do is plug the USB cable into your host machine and you start up a terminal emulator. The <code>minicom</code> program works well. On ubuntu, install minicom with the command  sudo apt-get install minicom Then connect to your RPi using the command  minicom -b 115200 -o -D /dev/ttyUSB0 (Replacing <code>/dev/ttyUSB0</code> with the device assigned to your USB-to-serial adapter, if it's not assigned that name.) You should then see console terminal output and get a shell prompt. Note: you must run minicom in a "smart terminal". minicom doesn't work when run inside an emacs shell, and it errors out with a somewhat cryptic message ("No cursor motion capability (cm)").
You must create an adb connection for your RPi. adb is the "android debug bridge" over which diagnostic output is received and development commands are sent. Usually an adb connection is made over USB, but this hasn't been tested with the RPi. (The RPi's USB ports are intended to be used in master mode, and it's not yet known whether they will go into slave mode if connected to a host machine through a full-sized USB male-to-male connector. These cables are also somewhat hard to find.)
Confirm
699
edits

Navigation menu