Hacking b2g on Raspberry Pi: Difference between revisions

Line 125: Line 125:
== 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 start up a terminal emulator.  The <code>minicom</code> program works well.  On ubuntu, install minicom with the command
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, [https://www.adafruit.com/products/954 for example this one from adafruit].  Some RPi kits also include one of these.  The adapter shown above 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.
 
<font size="5" color="red">'''WARNING'''</font>: be very careful that you connect the leads to the correct pins! At least one developer has burned out a USB-to-serial adapter by connecting the wrong pins.
 
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 start up a terminal emulator.  The <code>minicom</code> program works well.  On ubuntu, install minicom with the command


  sudo apt-get install minicom
  sudo apt-get install minicom
Confirmed users
699

edits